github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/plain-object-defaults/dotnet/ModuleTest.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:moduleTest")] 13 public partial class ModuleTest : global::Pulumi.CustomResource 14 { 15 /// <summary> 16 /// Create a ModuleTest resource with the given unique name, arguments, and options. 17 /// </summary> 18 /// 19 /// <param name="name">The unique name of the resource</param> 20 /// <param name="args">The arguments used to populate this resource's properties</param> 21 /// <param name="options">A bag of options that control this resource's behavior</param> 22 public ModuleTest(string name, ModuleTestArgs? args = null, CustomResourceOptions? options = null) 23 : base("example:index:moduleTest", name, args ?? new ModuleTestArgs(), MakeResourceOptions(options, "")) 24 { 25 } 26 27 private ModuleTest(string name, Input<string> id, CustomResourceOptions? options = null) 28 : base("example:index:moduleTest", name, null, MakeResourceOptions(options, id)) 29 { 30 } 31 32 private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id) 33 { 34 var defaultOptions = new CustomResourceOptions 35 { 36 Version = Utilities.Version, 37 }; 38 var merged = CustomResourceOptions.Merge(defaultOptions, options); 39 // Override the ID if one was specified for consistency with other language SDKs. 40 merged.Id = id ?? merged.Id; 41 return merged; 42 } 43 /// <summary> 44 /// Get an existing ModuleTest resource's state with the given name, ID, and optional extra 45 /// properties used to qualify the lookup. 46 /// </summary> 47 /// 48 /// <param name="name">The unique name of the resulting resource.</param> 49 /// <param name="id">The unique provider ID of the resource to lookup.</param> 50 /// <param name="options">A bag of options that control this resource's behavior</param> 51 public static ModuleTest Get(string name, Input<string> id, CustomResourceOptions? options = null) 52 { 53 return new ModuleTest(name, id, options); 54 } 55 } 56 57 public sealed class ModuleTestArgs : global::Pulumi.ResourceArgs 58 { 59 [Input("mod1")] 60 public Input<Pulumi.Example.Mod1.Inputs.TypArgs>? Mod1 { get; set; } 61 62 [Input("val")] 63 public Input<Inputs.TypArgs>? Val { get; set; } 64 65 public ModuleTestArgs() 66 { 67 } 68 public static new ModuleTestArgs Empty => new ModuleTestArgs(); 69 } 70 }