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

com.pulumi.azurenative.customerinsights.kotlin.RelationshipLinkArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.customerinsights.kotlin

import com.pulumi.azurenative.customerinsights.RelationshipLinkArgs.builder
import com.pulumi.azurenative.customerinsights.kotlin.inputs.ParticipantProfilePropertyReferenceArgs
import com.pulumi.azurenative.customerinsights.kotlin.inputs.ParticipantProfilePropertyReferenceArgsBuilder
import com.pulumi.azurenative.customerinsights.kotlin.inputs.RelationshipLinkFieldMappingArgs
import com.pulumi.azurenative.customerinsights.kotlin.inputs.RelationshipLinkFieldMappingArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * The relationship link resource format.
 * Azure REST API version: 2017-04-26. Prior API version in Azure Native 1.x: 2017-04-26.
 * Other available API versions: 2017-01-01.
 * ## Example Usage
 * ### RelationshipLinks_CreateOrUpdate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var relationshipLink = new AzureNative.CustomerInsights.RelationshipLink("relationshipLink", new()
 *     {
 *         Description =
 *         {
 *             { "en-us", "Link Description" },
 *         },
 *         DisplayName =
 *         {
 *             { "en-us", "Link DisplayName" },
 *         },
 *         HubName = "sdkTestHub",
 *         InteractionType = "testInteraction4332",
 *         ProfilePropertyReferences = new[]
 *         {
 *             new AzureNative.CustomerInsights.Inputs.ParticipantProfilePropertyReferenceArgs
 *             {
 *                 InteractionPropertyName = "profile1",
 *                 ProfilePropertyName = "ProfileId",
 *             },
 *         },
 *         RelatedProfilePropertyReferences = new[]
 *         {
 *             new AzureNative.CustomerInsights.Inputs.ParticipantProfilePropertyReferenceArgs
 *             {
 *                 InteractionPropertyName = "profile1",
 *                 ProfilePropertyName = "ProfileId",
 *             },
 *         },
 *         RelationshipLinkName = "Somelink",
 *         RelationshipName = "testProfile2326994",
 *         ResourceGroupName = "TestHubRG",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	customerinsights "github.com/pulumi/pulumi-azure-native-sdk/customerinsights/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := customerinsights.NewRelationshipLink(ctx, "relationshipLink", &customerinsights.RelationshipLinkArgs{
 * 			Description: pulumi.StringMap{
 * 				"en-us": pulumi.String("Link Description"),
 * 			},
 * 			DisplayName: pulumi.StringMap{
 * 				"en-us": pulumi.String("Link DisplayName"),
 * 			},
 * 			HubName:         pulumi.String("sdkTestHub"),
 * 			InteractionType: pulumi.String("testInteraction4332"),
 * 			ProfilePropertyReferences: customerinsights.ParticipantProfilePropertyReferenceArray{
 * 				&customerinsights.ParticipantProfilePropertyReferenceArgs{
 * 					InteractionPropertyName: pulumi.String("profile1"),
 * 					ProfilePropertyName:     pulumi.String("ProfileId"),
 * 				},
 * 			},
 * 			RelatedProfilePropertyReferences: customerinsights.ParticipantProfilePropertyReferenceArray{
 * 				&customerinsights.ParticipantProfilePropertyReferenceArgs{
 * 					InteractionPropertyName: pulumi.String("profile1"),
 * 					ProfilePropertyName:     pulumi.String("ProfileId"),
 * 				},
 * 			},
 * 			RelationshipLinkName: pulumi.String("Somelink"),
 * 			RelationshipName:     pulumi.String("testProfile2326994"),
 * 			ResourceGroupName:    pulumi.String("TestHubRG"),
 * 		})
 * 		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.customerinsights.RelationshipLink;
 * import com.pulumi.azurenative.customerinsights.RelationshipLinkArgs;
 * import com.pulumi.azurenative.customerinsights.inputs.ParticipantProfilePropertyReferenceArgs;
 * 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 relationshipLink = new RelationshipLink("relationshipLink", RelationshipLinkArgs.builder()
 *             .description(Map.of("en-us", "Link Description"))
 *             .displayName(Map.of("en-us", "Link DisplayName"))
 *             .hubName("sdkTestHub")
 *             .interactionType("testInteraction4332")
 *             .profilePropertyReferences(ParticipantProfilePropertyReferenceArgs.builder()
 *                 .interactionPropertyName("profile1")
 *                 .profilePropertyName("ProfileId")
 *                 .build())
 *             .relatedProfilePropertyReferences(ParticipantProfilePropertyReferenceArgs.builder()
 *                 .interactionPropertyName("profile1")
 *                 .profilePropertyName("ProfileId")
 *                 .build())
 *             .relationshipLinkName("Somelink")
 *             .relationshipName("testProfile2326994")
 *             .resourceGroupName("TestHubRG")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:customerinsights:RelationshipLink sdkTestHub/Somelink /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationshipLinks/{relationshipLinkName}
 * ```
 * @property description Localized descriptions for the Relationship Link.
 * @property displayName Localized display name for the Relationship Link.
 * @property hubName The name of the hub.
 * @property interactionType The InteractionType associated with the Relationship Link.
 * @property mappings The mappings between Interaction and Relationship fields.
 * @property profilePropertyReferences The property references for the Profile of the Relationship.
 * @property relatedProfilePropertyReferences The property references for the Related Profile of the Relationship.
 * @property relationshipLinkName The name of the relationship link.
 * @property relationshipName The Relationship associated with the Link.
 * @property resourceGroupName The name of the resource group.
 */
public data class RelationshipLinkArgs(
    public val description: Output>? = null,
    public val displayName: Output>? = null,
    public val hubName: Output? = null,
    public val interactionType: Output? = null,
    public val mappings: Output>? = null,
    public val profilePropertyReferences: Output>? =
        null,
    public val relatedProfilePropertyReferences: Output>? = null,
    public val relationshipLinkName: Output? = null,
    public val relationshipName: Output? = null,
    public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.customerinsights.RelationshipLinkArgs =
        com.pulumi.azurenative.customerinsights.RelationshipLinkArgs.builder()
            .description(
                description?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .displayName(
                displayName?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .hubName(hubName?.applyValue({ args0 -> args0 }))
            .interactionType(interactionType?.applyValue({ args0 -> args0 }))
            .mappings(
                mappings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .profilePropertyReferences(
                profilePropertyReferences?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .relatedProfilePropertyReferences(
                relatedProfilePropertyReferences?.applyValue({ args0 ->
                    args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .relationshipLinkName(relationshipLinkName?.applyValue({ args0 -> args0 }))
            .relationshipName(relationshipName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}

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

    private var displayName: Output>? = null

    private var hubName: Output? = null

    private var interactionType: Output? = null

    private var mappings: Output>? = null

    private var profilePropertyReferences: Output>? =
        null

    private var relatedProfilePropertyReferences:
        Output>? = null

    private var relationshipLinkName: Output? = null

    private var relationshipName: Output? = null

    private var resourceGroupName: Output? = null

    /**
     * @param value Localized descriptions for the Relationship Link.
     */
    @JvmName("sscbihiwbbyoobyt")
    public suspend fun description(`value`: Output>) {
        this.description = value
    }

    /**
     * @param value Localized display name for the Relationship Link.
     */
    @JvmName("gdpddsfyivladoxw")
    public suspend fun displayName(`value`: Output>) {
        this.displayName = value
    }

    /**
     * @param value The name of the hub.
     */
    @JvmName("yabeoltffygpetnt")
    public suspend fun hubName(`value`: Output) {
        this.hubName = value
    }

    /**
     * @param value The InteractionType associated with the Relationship Link.
     */
    @JvmName("vgjpyxrdupydafte")
    public suspend fun interactionType(`value`: Output) {
        this.interactionType = value
    }

    /**
     * @param value The mappings between Interaction and Relationship fields.
     */
    @JvmName("ouusrcbudivpvqaf")
    public suspend fun mappings(`value`: Output>) {
        this.mappings = value
    }

    @JvmName("qtoaqvfphhceqefe")
    public suspend fun mappings(vararg values: Output) {
        this.mappings = Output.all(values.asList())
    }

    /**
     * @param values The mappings between Interaction and Relationship fields.
     */
    @JvmName("ajnvogksmfaypllv")
    public suspend fun mappings(values: List>) {
        this.mappings = Output.all(values)
    }

    /**
     * @param value The property references for the Profile of the Relationship.
     */
    @JvmName("bqkluixskrmyvjvm")
    public suspend fun profilePropertyReferences(`value`: Output>) {
        this.profilePropertyReferences = value
    }

    @JvmName("fsscdhjtrhljtlak")
    public suspend fun profilePropertyReferences(vararg values: Output) {
        this.profilePropertyReferences = Output.all(values.asList())
    }

    /**
     * @param values The property references for the Profile of the Relationship.
     */
    @JvmName("rmjhigbbfktxaeus")
    public suspend fun profilePropertyReferences(values: List>) {
        this.profilePropertyReferences = Output.all(values)
    }

    /**
     * @param value The property references for the Related Profile of the Relationship.
     */
    @JvmName("rutowhsbostfwkmj")
    public suspend fun relatedProfilePropertyReferences(`value`: Output>) {
        this.relatedProfilePropertyReferences = value
    }

    @JvmName("luorvrfokachupjp")
    public suspend fun relatedProfilePropertyReferences(vararg values: Output) {
        this.relatedProfilePropertyReferences = Output.all(values.asList())
    }

    /**
     * @param values The property references for the Related Profile of the Relationship.
     */
    @JvmName("udiebuaeottfndyi")
    public suspend fun relatedProfilePropertyReferences(values: List>) {
        this.relatedProfilePropertyReferences = Output.all(values)
    }

    /**
     * @param value The name of the relationship link.
     */
    @JvmName("sixcnldrbkiuvjbc")
    public suspend fun relationshipLinkName(`value`: Output) {
        this.relationshipLinkName = value
    }

    /**
     * @param value The Relationship associated with the Link.
     */
    @JvmName("ykhxuvkushqkieiw")
    public suspend fun relationshipName(`value`: Output) {
        this.relationshipName = value
    }

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

    /**
     * @param value Localized descriptions for the Relationship Link.
     */
    @JvmName("vhotcpajcpqjevef")
    public suspend fun description(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param values Localized descriptions for the Relationship Link.
     */
    @JvmName("qnjrdvqeiofraxpc")
    public fun description(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Localized display name for the Relationship Link.
     */
    @JvmName("lqhtbkvfnxalojhj")
    public suspend fun displayName(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param values Localized display name for the Relationship Link.
     */
    @JvmName("mgmdcxpgmxbykbga")
    public fun displayName(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

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

    /**
     * @param value The InteractionType associated with the Relationship Link.
     */
    @JvmName("papnbfueqrpljtxu")
    public suspend fun interactionType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.interactionType = mapped
    }

    /**
     * @param value The mappings between Interaction and Relationship fields.
     */
    @JvmName("gputexxqmhyvjnjt")
    public suspend fun mappings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mappings = mapped
    }

    /**
     * @param argument The mappings between Interaction and Relationship fields.
     */
    @JvmName("wbcnbptkadadtqct")
    public suspend fun mappings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RelationshipLinkFieldMappingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.mappings = mapped
    }

    /**
     * @param argument The mappings between Interaction and Relationship fields.
     */
    @JvmName("hqkclsmhlvfnbpix")
    public suspend fun mappings(vararg argument: suspend RelationshipLinkFieldMappingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RelationshipLinkFieldMappingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.mappings = mapped
    }

    /**
     * @param argument The mappings between Interaction and Relationship fields.
     */
    @JvmName("auhdeisohswsghvw")
    public suspend fun mappings(argument: suspend RelationshipLinkFieldMappingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RelationshipLinkFieldMappingArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.mappings = mapped
    }

    /**
     * @param values The mappings between Interaction and Relationship fields.
     */
    @JvmName("rkudsneermalxabt")
    public suspend fun mappings(vararg values: RelationshipLinkFieldMappingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mappings = mapped
    }

    /**
     * @param value The property references for the Profile of the Relationship.
     */
    @JvmName("mnildyqkkklnrrwg")
    public suspend fun profilePropertyReferences(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.profilePropertyReferences = mapped
    }

    /**
     * @param argument The property references for the Profile of the Relationship.
     */
    @JvmName("bddkqkaxelhpdgkx")
    public suspend fun profilePropertyReferences(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ParticipantProfilePropertyReferenceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.profilePropertyReferences = mapped
    }

    /**
     * @param argument The property references for the Profile of the Relationship.
     */
    @JvmName("mgwdrlvmkbxptkfa")
    public suspend fun profilePropertyReferences(vararg argument: suspend ParticipantProfilePropertyReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ParticipantProfilePropertyReferenceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.profilePropertyReferences = mapped
    }

    /**
     * @param argument The property references for the Profile of the Relationship.
     */
    @JvmName("germbtowmxpebpbb")
    public suspend fun profilePropertyReferences(argument: suspend ParticipantProfilePropertyReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ParticipantProfilePropertyReferenceArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.profilePropertyReferences = mapped
    }

    /**
     * @param values The property references for the Profile of the Relationship.
     */
    @JvmName("kpwwmvntmnuoexke")
    public suspend fun profilePropertyReferences(vararg values: ParticipantProfilePropertyReferenceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.profilePropertyReferences = mapped
    }

    /**
     * @param value The property references for the Related Profile of the Relationship.
     */
    @JvmName("yveaahaxyctygvry")
    public suspend fun relatedProfilePropertyReferences(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.relatedProfilePropertyReferences = mapped
    }

    /**
     * @param argument The property references for the Related Profile of the Relationship.
     */
    @JvmName("mhdpmqkncleiitmi")
    public suspend fun relatedProfilePropertyReferences(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ParticipantProfilePropertyReferenceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.relatedProfilePropertyReferences = mapped
    }

    /**
     * @param argument The property references for the Related Profile of the Relationship.
     */
    @JvmName("gdlewjkmtguywlsp")
    public suspend fun relatedProfilePropertyReferences(vararg argument: suspend ParticipantProfilePropertyReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ParticipantProfilePropertyReferenceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.relatedProfilePropertyReferences = mapped
    }

    /**
     * @param argument The property references for the Related Profile of the Relationship.
     */
    @JvmName("bnqlhikaamnkcbpp")
    public suspend fun relatedProfilePropertyReferences(argument: suspend ParticipantProfilePropertyReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ParticipantProfilePropertyReferenceArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.relatedProfilePropertyReferences = mapped
    }

    /**
     * @param values The property references for the Related Profile of the Relationship.
     */
    @JvmName("yalcdvofucwgbewk")
    public suspend fun relatedProfilePropertyReferences(vararg values: ParticipantProfilePropertyReferenceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.relatedProfilePropertyReferences = mapped
    }

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

    /**
     * @param value The Relationship associated with the Link.
     */
    @JvmName("ifktimrgfaybdyts")
    public suspend fun relationshipName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.relationshipName = mapped
    }

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

    internal fun build(): RelationshipLinkArgs = RelationshipLinkArgs(
        description = description,
        displayName = displayName,
        hubName = hubName,
        interactionType = interactionType,
        mappings = mappings,
        profilePropertyReferences = profilePropertyReferences,
        relatedProfilePropertyReferences = relatedProfilePropertyReferences,
        relationshipLinkName = relationshipLinkName,
        relationshipName = relationshipName,
        resourceGroupName = resourceGroupName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy