github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/simple-resource-schema/dotnet/Provider.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("pulumi:providers:example")]
    13      public partial class Provider : global::Pulumi.ProviderResource
    14      {
    15          /// <summary>
    16          /// Create a Provider 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 Provider(string name, ProviderArgs? args = null, CustomResourceOptions? options = null)
    23              : base("example", name, args ?? new ProviderArgs(), MakeResourceOptions(options, ""))
    24          {
    25          }
    26  
    27          private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
    28          {
    29              var defaultOptions = new CustomResourceOptions
    30              {
    31                  Version = Utilities.Version,
    32                  PluginDownloadURL = "example.com/download",
    33              };
    34              var merged = CustomResourceOptions.Merge(defaultOptions, options);
    35              // Override the ID if one was specified for consistency with other language SDKs.
    36              merged.Id = id ?? merged.Id;
    37              return merged;
    38          }
    39      }
    40  
    41      public sealed class ProviderArgs : global::Pulumi.ResourceArgs
    42      {
    43          public ProviderArgs()
    44          {
    45          }
    46          public static new ProviderArgs Empty => new ProviderArgs();
    47      }
    48  }