github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/plain-object-disable-defaults/nodejs/funcWithAllOptionalInputs.ts (about)

     1  // *** WARNING: this file was generated by test. ***
     2  // *** Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  import * as pulumi from "@pulumi/pulumi";
     5  import * as inputs from "./types/input";
     6  import * as outputs from "./types/output";
     7  import * as utilities from "./utilities";
     8  
     9  /**
    10   * Check codegen of functions with all optional inputs.
    11   */
    12  export function funcWithAllOptionalInputs(args?: FuncWithAllOptionalInputsArgs, opts?: pulumi.InvokeOptions): Promise<FuncWithAllOptionalInputsResult> {
    13      args = args || {};
    14  
    15      opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
    16      return pulumi.runtime.invoke("mypkg::funcWithAllOptionalInputs", {
    17          "a": args.a ? inputs.helmReleaseSettingsProvideDefaults(args.a) : undefined,
    18          "b": args.b,
    19      }, opts);
    20  }
    21  
    22  export interface FuncWithAllOptionalInputsArgs {
    23      /**
    24       * Property A
    25       */
    26      a?: inputs.HelmReleaseSettings;
    27      /**
    28       * Property B
    29       */
    30      b?: string;
    31  }
    32  
    33  export interface FuncWithAllOptionalInputsResult {
    34      readonly r: string;
    35  }
    36  
    37  export function funcWithAllOptionalInputsOutput(args?: FuncWithAllOptionalInputsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<FuncWithAllOptionalInputsResult> {
    38      return pulumi.output(args).apply(a => funcWithAllOptionalInputs(a, opts))
    39  }
    40  
    41  export interface FuncWithAllOptionalInputsOutputArgs {
    42      /**
    43       * Property A
    44       */
    45      a?: pulumi.Input<inputs.HelmReleaseSettingsArgs>;
    46      /**
    47       * Property B
    48       */
    49      b?: pulumi.Input<string>;
    50  }