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.testbase.kotlin.CustomerEventArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.testbase.kotlin
import com.pulumi.azurenative.testbase.CustomerEventArgs.builder
import com.pulumi.azurenative.testbase.kotlin.inputs.NotificationEventReceiverArgs
import com.pulumi.azurenative.testbase.kotlin.inputs.NotificationEventReceiverArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* The Customer Notification Event resource.
* Azure REST API version: 2022-04-01-preview. Prior API version in Azure Native 1.x: 2022-04-01-preview.
* Other available API versions: 2023-11-01-preview.
* ## Example Usage
* ### CustomerEventCreate
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var customerEvent = new AzureNative.TestBase.CustomerEvent("customerEvent", new()
* {
* CustomerEventName = "WeeklySummary",
* EventName = "WeeklySummary",
* Receivers = new[]
* {
* new AzureNative.TestBase.Inputs.NotificationEventReceiverArgs
* {
* ReceiverType = "UserObjects",
* ReceiverValue = new AzureNative.TestBase.Inputs.NotificationReceiverValueArgs
* {
* UserObjectReceiverValue = new AzureNative.TestBase.Inputs.UserObjectReceiverValueArgs
* {
* UserObjectIds = new[]
* {
* "245245245245325",
* "365365365363565",
* },
* },
* },
* },
* new AzureNative.TestBase.Inputs.NotificationEventReceiverArgs
* {
* ReceiverType = "DistributionGroup",
* ReceiverValue = new AzureNative.TestBase.Inputs.NotificationReceiverValueArgs
* {
* DistributionGroupListReceiverValue = new AzureNative.TestBase.Inputs.DistributionGroupListReceiverValueArgs
* {
* DistributionGroups = new[]
* {
* "[email protected] ",
* },
* },
* },
* },
* },
* ResourceGroupName = "contoso-rg1",
* TestBaseAccountName = "contoso-testBaseAccount1",
* });
* });
* ```
* ```go
* package main
* import (
* testbase "github.com/pulumi/pulumi-azure-native-sdk/testbase/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := testbase.NewCustomerEvent(ctx, "customerEvent", &testbase.CustomerEventArgs{
* CustomerEventName: pulumi.String("WeeklySummary"),
* EventName: pulumi.String("WeeklySummary"),
* Receivers: testbase.NotificationEventReceiverArray{
* &testbase.NotificationEventReceiverArgs{
* ReceiverType: pulumi.String("UserObjects"),
* ReceiverValue: &testbase.NotificationReceiverValueArgs{
* UserObjectReceiverValue: &testbase.UserObjectReceiverValueArgs{
* UserObjectIds: pulumi.StringArray{
* pulumi.String("245245245245325"),
* pulumi.String("365365365363565"),
* },
* },
* },
* },
* &testbase.NotificationEventReceiverArgs{
* ReceiverType: pulumi.String("DistributionGroup"),
* ReceiverValue: &testbase.NotificationReceiverValueArgs{
* DistributionGroupListReceiverValue: &testbase.DistributionGroupListReceiverValueArgs{
* DistributionGroups: pulumi.StringArray{
* pulumi.String("[email protected] "),
* },
* },
* },
* },
* },
* ResourceGroupName: pulumi.String("contoso-rg1"),
* TestBaseAccountName: pulumi.String("contoso-testBaseAccount1"),
* })
* 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.testbase.CustomerEvent;
* import com.pulumi.azurenative.testbase.CustomerEventArgs;
* import com.pulumi.azurenative.testbase.inputs.NotificationEventReceiverArgs;
* import com.pulumi.azurenative.testbase.inputs.NotificationReceiverValueArgs;
* import com.pulumi.azurenative.testbase.inputs.UserObjectReceiverValueArgs;
* import com.pulumi.azurenative.testbase.inputs.DistributionGroupListReceiverValueArgs;
* 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 customerEvent = new CustomerEvent("customerEvent", CustomerEventArgs.builder()
* .customerEventName("WeeklySummary")
* .eventName("WeeklySummary")
* .receivers(
* NotificationEventReceiverArgs.builder()
* .receiverType("UserObjects")
* .receiverValue(NotificationReceiverValueArgs.builder()
* .userObjectReceiverValue(UserObjectReceiverValueArgs.builder()
* .userObjectIds(
* "245245245245325",
* "365365365363565")
* .build())
* .build())
* .build(),
* NotificationEventReceiverArgs.builder()
* .receiverType("DistributionGroup")
* .receiverValue(NotificationReceiverValueArgs.builder()
* .distributionGroupListReceiverValue(DistributionGroupListReceiverValueArgs.builder()
* .distributionGroups("[email protected] ")
* .build())
* .build())
* .build())
* .resourceGroupName("contoso-rg1")
* .testBaseAccountName("contoso-testBaseAccount1")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:testbase:CustomerEvent WeeklySummary /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/customerEvents/{customerEventName}
* ```
* @property customerEventName The resource name of the Test Base Customer event.
* @property eventName The name of the event subscribed to.
* @property receivers The notification event receivers.
* @property resourceGroupName The name of the resource group that contains the resource.
* @property testBaseAccountName The resource name of the Test Base Account.
*/
public data class CustomerEventArgs(
public val customerEventName: Output? = null,
public val eventName: Output? = null,
public val receivers: Output>? = null,
public val resourceGroupName: Output? = null,
public val testBaseAccountName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.testbase.CustomerEventArgs =
com.pulumi.azurenative.testbase.CustomerEventArgs.builder()
.customerEventName(customerEventName?.applyValue({ args0 -> args0 }))
.eventName(eventName?.applyValue({ args0 -> args0 }))
.receivers(
receivers?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.testBaseAccountName(testBaseAccountName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [CustomerEventArgs].
*/
@PulumiTagMarker
public class CustomerEventArgsBuilder internal constructor() {
private var customerEventName: Output? = null
private var eventName: Output? = null
private var receivers: Output>? = null
private var resourceGroupName: Output? = null
private var testBaseAccountName: Output? = null
/**
* @param value The resource name of the Test Base Customer event.
*/
@JvmName("maltobeoebveqbrh")
public suspend fun customerEventName(`value`: Output) {
this.customerEventName = value
}
/**
* @param value The name of the event subscribed to.
*/
@JvmName("xbydxnyuuybparff")
public suspend fun eventName(`value`: Output) {
this.eventName = value
}
/**
* @param value The notification event receivers.
*/
@JvmName("pjbiyruafkutvtfu")
public suspend fun receivers(`value`: Output>) {
this.receivers = value
}
@JvmName("xvqlrvkxfsvtllym")
public suspend fun receivers(vararg values: Output) {
this.receivers = Output.all(values.asList())
}
/**
* @param values The notification event receivers.
*/
@JvmName("guohdxtchbggwjhh")
public suspend fun receivers(values: List>) {
this.receivers = Output.all(values)
}
/**
* @param value The name of the resource group that contains the resource.
*/
@JvmName("cwusrgtugifjpopn")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The resource name of the Test Base Account.
*/
@JvmName("uclbxrkghljojtun")
public suspend fun testBaseAccountName(`value`: Output) {
this.testBaseAccountName = value
}
/**
* @param value The resource name of the Test Base Customer event.
*/
@JvmName("okkontocoiyesojp")
public suspend fun customerEventName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.customerEventName = mapped
}
/**
* @param value The name of the event subscribed to.
*/
@JvmName("iqljxruarpaccyff")
public suspend fun eventName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.eventName = mapped
}
/**
* @param value The notification event receivers.
*/
@JvmName("entqervayaknncmb")
public suspend fun receivers(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.receivers = mapped
}
/**
* @param argument The notification event receivers.
*/
@JvmName("toojipkavkalbuqy")
public suspend fun receivers(argument: List Unit>) {
val toBeMapped = argument.toList().map {
NotificationEventReceiverArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.receivers = mapped
}
/**
* @param argument The notification event receivers.
*/
@JvmName("trwltjabveymirvj")
public suspend fun receivers(vararg argument: suspend NotificationEventReceiverArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
NotificationEventReceiverArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.receivers = mapped
}
/**
* @param argument The notification event receivers.
*/
@JvmName("skdhyncjmflvaopv")
public suspend fun receivers(argument: suspend NotificationEventReceiverArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
NotificationEventReceiverArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.receivers = mapped
}
/**
* @param values The notification event receivers.
*/
@JvmName("etvqwdeetyatwstd")
public suspend fun receivers(vararg values: NotificationEventReceiverArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.receivers = mapped
}
/**
* @param value The name of the resource group that contains the resource.
*/
@JvmName("hpnwikxvqhrvooua")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The resource name of the Test Base Account.
*/
@JvmName("hatbdxdtqrhvrqkx")
public suspend fun testBaseAccountName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.testBaseAccountName = mapped
}
internal fun build(): CustomerEventArgs = CustomerEventArgs(
customerEventName = customerEventName,
eventName = eventName,
receivers = receivers,
resourceGroupName = resourceGroupName,
testBaseAccountName = testBaseAccountName,
)
}