github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/external-enum/dotnet/Component.cs (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 using System; 5 using System.Collections.Generic; 6 using System.Collections.Immutable; 7 using System.Threading.Tasks; 8 using Pulumi.Serialization; 9 10 namespace Pulumi.Example 11 { 12 [ExampleResourceType("example:index:Component")] 13 public partial class Component : global::Pulumi.CustomResource 14 { 15 [Output("localEnum")] 16 public Output<Pulumi.Example.Local.MyEnum?> LocalEnum { get; private set; } = null!; 17 18 [Output("remoteEnum")] 19 public Output<Pulumi.GoogleNative.Accesscontextmanager/v1.DevicePolicyAllowedDeviceManagementLevelsItem?> RemoteEnum { get; private set; } = null!; 20 21 22 /// <summary> 23 /// Create a Component resource with the given unique name, arguments, and options. 24 /// </summary> 25 /// 26 /// <param name="name">The unique name of the resource</param> 27 /// <param name="args">The arguments used to populate this resource's properties</param> 28 /// <param name="options">A bag of options that control this resource's behavior</param> 29 public Component(string name, ComponentArgs? args = null, CustomResourceOptions? options = null) 30 : base("example:index:Component", name, args ?? new ComponentArgs(), MakeResourceOptions(options, "")) 31 { 32 } 33 34 private Component(string name, Input<string> id, CustomResourceOptions? options = null) 35 : base("example:index:Component", name, null, MakeResourceOptions(options, id)) 36 { 37 } 38 39 private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id) 40 { 41 var defaultOptions = new CustomResourceOptions 42 { 43 Version = Utilities.Version, 44 }; 45 var merged = CustomResourceOptions.Merge(defaultOptions, options); 46 // Override the ID if one was specified for consistency with other language SDKs. 47 merged.Id = id ?? merged.Id; 48 return merged; 49 } 50 /// <summary> 51 /// Get an existing Component resource's state with the given name, ID, and optional extra 52 /// properties used to qualify the lookup. 53 /// </summary> 54 /// 55 /// <param name="name">The unique name of the resulting resource.</param> 56 /// <param name="id">The unique provider ID of the resource to lookup.</param> 57 /// <param name="options">A bag of options that control this resource's behavior</param> 58 public static Component Get(string name, Input<string> id, CustomResourceOptions? options = null) 59 { 60 return new Component(name, id, options); 61 } 62 } 63 64 public sealed class ComponentArgs : global::Pulumi.ResourceArgs 65 { 66 [Input("localEnum")] 67 public Input<Pulumi.Example.Local.MyEnum>? LocalEnum { get; set; } 68 69 [Input("remoteEnum")] 70 public Input<Pulumi.GoogleNative.Accesscontextmanager/v1.DevicePolicyAllowedDeviceManagementLevelsItem>? RemoteEnum { get; set; } 71 72 public ComponentArgs() 73 { 74 } 75 public static new ComponentArgs Empty => new ComponentArgs(); 76 } 77 }