github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/provider-config-schema/dotnet/Configstation/Provider.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 Configstation.Pulumi.Configstation 12 { 13 [ConfigstationResourceType("pulumi:providers:configstation")] 14 public partial class Provider : global::Pulumi.ProviderResource 15 { 16 /// <summary> 17 /// Create a Provider resource with the given unique name, arguments, and options. 18 /// </summary> 19 /// 20 /// <param name="name">The unique name of the resource</param> 21 /// <param name="args">The arguments used to populate this resource's properties</param> 22 /// <param name="options">A bag of options that control this resource's behavior</param> 23 public Provider(string name, ProviderArgs? args = null, CustomResourceOptions? options = null) 24 : base("configstation", name, args ?? new ProviderArgs(), MakeResourceOptions(options, "")) 25 { 26 } 27 28 private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id) 29 { 30 var defaultOptions = new CustomResourceOptions 31 { 32 Version = Utilities.Version, 33 }; 34 var merged = CustomResourceOptions.Merge(defaultOptions, options); 35 // Override the ID if one was specified for consistency with other language SDKs. 36 merged.Id = id ?? merged.Id; 37 return merged; 38 } 39 } 40 41 public sealed class ProviderArgs : global::Pulumi.ResourceArgs 42 { 43 /// <summary> 44 /// this is a relaxed string enum which can also be set via env var 45 /// </summary> 46 [Input("favoriteColor", json: true)] 47 public InputUnion<string, Configstation.Pulumi.Configstation.Color>? FavoriteColor { get; set; } 48 49 public ProviderArgs() 50 { 51 FavoriteColor = Utilities.GetEnv("FAVE_COLOR"); 52 } 53 public static new ProviderArgs Empty => new ProviderArgs(); 54 } 55 }