github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/other-owned/dotnet/BarResource.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 using Pulumi; 10 11 namespace Other.Example 12 { 13 [ExampleResourceType("bar::BarResource")] 14 public partial class BarResource : global::Pulumi.ComponentResource 15 { 16 [Output("foo")] 17 public Output<Other.Example.Resource?> Foo { get; private set; } = null!; 18 19 20 /// <summary> 21 /// Create a BarResource resource with the given unique name, arguments, and options. 22 /// </summary> 23 /// 24 /// <param name="name">The unique name of the resource</param> 25 /// <param name="args">The arguments used to populate this resource's properties</param> 26 /// <param name="options">A bag of options that control this resource's behavior</param> 27 public BarResource(string name, BarResourceArgs? args = null, ComponentResourceOptions? options = null) 28 : base("bar::BarResource", name, args ?? new BarResourceArgs(), MakeResourceOptions(options, ""), remote: true) 29 { 30 } 31 32 private static ComponentResourceOptions MakeResourceOptions(ComponentResourceOptions? options, Input<string>? id) 33 { 34 var defaultOptions = new ComponentResourceOptions 35 { 36 Version = Utilities.Version, 37 PluginDownloadURL = "example.com/download", 38 }; 39 var merged = ComponentResourceOptions.Merge(defaultOptions, options); 40 // Override the ID if one was specified for consistency with other language SDKs. 41 merged.Id = id ?? merged.Id; 42 return merged; 43 } 44 } 45 46 public sealed class BarResourceArgs : global::Pulumi.ResourceArgs 47 { 48 [Input("foo")] 49 public Input<Other.Example.Resource>? Foo { get; set; } 50 51 public BarResourceArgs() 52 { 53 } 54 public static new BarResourceArgs Empty => new BarResourceArgs(); 55 } 56 }