github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/external-resource-schema/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::Component")] 13 public partial class Component : global::Pulumi.CustomResource 14 { 15 [Output("provider")] 16 public Output<Pulumi.Kubernetes.Provider?> Provider { get; private set; } = null!; 17 18 [Output("securityGroup")] 19 public Output<Pulumi.Aws.Ec2.SecurityGroup> SecurityGroup { get; private set; } = null!; 20 21 [Output("storageClasses")] 22 public Output<ImmutableDictionary<string, Pulumi.Kubernetes.Storage.V1.StorageClass>?> StorageClasses { get; private set; } = null!; 23 24 25 /// <summary> 26 /// Create a Component resource with the given unique name, arguments, and options. 27 /// </summary> 28 /// 29 /// <param name="name">The unique name of the resource</param> 30 /// <param name="args">The arguments used to populate this resource's properties</param> 31 /// <param name="options">A bag of options that control this resource's behavior</param> 32 public Component(string name, ComponentArgs args, CustomResourceOptions? options = null) 33 : base("example::Component", name, args ?? new ComponentArgs(), MakeResourceOptions(options, "")) 34 { 35 } 36 37 private Component(string name, Input<string> id, CustomResourceOptions? options = null) 38 : base("example::Component", name, null, MakeResourceOptions(options, id)) 39 { 40 } 41 42 private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id) 43 { 44 var defaultOptions = new CustomResourceOptions 45 { 46 Version = Utilities.Version, 47 }; 48 var merged = CustomResourceOptions.Merge(defaultOptions, options); 49 // Override the ID if one was specified for consistency with other language SDKs. 50 merged.Id = id ?? merged.Id; 51 return merged; 52 } 53 /// <summary> 54 /// Get an existing Component resource's state with the given name, ID, and optional extra 55 /// properties used to qualify the lookup. 56 /// </summary> 57 /// 58 /// <param name="name">The unique name of the resulting resource.</param> 59 /// <param name="id">The unique provider ID of the resource to lookup.</param> 60 /// <param name="options">A bag of options that control this resource's behavior</param> 61 public static Component Get(string name, Input<string> id, CustomResourceOptions? options = null) 62 { 63 return new Component(name, id, options); 64 } 65 } 66 67 public sealed class ComponentArgs : global::Pulumi.ResourceArgs 68 { 69 [Input("metadata")] 70 public Input<Pulumi.Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs>? Metadata { get; set; } 71 72 [Input("metadataArray")] 73 private InputList<Pulumi.Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs>? _metadataArray; 74 public InputList<Pulumi.Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs> MetadataArray 75 { 76 get => _metadataArray ?? (_metadataArray = new InputList<Pulumi.Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs>()); 77 set => _metadataArray = value; 78 } 79 80 [Input("metadataMap")] 81 private InputMap<Pulumi.Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs>? _metadataMap; 82 public InputMap<Pulumi.Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs> MetadataMap 83 { 84 get => _metadataMap ?? (_metadataMap = new InputMap<Pulumi.Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs>()); 85 set => _metadataMap = value; 86 } 87 88 [Input("requiredMetadata", required: true)] 89 public Input<Pulumi.Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs> RequiredMetadata { get; set; } = null!; 90 91 [Input("requiredMetadataArray", required: true)] 92 private InputList<Pulumi.Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs>? _requiredMetadataArray; 93 public InputList<Pulumi.Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs> RequiredMetadataArray 94 { 95 get => _requiredMetadataArray ?? (_requiredMetadataArray = new InputList<Pulumi.Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs>()); 96 set => _requiredMetadataArray = value; 97 } 98 99 [Input("requiredMetadataMap", required: true)] 100 private InputMap<Pulumi.Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs>? _requiredMetadataMap; 101 public InputMap<Pulumi.Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs> RequiredMetadataMap 102 { 103 get => _requiredMetadataMap ?? (_requiredMetadataMap = new InputMap<Pulumi.Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs>()); 104 set => _requiredMetadataMap = value; 105 } 106 107 public ComponentArgs() 108 { 109 } 110 public static new ComponentArgs Empty => new ComponentArgs(); 111 } 112 }