github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/simple-yaml-schema/dotnet/OtherResource.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::OtherResource")]
    13      public partial class OtherResource : global::Pulumi.ComponentResource
    14      {
    15          [Output("foo")]
    16          public Output<Pulumi.Example.Resource?> Foo { get; private set; } = null!;
    17  
    18  
    19          /// <summary>
    20          /// Create a OtherResource resource with the given unique name, arguments, and options.
    21          /// </summary>
    22          ///
    23          /// <param name="name">The unique name of the resource</param>
    24          /// <param name="args">The arguments used to populate this resource's properties</param>
    25          /// <param name="options">A bag of options that control this resource's behavior</param>
    26          public OtherResource(string name, OtherResourceArgs? args = null, ComponentResourceOptions? options = null)
    27              : base("example::OtherResource", name, args ?? new OtherResourceArgs(), MakeResourceOptions(options, ""), remote: true)
    28          {
    29          }
    30  
    31          private static ComponentResourceOptions MakeResourceOptions(ComponentResourceOptions? options, Input<string>? id)
    32          {
    33              var defaultOptions = new ComponentResourceOptions
    34              {
    35                  Version = Utilities.Version,
    36              };
    37              var merged = ComponentResourceOptions.Merge(defaultOptions, options);
    38              // Override the ID if one was specified for consistency with other language SDKs.
    39              merged.Id = id ?? merged.Id;
    40              return merged;
    41          }
    42      }
    43  
    44      public sealed class OtherResourceArgs : global::Pulumi.ResourceArgs
    45      {
    46          [Input("bar")]
    47          private List<Input<string>>? _bar;
    48          public List<Input<string>> Bar
    49          {
    50              get => _bar ?? (_bar = new List<Input<string>>());
    51              set => _bar = value;
    52          }
    53  
    54          [Input("foo")]
    55          public Input<Pulumi.Example.Resource>? Foo { get; set; }
    56  
    57          public OtherResourceArgs()
    58          {
    59          }
    60          public static new OtherResourceArgs Empty => new OtherResourceArgs();
    61      }
    62  }