pulumi/tests/testdata/codegen/simplified-invokes/dotnet/AbsMultiArgs.cs

54 lines
2.1 KiB
C#

// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.Std
{
public static class AbsMultiArgs
{
/// <summary>
/// Returns the absolute value of a given float.
/// Example: abs(1) returns 1, and abs(-1) would also return 1, whereas abs(-3.14) would return 3.14.
/// </summary>
public static async Task<AbsMultiArgsResult> InvokeAsync(double a, double? b = null, InvokeOptions? invokeOptions = null)
{
var builder = ImmutableDictionary.CreateBuilder<string, object?>();
builder["a"] = a;
builder["b"] = b;
var args = new global::Pulumi.DictionaryInvokeArgs(builder.ToImmutableDictionary());
return await global::Pulumi.Deployment.Instance.InvokeAsync<AbsMultiArgsResult>("std:index:AbsMultiArgs", args, invokeOptions.WithDefaults());
}
/// <summary>
/// Returns the absolute value of a given float.
/// Example: abs(1) returns 1, and abs(-1) would also return 1, whereas abs(-3.14) would return 3.14.
/// </summary>
public static Output<AbsMultiArgsResult> Invoke(Input<double> a, Input<double?>? b = null, InvokeOptions? invokeOptions = null)
{
var builder = ImmutableDictionary.CreateBuilder<string, object?>();
builder["a"] = a;
builder["b"] = b;
var args = new global::Pulumi.DictionaryInvokeArgs(builder.ToImmutableDictionary());
return global::Pulumi.Deployment.Instance.Invoke<AbsMultiArgsResult>("std:index:AbsMultiArgs", args, invokeOptions.WithDefaults());
}
}
[OutputType]
public sealed class AbsMultiArgsResult
{
public readonly double Result;
[OutputConstructor]
private AbsMultiArgsResult(double result)
{
Result = result;
}
}
}