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