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

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

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.customerinsights.kotlin

import com.pulumi.azurenative.customerinsights.RelationshipArgs.builder
import com.pulumi.azurenative.customerinsights.kotlin.enums.CardinalityTypes
import com.pulumi.azurenative.customerinsights.kotlin.inputs.PropertyDefinitionArgs
import com.pulumi.azurenative.customerinsights.kotlin.inputs.PropertyDefinitionArgsBuilder
import com.pulumi.azurenative.customerinsights.kotlin.inputs.RelationshipTypeMappingArgs
import com.pulumi.azurenative.customerinsights.kotlin.inputs.RelationshipTypeMappingArgsBuilder
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 resource format.
 * Azure REST API version: 2017-04-26. Prior API version in Azure Native 1.x: 2017-04-26.
 * ## Example Usage
 * ### Relationships_CreateOrUpdate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var relationship = new AzureNative.CustomerInsights.Relationship("relationship", new()
 *     {
 *         Cardinality = AzureNative.CustomerInsights.CardinalityTypes.OneToOne,
 *         Description =
 *         {
 *             { "en-us", "Relationship Description" },
 *         },
 *         DisplayName =
 *         {
 *             { "en-us", "Relationship DisplayName" },
 *         },
 *         Fields = new[] {},
 *         HubName = "sdkTestHub",
 *         ProfileType = "testProfile2326994",
 *         RelatedProfileType = "testProfile2326994",
 *         RelationshipName = "SomeRelationship",
 *         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.NewRelationship(ctx, "relationship", &customerinsights.RelationshipArgs{
 * 			Cardinality: customerinsights.CardinalityTypesOneToOne,
 * 			Description: pulumi.StringMap{
 * 				"en-us": pulumi.String("Relationship Description"),
 * 			},
 * 			DisplayName: pulumi.StringMap{
 * 				"en-us": pulumi.String("Relationship DisplayName"),
 * 			},
 * 			Fields:             customerinsights.PropertyDefinitionArray{},
 * 			HubName:            pulumi.String("sdkTestHub"),
 * 			ProfileType:        pulumi.String("testProfile2326994"),
 * 			RelatedProfileType: pulumi.String("testProfile2326994"),
 * 			RelationshipName:   pulumi.String("SomeRelationship"),
 * 			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.Relationship;
 * import com.pulumi.azurenative.customerinsights.RelationshipArgs;
 * 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 relationship = new Relationship("relationship", RelationshipArgs.builder()
 *             .cardinality("OneToOne")
 *             .description(Map.of("en-us", "Relationship Description"))
 *             .displayName(Map.of("en-us", "Relationship DisplayName"))
 *             .fields()
 *             .hubName("sdkTestHub")
 *             .profileType("testProfile2326994")
 *             .relatedProfileType("testProfile2326994")
 *             .relationshipName("SomeRelationship")
 *             .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:Relationship sdkTestHub/testProfile2326994 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationships/{relationshipName}
 * ```
 * @property cardinality The Relationship Cardinality.
 * @property description Localized descriptions for the Relationship.
 * @property displayName Localized display name for the Relationship.
 * @property expiryDateTimeUtc The expiry date time in UTC.
 * @property fields The properties of the Relationship.
 * @property hubName The name of the hub.
 * @property lookupMappings Optional property to be used to map fields in profile to their strong ids in related profile.
 * @property profileType Profile type.
 * @property relatedProfileType Related profile being referenced.
 * @property relationshipName The name of the Relationship.
 * @property resourceGroupName The name of the resource group.
 */
public data class RelationshipArgs(
    public val cardinality: Output? = null,
    public val description: Output>? = null,
    public val displayName: Output>? = null,
    public val expiryDateTimeUtc: Output? = null,
    public val fields: Output>? = null,
    public val hubName: Output? = null,
    public val lookupMappings: Output>? = null,
    public val profileType: Output? = null,
    public val relatedProfileType: Output? = null,
    public val relationshipName: Output? = null,
    public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.customerinsights.RelationshipArgs =
        com.pulumi.azurenative.customerinsights.RelationshipArgs.builder()
            .cardinality(cardinality?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .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()
                }),
            )
            .expiryDateTimeUtc(expiryDateTimeUtc?.applyValue({ args0 -> args0 }))
            .fields(fields?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .hubName(hubName?.applyValue({ args0 -> args0 }))
            .lookupMappings(
                lookupMappings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .profileType(profileType?.applyValue({ args0 -> args0 }))
            .relatedProfileType(relatedProfileType?.applyValue({ args0 -> args0 }))
            .relationshipName(relationshipName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [RelationshipArgs].
 */
@PulumiTagMarker
public class RelationshipArgsBuilder internal constructor() {
    private var cardinality: Output? = null

    private var description: Output>? = null

    private var displayName: Output>? = null

    private var expiryDateTimeUtc: Output? = null

    private var fields: Output>? = null

    private var hubName: Output? = null

    private var lookupMappings: Output>? = null

    private var profileType: Output? = null

    private var relatedProfileType: Output? = null

    private var relationshipName: Output? = null

    private var resourceGroupName: Output? = null

    /**
     * @param value The Relationship Cardinality.
     */
    @JvmName("ovrfniroqndwfrsx")
    public suspend fun cardinality(`value`: Output) {
        this.cardinality = value
    }

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

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

    /**
     * @param value The expiry date time in UTC.
     */
    @JvmName("xdssmxduofxdvlem")
    public suspend fun expiryDateTimeUtc(`value`: Output) {
        this.expiryDateTimeUtc = value
    }

    /**
     * @param value The properties of the Relationship.
     */
    @JvmName("hisjcreeshxqehgd")
    public suspend fun fields(`value`: Output>) {
        this.fields = value
    }

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

    /**
     * @param values The properties of the Relationship.
     */
    @JvmName("wpntndhsihmtatlj")
    public suspend fun fields(values: List>) {
        this.fields = Output.all(values)
    }

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

    /**
     * @param value Optional property to be used to map fields in profile to their strong ids in related profile.
     */
    @JvmName("lpvfktvhsgcnhrfb")
    public suspend fun lookupMappings(`value`: Output>) {
        this.lookupMappings = value
    }

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

    /**
     * @param values Optional property to be used to map fields in profile to their strong ids in related profile.
     */
    @JvmName("mmbefimkxiyakllf")
    public suspend fun lookupMappings(values: List>) {
        this.lookupMappings = Output.all(values)
    }

    /**
     * @param value Profile type.
     */
    @JvmName("tpevuemipejgonvn")
    public suspend fun profileType(`value`: Output) {
        this.profileType = value
    }

    /**
     * @param value Related profile being referenced.
     */
    @JvmName("enrnwnumfwsbuvjj")
    public suspend fun relatedProfileType(`value`: Output) {
        this.relatedProfileType = value
    }

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

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

    /**
     * @param value The Relationship Cardinality.
     */
    @JvmName("fplmjrfwwvfyiool")
    public suspend fun cardinality(`value`: CardinalityTypes?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cardinality = mapped
    }

    /**
     * @param value Localized descriptions for the Relationship.
     */
    @JvmName("iytuhjsmpbrllcoo")
    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.
     */
    @JvmName("oulbahoostplrnem")
    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.
     */
    @JvmName("nkiqpongwrlbxtce")
    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.
     */
    @JvmName("hpbdyfmpmnfwdivc")
    public fun displayName(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value The expiry date time in UTC.
     */
    @JvmName("nqqowpouwinpgucs")
    public suspend fun expiryDateTimeUtc(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expiryDateTimeUtc = mapped
    }

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

    /**
     * @param argument The properties of the Relationship.
     */
    @JvmName("wblbkaxfqntotbkw")
    public suspend fun fields(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PropertyDefinitionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.fields = mapped
    }

    /**
     * @param argument The properties of the Relationship.
     */
    @JvmName("jppsjedrbtpiyydq")
    public suspend fun fields(vararg argument: suspend PropertyDefinitionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            PropertyDefinitionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.fields = mapped
    }

    /**
     * @param argument The properties of the Relationship.
     */
    @JvmName("luksobqhvwiimkjv")
    public suspend fun fields(argument: suspend PropertyDefinitionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(PropertyDefinitionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.fields = mapped
    }

    /**
     * @param values The properties of the Relationship.
     */
    @JvmName("igjweutrxloymupp")
    public suspend fun fields(vararg values: PropertyDefinitionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.fields = mapped
    }

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

    /**
     * @param value Optional property to be used to map fields in profile to their strong ids in related profile.
     */
    @JvmName("ajolgvpsqoaydkgx")
    public suspend fun lookupMappings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lookupMappings = mapped
    }

    /**
     * @param argument Optional property to be used to map fields in profile to their strong ids in related profile.
     */
    @JvmName("nwochlokjshxvifa")
    public suspend fun lookupMappings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RelationshipTypeMappingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.lookupMappings = mapped
    }

    /**
     * @param argument Optional property to be used to map fields in profile to their strong ids in related profile.
     */
    @JvmName("vbotvryfoovuqggo")
    public suspend fun lookupMappings(vararg argument: suspend RelationshipTypeMappingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RelationshipTypeMappingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.lookupMappings = mapped
    }

    /**
     * @param argument Optional property to be used to map fields in profile to their strong ids in related profile.
     */
    @JvmName("ppxmuleynenlisqi")
    public suspend fun lookupMappings(argument: suspend RelationshipTypeMappingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RelationshipTypeMappingArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.lookupMappings = mapped
    }

    /**
     * @param values Optional property to be used to map fields in profile to their strong ids in related profile.
     */
    @JvmName("teotyutcxlydwpmy")
    public suspend fun lookupMappings(vararg values: RelationshipTypeMappingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.lookupMappings = mapped
    }

    /**
     * @param value Profile type.
     */
    @JvmName("fdaruqxngatxkugi")
    public suspend fun profileType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.profileType = mapped
    }

    /**
     * @param value Related profile being referenced.
     */
    @JvmName("uiutbwwgrcexpelf")
    public suspend fun relatedProfileType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.relatedProfileType = mapped
    }

    /**
     * @param value The name of the Relationship.
     */
    @JvmName("onbuhgujncipbutj")
    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("ippaiupenrnqifps")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    internal fun build(): RelationshipArgs = RelationshipArgs(
        cardinality = cardinality,
        description = description,
        displayName = displayName,
        expiryDateTimeUtc = expiryDateTimeUtc,
        fields = fields,
        hubName = hubName,
        lookupMappings = lookupMappings,
        profileType = profileType,
        relatedProfileType = relatedProfileType,
        relationshipName = relationshipName,
        resourceGroupName = resourceGroupName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy