github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/naming-collisions/nodejs/resource.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 utilities from "./utilities";
     6  
     7  export class Resource extends pulumi.CustomResource {
     8      /**
     9       * Get an existing Resource resource's state with the given name, ID, and optional extra
    10       * properties used to qualify the lookup.
    11       *
    12       * @param name The _unique_ name of the resulting resource.
    13       * @param id The _unique_ provider ID of the resource to lookup.
    14       * @param opts Optional settings to control the behavior of the CustomResource.
    15       */
    16      public static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Resource {
    17          return new Resource(name, undefined as any, { ...opts, id: id });
    18      }
    19  
    20      /** @internal */
    21      public static readonly __pulumiType = 'example::Resource';
    22  
    23      /**
    24       * Returns true if the given object is an instance of Resource.  This is designed to work even
    25       * when multiple copies of the Pulumi SDK have been loaded into the same process.
    26       */
    27      public static isInstance(obj: any): obj is Resource {
    28          if (obj === undefined || obj === null) {
    29              return false;
    30          }
    31          return obj['__pulumiType'] === Resource.__pulumiType;
    32      }
    33  
    34      public /*out*/ readonly bar!: pulumi.Output<string | undefined>;
    35  
    36      /**
    37       * Create a Resource resource with the given unique name, arguments, and options.
    38       *
    39       * @param name The _unique_ name of the resource.
    40       * @param args The arguments to use to populate this resource's properties.
    41       * @param opts A bag of options that control this resource's behavior.
    42       */
    43      constructor(name: string, args?: ResourceArgs, opts?: pulumi.CustomResourceOptions) {
    44          let resourceInputs: pulumi.Inputs = {};
    45          opts = opts || {};
    46          if (!opts.id) {
    47              resourceInputs["bar"] = undefined /*out*/;
    48          } else {
    49              resourceInputs["bar"] = undefined /*out*/;
    50          }
    51          opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
    52          super(Resource.__pulumiType, name, resourceInputs, opts);
    53      }
    54  }
    55  
    56  /**
    57   * The set of arguments for constructing a Resource resource.
    58   */
    59  export interface ResourceArgs {
    60  }