All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.communication.kotlin.DomainArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.communication.kotlin

import com.pulumi.azurenative.communication.DomainArgs.builder
import com.pulumi.azurenative.communication.kotlin.enums.DomainManagement
import com.pulumi.azurenative.communication.kotlin.enums.UserEngagementTracking
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 class representing a Domains resource.
 * Azure REST API version: 2023-03-31. Prior API version in Azure Native 1.x: 2021-10-01-preview.
 * Other available API versions: 2022-07-01-preview, 2023-04-01, 2023-04-01-preview, 2023-06-01-preview.
 * Note: If `domainManagement` is set to `AzureManaged`, then `domainName` is required.
 * ## Example Usage
 * ### Create or update Domains resource
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var domain = new AzureNative.Communication.Domain("domain", new()
 *     {
 *         DomainManagement = AzureNative.Communication.DomainManagement.CustomerManaged,
 *         DomainName = "mydomain.com",
 *         EmailServiceName = "MyEmailServiceResource",
 *         Location = "Global",
 *         ResourceGroupName = "MyResourceGroup",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	communication "github.com/pulumi/pulumi-azure-native-sdk/communication/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := communication.NewDomain(ctx, "domain", &communication.DomainArgs{
 * 			DomainManagement:  pulumi.String(communication.DomainManagementCustomerManaged),
 * 			DomainName:        pulumi.String("mydomain.com"),
 * 			EmailServiceName:  pulumi.String("MyEmailServiceResource"),
 * 			Location:          pulumi.String("Global"),
 * 			ResourceGroupName: pulumi.String("MyResourceGroup"),
 * 		})
 * 		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.communication.Domain;
 * import com.pulumi.azurenative.communication.DomainArgs;
 * 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 domain = new Domain("domain", DomainArgs.builder()
 *             .domainManagement("CustomerManaged")
 *             .domainName("mydomain.com")
 *             .emailServiceName("MyEmailServiceResource")
 *             .location("Global")
 *             .resourceGroupName("MyResourceGroup")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:communication:Domain mydomain.com /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}
 * ```
 * @property domainManagement Describes how a Domains resource is being managed.
 * @property domainName The name of the Domains resource.
 * @property emailServiceName The name of the EmailService resource.
 * @property location The geo-location where the resource lives
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property tags Resource tags.
 * @property userEngagementTracking Describes whether user engagement tracking is enabled or disabled.
 */
public data class DomainArgs(
    public val domainManagement: Output>? = null,
    public val domainName: Output? = null,
    public val emailServiceName: Output? = null,
    public val location: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
    public val userEngagementTracking: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.communication.DomainArgs =
        com.pulumi.azurenative.communication.DomainArgs.builder()
            .domainManagement(
                domainManagement?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            )
            .domainName(domainName?.applyValue({ args0 -> args0 }))
            .emailServiceName(emailServiceName?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .userEngagementTracking(
                userEngagementTracking?.applyValue({ args0 ->
                    args0.transform({ args0 ->
                        args0
                    }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            ).build()
}

/**
 * Builder for [DomainArgs].
 */
@PulumiTagMarker
public class DomainArgsBuilder internal constructor() {
    private var domainManagement: Output>? = null

    private var domainName: Output? = null

    private var emailServiceName: Output? = null

    private var location: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    private var userEngagementTracking: Output>? = null

    /**
     * @param value Describes how a Domains resource is being managed.
     */
    @JvmName("tqrsdwqmkumqqvto")
    public suspend fun domainManagement(`value`: Output>) {
        this.domainManagement = value
    }

    /**
     * @param value The name of the Domains resource.
     */
    @JvmName("xittmcvmxpnmoqar")
    public suspend fun domainName(`value`: Output) {
        this.domainName = value
    }

    /**
     * @param value The name of the EmailService resource.
     */
    @JvmName("nwcgjfdrjprpebuv")
    public suspend fun emailServiceName(`value`: Output) {
        this.emailServiceName = value
    }

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("xbrxkpkrwkerqewp")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("xecyvchgilqlxhoa")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("kxtmylylovhawqrp")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Describes whether user engagement tracking is enabled or disabled.
     */
    @JvmName("ovajsrwgcfocmcqb")
    public suspend fun userEngagementTracking(`value`: Output>) {
        this.userEngagementTracking = value
    }

    /**
     * @param value Describes how a Domains resource is being managed.
     */
    @JvmName("yiwruhbkcitbrage")
    public suspend fun domainManagement(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domainManagement = mapped
    }

    /**
     * @param value Describes how a Domains resource is being managed.
     */
    @JvmName("dxbuueglfsmwscan")
    public fun domainManagement(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.domainManagement = mapped
    }

    /**
     * @param value Describes how a Domains resource is being managed.
     */
    @JvmName("lyurvwityqkdhnwy")
    public fun domainManagement(`value`: DomainManagement) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.domainManagement = mapped
    }

    /**
     * @param value The name of the Domains resource.
     */
    @JvmName("oiwkdidwtfgqgbea")
    public suspend fun domainName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domainName = mapped
    }

    /**
     * @param value The name of the EmailService resource.
     */
    @JvmName("mnckhuoxahtownlf")
    public suspend fun emailServiceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.emailServiceName = mapped
    }

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("uveflrxlcoubjewf")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("uwjfxrngwkrwnqfh")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("vkxjwsridsiddrxi")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Resource tags.
     */
    @JvmName("euusfcelcsuhxywq")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Describes whether user engagement tracking is enabled or disabled.
     */
    @JvmName("ftnfbtjkmylssmiw")
    public suspend fun userEngagementTracking(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userEngagementTracking = mapped
    }

    /**
     * @param value Describes whether user engagement tracking is enabled or disabled.
     */
    @JvmName("wkldkeyojtlnmfbs")
    public fun userEngagementTracking(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.userEngagementTracking = mapped
    }

    /**
     * @param value Describes whether user engagement tracking is enabled or disabled.
     */
    @JvmName("ergpiwyacxnplilp")
    public fun userEngagementTracking(`value`: UserEngagementTracking) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.userEngagementTracking = mapped
    }

    internal fun build(): DomainArgs = DomainArgs(
        domainManagement = domainManagement,
        domainName = domainName,
        emailServiceName = emailServiceName,
        location = location,
        resourceGroupName = resourceGroupName,
        tags = tags,
        userEngagementTracking = userEngagementTracking,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy