All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.voiceservices.kotlin.TestLineArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.voiceservices.kotlin
import com.pulumi.azurenative.voiceservices.TestLineArgs.builder
import com.pulumi.azurenative.voiceservices.kotlin.enums.TestLinePurpose
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* A TestLine resource
* Azure REST API version: 2023-04-03. Prior API version in Azure Native 1.x: 2022-12-01-preview.
* Other available API versions: 2022-12-01-preview, 2023-09-01.
* ## Example Usage
* ### CreateTestLineResource
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var testLine = new AzureNative.VoiceServices.TestLine("testLine", new()
* {
* CommunicationsGatewayName = "myname",
* Location = "useast",
* PhoneNumber = "+1-555-1234",
* Purpose = AzureNative.VoiceServices.TestLinePurpose.Automated,
* ResourceGroupName = "testrg",
* TestLineName = "myline",
* });
* });
* ```
* ```go
* package main
* import (
* voiceservices "github.com/pulumi/pulumi-azure-native-sdk/voiceservices/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := voiceservices.NewTestLine(ctx, "testLine", &voiceservices.TestLineArgs{
* CommunicationsGatewayName: pulumi.String("myname"),
* Location: pulumi.String("useast"),
* PhoneNumber: pulumi.String("+1-555-1234"),
* Purpose: pulumi.String(voiceservices.TestLinePurposeAutomated),
* ResourceGroupName: pulumi.String("testrg"),
* TestLineName: pulumi.String("myline"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.voiceservices.TestLine;
* import com.pulumi.azurenative.voiceservices.TestLineArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var testLine = new TestLine("testLine", TestLineArgs.builder()
* .communicationsGatewayName("myname")
* .location("useast")
* .phoneNumber("+1-555-1234")
* .purpose("Automated")
* .resourceGroupName("testrg")
* .testLineName("myline")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:voiceservices:TestLine myline /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/testLines/{testLineName}
* ```
* @property communicationsGatewayName Unique identifier for this deployment
* @property location The geo-location where the resource lives
* @property phoneNumber The phone number
* @property purpose Purpose of this test line, e.g. automated or manual testing
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property tags Resource tags.
* @property testLineName Unique identifier for this test line
*/
public data class TestLineArgs(
public val communicationsGatewayName: Output? = null,
public val location: Output? = null,
public val phoneNumber: Output? = null,
public val purpose: Output>? = null,
public val resourceGroupName: Output? = null,
public val tags: Output>? = null,
public val testLineName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.voiceservices.TestLineArgs =
com.pulumi.azurenative.voiceservices.TestLineArgs.builder()
.communicationsGatewayName(communicationsGatewayName?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.phoneNumber(phoneNumber?.applyValue({ args0 -> args0 }))
.purpose(
purpose?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.testLineName(testLineName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [TestLineArgs].
*/
@PulumiTagMarker
public class TestLineArgsBuilder internal constructor() {
private var communicationsGatewayName: Output? = null
private var location: Output? = null
private var phoneNumber: Output? = null
private var purpose: Output>? = null
private var resourceGroupName: Output? = null
private var tags: Output>? = null
private var testLineName: Output? = null
/**
* @param value Unique identifier for this deployment
*/
@JvmName("pirvidkfohaehhny")
public suspend fun communicationsGatewayName(`value`: Output) {
this.communicationsGatewayName = value
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("xyykjuxmfecqpvpn")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The phone number
*/
@JvmName("rqxrpdcblmjcfaod")
public suspend fun phoneNumber(`value`: Output) {
this.phoneNumber = value
}
/**
* @param value Purpose of this test line, e.g. automated or manual testing
*/
@JvmName("gipokduiicmjywau")
public suspend fun purpose(`value`: Output>) {
this.purpose = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("goqcyoysheicfive")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Resource tags.
*/
@JvmName("rdaalaufqxiytxfw")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value Unique identifier for this test line
*/
@JvmName("hlwprwojvfqostxq")
public suspend fun testLineName(`value`: Output) {
this.testLineName = value
}
/**
* @param value Unique identifier for this deployment
*/
@JvmName("rbsgdfignvyjmmdb")
public suspend fun communicationsGatewayName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.communicationsGatewayName = mapped
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("ucxmfotbhhqcaiir")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The phone number
*/
@JvmName("valqatnhuggxqdvr")
public suspend fun phoneNumber(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.phoneNumber = mapped
}
/**
* @param value Purpose of this test line, e.g. automated or manual testing
*/
@JvmName("xnstbhidphqkqjig")
public suspend fun purpose(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.purpose = mapped
}
/**
* @param value Purpose of this test line, e.g. automated or manual testing
*/
@JvmName("dgkqrytuigbrlybd")
public fun purpose(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.purpose = mapped
}
/**
* @param value Purpose of this test line, e.g. automated or manual testing
*/
@JvmName("porhdjroofudmehe")
public fun purpose(`value`: TestLinePurpose) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.purpose = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("ospiwrlheqljyhmv")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value Resource tags.
*/
@JvmName("fhtbujhewutxgxcx")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Resource tags.
*/
@JvmName("aooidiusuwvldykm")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value Unique identifier for this test line
*/
@JvmName("tbamwlhiybxuaqcc")
public suspend fun testLineName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.testLineName = mapped
}
internal fun build(): TestLineArgs = TestLineArgs(
communicationsGatewayName = communicationsGatewayName,
location = location,
phoneNumber = phoneNumber,
purpose = purpose,
resourceGroupName = resourceGroupName,
tags = tags,
testLineName = testLineName,
)
}