github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/functions-secrets/dotnet/FuncWithSecrets.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 FuncWithSecrets 13 { 14 public static Task<FuncWithSecretsResult> InvokeAsync(FuncWithSecretsArgs args, InvokeOptions? options = null) 15 => global::Pulumi.Deployment.Instance.InvokeAsync<FuncWithSecretsResult>("mypkg::funcWithSecrets", args ?? new FuncWithSecretsArgs(), options.WithDefaults()); 16 17 public static Output<FuncWithSecretsResult> Invoke(FuncWithSecretsInvokeArgs args, InvokeOptions? options = null) 18 => global::Pulumi.Deployment.Instance.Invoke<FuncWithSecretsResult>("mypkg::funcWithSecrets", args ?? new FuncWithSecretsInvokeArgs(), options.WithDefaults()); 19 } 20 21 22 public sealed class FuncWithSecretsArgs : global::Pulumi.InvokeArgs 23 { 24 [Input("cryptoKey", required: true)] 25 public string CryptoKey { get; set; } = null!; 26 27 [Input("plaintext", required: true)] 28 private string? _plaintext; 29 public string? Plaintext 30 { 31 get => _plaintext; 32 set => _plaintext = value; 33 } 34 35 public FuncWithSecretsArgs() 36 { 37 } 38 public static new FuncWithSecretsArgs Empty => new FuncWithSecretsArgs(); 39 } 40 41 public sealed class FuncWithSecretsInvokeArgs : global::Pulumi.InvokeArgs 42 { 43 [Input("cryptoKey", required: true)] 44 public Input<string> CryptoKey { get; set; } = null!; 45 46 [Input("plaintext", required: true)] 47 private Input<string>? _plaintext; 48 public Input<string>? Plaintext 49 { 50 get => _plaintext; 51 set 52 { 53 var emptySecret = Output.CreateSecret(0); 54 _plaintext = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1); 55 } 56 } 57 58 public FuncWithSecretsInvokeArgs() 59 { 60 } 61 public static new FuncWithSecretsInvokeArgs Empty => new FuncWithSecretsInvokeArgs(); 62 } 63 64 65 [OutputType] 66 public sealed class FuncWithSecretsResult 67 { 68 public readonly string Ciphertext; 69 public readonly string CryptoKey; 70 public readonly string Id; 71 public readonly string Plaintext; 72 73 [OutputConstructor] 74 private FuncWithSecretsResult( 75 string ciphertext, 76 77 string cryptoKey, 78 79 string id, 80 81 string plaintext) 82 { 83 Ciphertext = ciphertext; 84 CryptoKey = cryptoKey; 85 Id = id; 86 Plaintext = plaintext; 87 } 88 } 89 }