github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/output-funcs/dotnet/FuncWithDefaultValue.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.Mypkg
    11  {
    12      public static class FuncWithDefaultValue
    13      {
    14          /// <summary>
    15          /// Check codegen of functions with default values.
    16          /// </summary>
    17          public static Task<FuncWithDefaultValueResult> InvokeAsync(FuncWithDefaultValueArgs args, InvokeOptions? options = null)
    18              => global::Pulumi.Deployment.Instance.InvokeAsync<FuncWithDefaultValueResult>("mypkg::funcWithDefaultValue", args ?? new FuncWithDefaultValueArgs(), options.WithDefaults());
    19  
    20          /// <summary>
    21          /// Check codegen of functions with default values.
    22          /// </summary>
    23          public static Output<FuncWithDefaultValueResult> Invoke(FuncWithDefaultValueInvokeArgs args, InvokeOptions? options = null)
    24              => global::Pulumi.Deployment.Instance.Invoke<FuncWithDefaultValueResult>("mypkg::funcWithDefaultValue", args ?? new FuncWithDefaultValueInvokeArgs(), options.WithDefaults());
    25      }
    26  
    27  
    28      public sealed class FuncWithDefaultValueArgs : global::Pulumi.InvokeArgs
    29      {
    30          [Input("a", required: true)]
    31          public string A { get; set; } = null!;
    32  
    33          [Input("b")]
    34          public string? B { get; set; }
    35  
    36          public FuncWithDefaultValueArgs()
    37          {
    38              B = "b-default";
    39          }
    40          public static new FuncWithDefaultValueArgs Empty => new FuncWithDefaultValueArgs();
    41      }
    42  
    43      public sealed class FuncWithDefaultValueInvokeArgs : global::Pulumi.InvokeArgs
    44      {
    45          [Input("a", required: true)]
    46          public Input<string> A { get; set; } = null!;
    47  
    48          [Input("b")]
    49          public Input<string>? B { get; set; }
    50  
    51          public FuncWithDefaultValueInvokeArgs()
    52          {
    53              B = "b-default";
    54          }
    55          public static new FuncWithDefaultValueInvokeArgs Empty => new FuncWithDefaultValueInvokeArgs();
    56      }
    57  
    58  
    59      [OutputType]
    60      public sealed class FuncWithDefaultValueResult
    61      {
    62          public readonly string R;
    63  
    64          [OutputConstructor]
    65          private FuncWithDefaultValueResult(string r)
    66          {
    67              R = r;
    68          }
    69      }
    70  }