io.cloudshiftdev.awscdk.services.iotwireless.CfnDestinationProps.kt Maven / Gradle / Ivy
The newest version!
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")
package io.cloudshiftdev.awscdk.services.iotwireless
import io.cloudshiftdev.awscdk.CfnTag
import io.cloudshiftdev.awscdk.common.CdkDslMarker
import io.cloudshiftdev.awscdk.common.CdkObject
import io.cloudshiftdev.awscdk.common.CdkObjectWrappers
import kotlin.String
import kotlin.Unit
import kotlin.collections.List
/**
* Properties for defining a `CfnDestination`.
*
* Example:
*
* ```
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import io.cloudshiftdev.awscdk.services.iotwireless.*;
* CfnDestinationProps cfnDestinationProps = CfnDestinationProps.builder()
* .expression("expression")
* .expressionType("expressionType")
* .name("name")
* // the properties below are optional
* .description("description")
* .roleArn("roleArn")
* .tags(List.of(CfnTag.builder()
* .key("key")
* .value("value")
* .build()))
* .build();
* ```
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-destination.html)
*/
public interface CfnDestinationProps {
/**
* The description of the new resource.
*
* Maximum length is 2048 characters.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-destination.html#cfn-iotwireless-destination-description)
*/
public fun description(): String? = unwrap(this).getDescription()
/**
* The rule name to send messages to.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-destination.html#cfn-iotwireless-destination-expression)
*/
public fun expression(): String
/**
* The type of value in `Expression` .
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-destination.html#cfn-iotwireless-destination-expressiontype)
*/
public fun expressionType(): String
/**
* The name of the new resource.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-destination.html#cfn-iotwireless-destination-name)
*/
public fun name(): String
/**
* The ARN of the IAM Role that authorizes the destination.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-destination.html#cfn-iotwireless-destination-rolearn)
*/
public fun roleArn(): String? = unwrap(this).getRoleArn()
/**
* The tags are an array of key-value pairs to attach to the specified resource.
*
* Tags can have a minimum of 0 and a maximum of 50 items.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-destination.html#cfn-iotwireless-destination-tags)
*/
public fun tags(): List = unwrap(this).getTags()?.map(CfnTag::wrap) ?: emptyList()
/**
* A builder for [CfnDestinationProps]
*/
@CdkDslMarker
public interface Builder {
/**
* @param description The description of the new resource.
* Maximum length is 2048 characters.
*/
public fun description(description: String)
/**
* @param expression The rule name to send messages to.
*/
public fun expression(expression: String)
/**
* @param expressionType The type of value in `Expression` .
*/
public fun expressionType(expressionType: String)
/**
* @param name The name of the new resource.
*/
public fun name(name: String)
/**
* @param roleArn The ARN of the IAM Role that authorizes the destination.
*/
public fun roleArn(roleArn: String)
/**
* @param tags The tags are an array of key-value pairs to attach to the specified resource.
* Tags can have a minimum of 0 and a maximum of 50 items.
*/
public fun tags(tags: List)
/**
* @param tags The tags are an array of key-value pairs to attach to the specified resource.
* Tags can have a minimum of 0 and a maximum of 50 items.
*/
public fun tags(vararg tags: CfnTag)
}
private class BuilderImpl : Builder {
private val cdkBuilder: software.amazon.awscdk.services.iotwireless.CfnDestinationProps.Builder
= software.amazon.awscdk.services.iotwireless.CfnDestinationProps.builder()
/**
* @param description The description of the new resource.
* Maximum length is 2048 characters.
*/
override fun description(description: String) {
cdkBuilder.description(description)
}
/**
* @param expression The rule name to send messages to.
*/
override fun expression(expression: String) {
cdkBuilder.expression(expression)
}
/**
* @param expressionType The type of value in `Expression` .
*/
override fun expressionType(expressionType: String) {
cdkBuilder.expressionType(expressionType)
}
/**
* @param name The name of the new resource.
*/
override fun name(name: String) {
cdkBuilder.name(name)
}
/**
* @param roleArn The ARN of the IAM Role that authorizes the destination.
*/
override fun roleArn(roleArn: String) {
cdkBuilder.roleArn(roleArn)
}
/**
* @param tags The tags are an array of key-value pairs to attach to the specified resource.
* Tags can have a minimum of 0 and a maximum of 50 items.
*/
override fun tags(tags: List) {
cdkBuilder.tags(tags.map(CfnTag.Companion::unwrap))
}
/**
* @param tags The tags are an array of key-value pairs to attach to the specified resource.
* Tags can have a minimum of 0 and a maximum of 50 items.
*/
override fun tags(vararg tags: CfnTag): Unit = tags(tags.toList())
public fun build(): software.amazon.awscdk.services.iotwireless.CfnDestinationProps =
cdkBuilder.build()
}
private class Wrapper(
cdkObject: software.amazon.awscdk.services.iotwireless.CfnDestinationProps,
) : CdkObject(cdkObject),
CfnDestinationProps {
/**
* The description of the new resource.
*
* Maximum length is 2048 characters.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-destination.html#cfn-iotwireless-destination-description)
*/
override fun description(): String? = unwrap(this).getDescription()
/**
* The rule name to send messages to.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-destination.html#cfn-iotwireless-destination-expression)
*/
override fun expression(): String = unwrap(this).getExpression()
/**
* The type of value in `Expression` .
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-destination.html#cfn-iotwireless-destination-expressiontype)
*/
override fun expressionType(): String = unwrap(this).getExpressionType()
/**
* The name of the new resource.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-destination.html#cfn-iotwireless-destination-name)
*/
override fun name(): String = unwrap(this).getName()
/**
* The ARN of the IAM Role that authorizes the destination.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-destination.html#cfn-iotwireless-destination-rolearn)
*/
override fun roleArn(): String? = unwrap(this).getRoleArn()
/**
* The tags are an array of key-value pairs to attach to the specified resource.
*
* Tags can have a minimum of 0 and a maximum of 50 items.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-destination.html#cfn-iotwireless-destination-tags)
*/
override fun tags(): List = unwrap(this).getTags()?.map(CfnTag::wrap) ?: emptyList()
}
public companion object {
public operator fun invoke(block: Builder.() -> Unit = {}): CfnDestinationProps {
val builderImpl = BuilderImpl()
return Wrapper(builderImpl.apply(block).build())
}
internal fun wrap(cdkObject: software.amazon.awscdk.services.iotwireless.CfnDestinationProps):
CfnDestinationProps = CdkObjectWrappers.wrap(cdkObject) as? CfnDestinationProps ?:
Wrapper(cdkObject)
internal fun unwrap(wrapped: CfnDestinationProps):
software.amazon.awscdk.services.iotwireless.CfnDestinationProps = (wrapped as
CdkObject).cdkObject as software.amazon.awscdk.services.iotwireless.CfnDestinationProps
}
}