github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/different-enum/dotnet/Tree/V1/RubberTree.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:RubberTree")]
    13      public partial class RubberTree : global::Pulumi.CustomResource
    14      {
    15          [Output("container")]
    16          public Output<Pulumi.Plant.Outputs.Container?> Container { get; private set; } = null!;
    17  
    18          [Output("diameter")]
    19          public Output<Pulumi.Other.Tree.V1.Diameter> Diameter { get; private set; } = null!;
    20  
    21          [Output("farm")]
    22          public Output<string?> Farm { get; private set; } = null!;
    23  
    24          [Output("size")]
    25          public Output<Pulumi.Plant.Tree.V1.TreeSize?> Size { get; private set; } = null!;
    26  
    27          [Output("type")]
    28          public Output<Pulumi.Plant.Tree.V1.RubberTreeVariety> Type { get; private set; } = null!;
    29  
    30  
    31          /// <summary>
    32          /// Create a RubberTree resource with the given unique name, arguments, and options.
    33          /// </summary>
    34          ///
    35          /// <param name="name">The unique name of the resource</param>
    36          /// <param name="args">The arguments used to populate this resource's properties</param>
    37          /// <param name="options">A bag of options that control this resource's behavior</param>
    38          public RubberTree(string name, RubberTreeArgs args, CustomResourceOptions? options = null)
    39              : base("plant:tree/v1:RubberTree", name, args ?? new RubberTreeArgs(), MakeResourceOptions(options, ""))
    40          {
    41          }
    42  
    43          private RubberTree(string name, Input<string> id, RubberTreeState? state = null, CustomResourceOptions? options = null)
    44              : base("plant:tree/v1:RubberTree", name, state, MakeResourceOptions(options, id))
    45          {
    46          }
    47  
    48          private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
    49          {
    50              var defaultOptions = new CustomResourceOptions
    51              {
    52                  Version = Utilities.Version,
    53              };
    54              var merged = CustomResourceOptions.Merge(defaultOptions, options);
    55              // Override the ID if one was specified for consistency with other language SDKs.
    56              merged.Id = id ?? merged.Id;
    57              return merged;
    58          }
    59          /// <summary>
    60          /// Get an existing RubberTree resource's state with the given name, ID, and optional extra
    61          /// properties used to qualify the lookup.
    62          /// </summary>
    63          ///
    64          /// <param name="name">The unique name of the resulting resource.</param>
    65          /// <param name="id">The unique provider ID of the resource to lookup.</param>
    66          /// <param name="state">Any extra arguments used during the lookup.</param>
    67          /// <param name="options">A bag of options that control this resource's behavior</param>
    68          public static RubberTree Get(string name, Input<string> id, RubberTreeState? state = null, CustomResourceOptions? options = null)
    69          {
    70              return new RubberTree(name, id, state, options);
    71          }
    72      }
    73  
    74      public sealed class RubberTreeArgs : global::Pulumi.ResourceArgs
    75      {
    76          [Input("container")]
    77          public Input<Pulumi.Plant.Inputs.ContainerArgs>? Container { get; set; }
    78  
    79          [Input("diameter", required: true)]
    80          public Input<Pulumi.Other.Tree.V1.Diameter> Diameter { get; set; } = null!;
    81  
    82          [Input("farm")]
    83          public InputUnion<Pulumi.Plant.Tree.V1.Farm, string>? Farm { get; set; }
    84  
    85          [Input("size")]
    86          public Input<Pulumi.Plant.Tree.V1.TreeSize>? Size { get; set; }
    87  
    88          [Input("type", required: true)]
    89          public Input<Pulumi.Plant.Tree.V1.RubberTreeVariety> Type { get; set; } = null!;
    90  
    91          public RubberTreeArgs()
    92          {
    93              Diameter = Pulumi.Plant.Tree.V1.Diameter.Sixinch;
    94              Farm = "(unknown)";
    95              Size = Pulumi.Plant.Tree.V1.TreeSize.Medium;
    96              Type = Pulumi.Plant.Tree.V1.RubberTreeVariety.Burgundy;
    97          }
    98          public static new RubberTreeArgs Empty => new RubberTreeArgs();
    99      }
   100  
   101      public sealed class RubberTreeState : global::Pulumi.ResourceArgs
   102      {
   103          [Input("farm")]
   104          public InputUnion<Pulumi.Plant.Tree.V1.Farm, string>? Farm { get; set; }
   105  
   106          public RubberTreeState()
   107          {
   108              Farm = "(unknown)";
   109          }
   110          public static new RubberTreeState Empty => new RubberTreeState();
   111      }
   112  }