github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/provider-config-schema/nodejs/provider.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 enums from "./types/enums";
     8  import * as utilities from "./utilities";
     9  
    10  export class Provider extends pulumi.ProviderResource {
    11      /** @internal */
    12      public static readonly __pulumiType = 'configstation';
    13  
    14      /**
    15       * Returns true if the given object is an instance of Provider.  This is designed to work even
    16       * when multiple copies of the Pulumi SDK have been loaded into the same process.
    17       */
    18      public static isInstance(obj: any): obj is Provider {
    19          if (obj === undefined || obj === null) {
    20              return false;
    21          }
    22          return obj['__pulumiType'] === Provider.__pulumiType;
    23      }
    24  
    25  
    26      /**
    27       * Create a Provider resource with the given unique name, arguments, and options.
    28       *
    29       * @param name The _unique_ name of the resource.
    30       * @param args The arguments to use to populate this resource's properties.
    31       * @param opts A bag of options that control this resource's behavior.
    32       */
    33      constructor(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions) {
    34          let resourceInputs: pulumi.Inputs = {};
    35          opts = opts || {};
    36          {
    37              resourceInputs["favoriteColor"] = (args ? args.favoriteColor : undefined) ?? <any>utilities.getEnv("FAVE_COLOR");
    38          }
    39          opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
    40          super(Provider.__pulumiType, name, resourceInputs, opts);
    41      }
    42  }
    43  
    44  /**
    45   * The set of arguments for constructing a Provider resource.
    46   */
    47  export interface ProviderArgs {
    48      /**
    49       * this is a relaxed string enum which can also be set via env var
    50       */
    51      favoriteColor?: pulumi.Input<string | enums.Color>;
    52  }