github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/simple-resource-schema-custom-pypackage-name/nodejs/otherResource.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 import {Resource} from "./index"; 8 9 export class OtherResource extends pulumi.ComponentResource { 10 /** @internal */ 11 public static readonly __pulumiType = 'example::OtherResource'; 12 13 /** 14 * Returns true if the given object is an instance of OtherResource. This is designed to work even 15 * when multiple copies of the Pulumi SDK have been loaded into the same process. 16 */ 17 public static isInstance(obj: any): obj is OtherResource { 18 if (obj === undefined || obj === null) { 19 return false; 20 } 21 return obj['__pulumiType'] === OtherResource.__pulumiType; 22 } 23 24 public readonly foo!: pulumi.Output<Resource | undefined>; 25 26 /** 27 * Create a OtherResource 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?: OtherResourceArgs, opts?: pulumi.ComponentResourceOptions) { 34 let resourceInputs: pulumi.Inputs = {}; 35 opts = opts || {}; 36 if (!opts.id) { 37 resourceInputs["foo"] = args ? args.foo : undefined; 38 } else { 39 resourceInputs["foo"] = undefined /*out*/; 40 } 41 opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); 42 super(OtherResource.__pulumiType, name, resourceInputs, opts, true /*remote*/); 43 } 44 } 45 46 /** 47 * The set of arguments for constructing a OtherResource resource. 48 */ 49 export interface OtherResourceArgs { 50 foo?: pulumi.Input<Resource>; 51 }