github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/simple-enum-schema/dotnet/Tree/V1/Nursery.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.Plant.Tree.V1
    11  {
    12      [PlantResourceType("plant:tree/v1:Nursery")]
    13      public partial class Nursery : global::Pulumi.CustomResource
    14      {
    15          /// <summary>
    16          /// Create a Nursery 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 Nursery(string name, NurseryArgs args, CustomResourceOptions? options = null)
    23              : base("plant:tree/v1:Nursery", name, args ?? new NurseryArgs(), MakeResourceOptions(options, ""))
    24          {
    25          }
    26  
    27          private Nursery(string name, Input<string> id, CustomResourceOptions? options = null)
    28              : base("plant:tree/v1:Nursery", 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 Nursery 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 Nursery Get(string name, Input<string> id, CustomResourceOptions? options = null)
    52          {
    53              return new Nursery(name, id, options);
    54          }
    55      }
    56  
    57      public sealed class NurseryArgs : global::Pulumi.ResourceArgs
    58      {
    59          [Input("sizes")]
    60          private InputMap<Pulumi.Plant.Tree.V1.TreeSize>? _sizes;
    61  
    62          /// <summary>
    63          /// The sizes of trees available
    64          /// </summary>
    65          public InputMap<Pulumi.Plant.Tree.V1.TreeSize> Sizes
    66          {
    67              get => _sizes ?? (_sizes = new InputMap<Pulumi.Plant.Tree.V1.TreeSize>());
    68              set => _sizes = value;
    69          }
    70  
    71          [Input("varieties", required: true)]
    72          private InputList<Pulumi.Plant.Tree.V1.RubberTreeVariety>? _varieties;
    73  
    74          /// <summary>
    75          /// The varieties available
    76          /// </summary>
    77          public InputList<Pulumi.Plant.Tree.V1.RubberTreeVariety> Varieties
    78          {
    79              get => _varieties ?? (_varieties = new InputList<Pulumi.Plant.Tree.V1.RubberTreeVariety>());
    80              set => _varieties = value;
    81          }
    82  
    83          public NurseryArgs()
    84          {
    85          }
    86          public static new NurseryArgs Empty => new NurseryArgs();
    87      }
    88  }