github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/plain-object-disable-defaults/dotnet/Foo.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      /// <summary>
    13      /// test new feature with resoruces
    14      /// </summary>
    15      [ExampleResourceType("example:index:Foo")]
    16      public partial class Foo : global::Pulumi.CustomResource
    17      {
    18          /// <summary>
    19          /// A test for plain types
    20          /// </summary>
    21          [Output("defaultKubeClientSettings")]
    22          public Output<Outputs.KubeClientSettings?> DefaultKubeClientSettings { get; private set; } = null!;
    23  
    24  
    25          /// <summary>
    26          /// Create a Foo 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 Foo(string name, FooArgs args, CustomResourceOptions? options = null)
    33              : base("example:index:Foo", name, args ?? new FooArgs(), MakeResourceOptions(options, ""))
    34          {
    35          }
    36  
    37          private Foo(string name, Input<string> id, CustomResourceOptions? options = null)
    38              : base("example:index:Foo", 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 Foo 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 Foo Get(string name, Input<string> id, CustomResourceOptions? options = null)
    62          {
    63              return new Foo(name, id, options);
    64          }
    65      }
    66  
    67      public sealed class FooArgs : global::Pulumi.ResourceArgs
    68      {
    69          [Input("argument")]
    70          public string? Argument { get; set; }
    71  
    72          /// <summary>
    73          /// Options for tuning the Kubernetes client used by a Provider.
    74          /// </summary>
    75          [Input("backupKubeClientSettings", required: true)]
    76          public Input<Inputs.KubeClientSettingsArgs> BackupKubeClientSettings { get; set; } = null!;
    77  
    78          /// <summary>
    79          /// Options for tuning the Kubernetes client used by a Provider.
    80          /// </summary>
    81          [Input("kubeClientSettings")]
    82          public Input<Inputs.KubeClientSettingsArgs>? KubeClientSettings { get; set; }
    83  
    84          /// <summary>
    85          /// describing things
    86          /// </summary>
    87          [Input("settings")]
    88          public Input<Inputs.LayeredTypeArgs>? Settings { get; set; }
    89  
    90          public FooArgs()
    91          {
    92          }
    93          public static new FooArgs Empty => new FooArgs();
    94      }
    95  }