github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/replace-on-change/nodejs/dog.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 Dog extends pulumi.CustomResource {
     8      /**
     9       * Get an existing Dog 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): Dog {
    17          return new Dog(name, undefined as any, { ...opts, id: id });
    18      }
    19  
    20      /** @internal */
    21      public static readonly __pulumiType = 'example::Dog';
    22  
    23      /**
    24       * Returns true if the given object is an instance of Dog.  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 Dog {
    28          if (obj === undefined || obj === null) {
    29              return false;
    30          }
    31          return obj['__pulumiType'] === Dog.__pulumiType;
    32      }
    33  
    34      public /*out*/ readonly bone!: pulumi.Output<string | undefined>;
    35  
    36      /**
    37       * Create a Dog 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?: DogArgs, opts?: pulumi.CustomResourceOptions) {
    44          let resourceInputs: pulumi.Inputs = {};
    45          opts = opts || {};
    46          if (!opts.id) {
    47              resourceInputs["bone"] = undefined /*out*/;
    48          } else {
    49              resourceInputs["bone"] = undefined /*out*/;
    50          }
    51          opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
    52          const replaceOnChanges = { replaceOnChanges: ["bone"] };
    53          opts = pulumi.mergeOptions(opts, replaceOnChanges);
    54          super(Dog.__pulumiType, name, resourceInputs, opts);
    55      }
    56  }
    57  
    58  /**
    59   * The set of arguments for constructing a Dog resource.
    60   */
    61  export interface DogArgs {
    62  }