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