io.cloudshiftdev.awscdk.services.connect.CfnUserHierarchyGroup.kt Maven / Gradle / Ivy
The newest version!
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")
package io.cloudshiftdev.awscdk.services.connect
import io.cloudshiftdev.awscdk.CfnResource
import io.cloudshiftdev.awscdk.CfnTag
import io.cloudshiftdev.awscdk.IInspectable
import io.cloudshiftdev.awscdk.ITaggableV2
import io.cloudshiftdev.awscdk.TagManager
import io.cloudshiftdev.awscdk.TreeInspector
import io.cloudshiftdev.awscdk.common.CdkDslMarker
import kotlin.String
import kotlin.Unit
import kotlin.collections.List
import io.cloudshiftdev.constructs.Construct as CloudshiftdevConstructsConstruct
import software.constructs.Construct as SoftwareConstructsConstruct
/**
* Specifies a new user hierarchy group.
*
* 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.connect.*;
* CfnUserHierarchyGroup cfnUserHierarchyGroup = CfnUserHierarchyGroup.Builder.create(this,
* "MyCfnUserHierarchyGroup")
* .instanceArn("instanceArn")
* .name("name")
* // the properties below are optional
* .parentGroupArn("parentGroupArn")
* .tags(List.of(CfnTag.builder()
* .key("key")
* .value("value")
* .build()))
* .build();
* ```
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-userhierarchygroup.html)
*/
public open class CfnUserHierarchyGroup(
cdkObject: software.amazon.awscdk.services.connect.CfnUserHierarchyGroup,
) : CfnResource(cdkObject),
IInspectable,
ITaggableV2 {
public constructor(
scope: CloudshiftdevConstructsConstruct,
id: String,
props: CfnUserHierarchyGroupProps,
) :
this(software.amazon.awscdk.services.connect.CfnUserHierarchyGroup(scope.let(CloudshiftdevConstructsConstruct.Companion::unwrap),
id, props.let(CfnUserHierarchyGroupProps.Companion::unwrap))
)
public constructor(
scope: CloudshiftdevConstructsConstruct,
id: String,
props: CfnUserHierarchyGroupProps.Builder.() -> Unit,
) : this(scope, id, CfnUserHierarchyGroupProps(props)
)
/**
* The Amazon Resource Name (ARN) of the user hierarchy group.
*/
public open fun attrUserHierarchyGroupArn(): String = unwrap(this).getAttrUserHierarchyGroupArn()
/**
* Tag Manager which manages the tags for this resource.
*/
public override fun cdkTagManager(): TagManager =
unwrap(this).getCdkTagManager().let(TagManager::wrap)
/**
* Examines the CloudFormation resource and discloses attributes.
*
* @param inspector tree inspector to collect and process attributes.
*/
public override fun inspect(inspector: TreeInspector) {
unwrap(this).inspect(inspector.let(TreeInspector.Companion::unwrap))
}
/**
* The Amazon Resource Name (ARN) of the user hierarchy group.
*/
public open fun instanceArn(): String = unwrap(this).getInstanceArn()
/**
* The Amazon Resource Name (ARN) of the user hierarchy group.
*/
public open fun instanceArn(`value`: String) {
unwrap(this).setInstanceArn(`value`)
}
/**
* The name of the user hierarchy group.
*/
public open fun name(): String = unwrap(this).getName()
/**
* The name of the user hierarchy group.
*/
public open fun name(`value`: String) {
unwrap(this).setName(`value`)
}
/**
* The Amazon Resource Name (ARN) of the parent group.
*/
public open fun parentGroupArn(): String? = unwrap(this).getParentGroupArn()
/**
* The Amazon Resource Name (ARN) of the parent group.
*/
public open fun parentGroupArn(`value`: String) {
unwrap(this).setParentGroupArn(`value`)
}
/**
* An array of key-value pairs to apply to this resource.
*/
public open fun tags(): List = unwrap(this).getTags()?.map(CfnTag::wrap) ?: emptyList()
/**
* An array of key-value pairs to apply to this resource.
*/
public open fun tags(`value`: List) {
unwrap(this).setTags(`value`.map(CfnTag.Companion::unwrap))
}
/**
* An array of key-value pairs to apply to this resource.
*/
public open fun tags(vararg `value`: CfnTag): Unit = tags(`value`.toList())
/**
* A fluent builder for [io.cloudshiftdev.awscdk.services.connect.CfnUserHierarchyGroup].
*/
@CdkDslMarker
public interface Builder {
/**
* The Amazon Resource Name (ARN) of the user hierarchy group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-userhierarchygroup.html#cfn-connect-userhierarchygroup-instancearn)
* @param instanceArn The Amazon Resource Name (ARN) of the user hierarchy group.
*/
public fun instanceArn(instanceArn: String)
/**
* The name of the user hierarchy group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-userhierarchygroup.html#cfn-connect-userhierarchygroup-name)
* @param name The name of the user hierarchy group.
*/
public fun name(name: String)
/**
* The Amazon Resource Name (ARN) of the parent group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-userhierarchygroup.html#cfn-connect-userhierarchygroup-parentgrouparn)
* @param parentGroupArn The Amazon Resource Name (ARN) of the parent group.
*/
public fun parentGroupArn(parentGroupArn: String)
/**
* An array of key-value pairs to apply to this resource.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-userhierarchygroup.html#cfn-connect-userhierarchygroup-tags)
* @param tags An array of key-value pairs to apply to this resource.
*/
public fun tags(tags: List)
/**
* An array of key-value pairs to apply to this resource.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-userhierarchygroup.html#cfn-connect-userhierarchygroup-tags)
* @param tags An array of key-value pairs to apply to this resource.
*/
public fun tags(vararg tags: CfnTag)
}
private class BuilderImpl(
scope: SoftwareConstructsConstruct,
id: String,
) : Builder {
private val cdkBuilder: software.amazon.awscdk.services.connect.CfnUserHierarchyGroup.Builder =
software.amazon.awscdk.services.connect.CfnUserHierarchyGroup.Builder.create(scope, id)
/**
* The Amazon Resource Name (ARN) of the user hierarchy group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-userhierarchygroup.html#cfn-connect-userhierarchygroup-instancearn)
* @param instanceArn The Amazon Resource Name (ARN) of the user hierarchy group.
*/
override fun instanceArn(instanceArn: String) {
cdkBuilder.instanceArn(instanceArn)
}
/**
* The name of the user hierarchy group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-userhierarchygroup.html#cfn-connect-userhierarchygroup-name)
* @param name The name of the user hierarchy group.
*/
override fun name(name: String) {
cdkBuilder.name(name)
}
/**
* The Amazon Resource Name (ARN) of the parent group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-userhierarchygroup.html#cfn-connect-userhierarchygroup-parentgrouparn)
* @param parentGroupArn The Amazon Resource Name (ARN) of the parent group.
*/
override fun parentGroupArn(parentGroupArn: String) {
cdkBuilder.parentGroupArn(parentGroupArn)
}
/**
* An array of key-value pairs to apply to this resource.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-userhierarchygroup.html#cfn-connect-userhierarchygroup-tags)
* @param tags An array of key-value pairs to apply to this resource.
*/
override fun tags(tags: List) {
cdkBuilder.tags(tags.map(CfnTag.Companion::unwrap))
}
/**
* An array of key-value pairs to apply to this resource.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-userhierarchygroup.html#cfn-connect-userhierarchygroup-tags)
* @param tags An array of key-value pairs to apply to this resource.
*/
override fun tags(vararg tags: CfnTag): Unit = tags(tags.toList())
public fun build(): software.amazon.awscdk.services.connect.CfnUserHierarchyGroup =
cdkBuilder.build()
}
public companion object {
public val CFN_RESOURCE_TYPE_NAME: String =
software.amazon.awscdk.services.connect.CfnUserHierarchyGroup.CFN_RESOURCE_TYPE_NAME
public operator fun invoke(
scope: CloudshiftdevConstructsConstruct,
id: String,
block: Builder.() -> Unit = {},
): CfnUserHierarchyGroup {
val builderImpl = BuilderImpl(CloudshiftdevConstructsConstruct.unwrap(scope), id)
return CfnUserHierarchyGroup(builderImpl.apply(block).build())
}
internal fun wrap(cdkObject: software.amazon.awscdk.services.connect.CfnUserHierarchyGroup):
CfnUserHierarchyGroup = CfnUserHierarchyGroup(cdkObject)
internal fun unwrap(wrapped: CfnUserHierarchyGroup):
software.amazon.awscdk.services.connect.CfnUserHierarchyGroup = wrapped.cdkObject as
software.amazon.awscdk.services.connect.CfnUserHierarchyGroup
}
}