io.cloudshiftdev.awscdk.services.neptune.CfnDBSubnetGroupProps.kt Maven / Gradle / Ivy
The newest version!
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")
package io.cloudshiftdev.awscdk.services.neptune
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 `CfnDBSubnetGroup`.
*
* 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.neptune.*;
* CfnDBSubnetGroupProps cfnDBSubnetGroupProps = CfnDBSubnetGroupProps.builder()
* .dbSubnetGroupDescription("dbSubnetGroupDescription")
* .subnetIds(List.of("subnetIds"))
* // the properties below are optional
* .dbSubnetGroupName("dbSubnetGroupName")
* .tags(List.of(CfnTag.builder()
* .key("key")
* .value("value")
* .build()))
* .build();
* ```
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-neptune-dbsubnetgroup.html)
*/
public interface CfnDBSubnetGroupProps {
/**
* Provides the description of the DB subnet group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-neptune-dbsubnetgroup.html#cfn-neptune-dbsubnetgroup-dbsubnetgroupdescription)
*/
public fun dbSubnetGroupDescription(): String
/**
* The name of the DB subnet group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-neptune-dbsubnetgroup.html#cfn-neptune-dbsubnetgroup-dbsubnetgroupname)
*/
public fun dbSubnetGroupName(): String? = unwrap(this).getDbSubnetGroupName()
/**
* The Amazon EC2 subnet IDs for the DB subnet group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-neptune-dbsubnetgroup.html#cfn-neptune-dbsubnetgroup-subnetids)
*/
public fun subnetIds(): List
/**
* The tags that you want to attach to the DB subnet group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-neptune-dbsubnetgroup.html#cfn-neptune-dbsubnetgroup-tags)
*/
public fun tags(): List = unwrap(this).getTags()?.map(CfnTag::wrap) ?: emptyList()
/**
* A builder for [CfnDBSubnetGroupProps]
*/
@CdkDslMarker
public interface Builder {
/**
* @param dbSubnetGroupDescription Provides the description of the DB subnet group.
*/
public fun dbSubnetGroupDescription(dbSubnetGroupDescription: String)
/**
* @param dbSubnetGroupName The name of the DB subnet group.
*/
public fun dbSubnetGroupName(dbSubnetGroupName: String)
/**
* @param subnetIds The Amazon EC2 subnet IDs for the DB subnet group.
*/
public fun subnetIds(subnetIds: List)
/**
* @param subnetIds The Amazon EC2 subnet IDs for the DB subnet group.
*/
public fun subnetIds(vararg subnetIds: String)
/**
* @param tags The tags that you want to attach to the DB subnet group.
*/
public fun tags(tags: List)
/**
* @param tags The tags that you want to attach to the DB subnet group.
*/
public fun tags(vararg tags: CfnTag)
}
private class BuilderImpl : Builder {
private val cdkBuilder: software.amazon.awscdk.services.neptune.CfnDBSubnetGroupProps.Builder =
software.amazon.awscdk.services.neptune.CfnDBSubnetGroupProps.builder()
/**
* @param dbSubnetGroupDescription Provides the description of the DB subnet group.
*/
override fun dbSubnetGroupDescription(dbSubnetGroupDescription: String) {
cdkBuilder.dbSubnetGroupDescription(dbSubnetGroupDescription)
}
/**
* @param dbSubnetGroupName The name of the DB subnet group.
*/
override fun dbSubnetGroupName(dbSubnetGroupName: String) {
cdkBuilder.dbSubnetGroupName(dbSubnetGroupName)
}
/**
* @param subnetIds The Amazon EC2 subnet IDs for the DB subnet group.
*/
override fun subnetIds(subnetIds: List) {
cdkBuilder.subnetIds(subnetIds)
}
/**
* @param subnetIds The Amazon EC2 subnet IDs for the DB subnet group.
*/
override fun subnetIds(vararg subnetIds: String): Unit = subnetIds(subnetIds.toList())
/**
* @param tags The tags that you want to attach to the DB subnet group.
*/
override fun tags(tags: List) {
cdkBuilder.tags(tags.map(CfnTag.Companion::unwrap))
}
/**
* @param tags The tags that you want to attach to the DB subnet group.
*/
override fun tags(vararg tags: CfnTag): Unit = tags(tags.toList())
public fun build(): software.amazon.awscdk.services.neptune.CfnDBSubnetGroupProps =
cdkBuilder.build()
}
private class Wrapper(
cdkObject: software.amazon.awscdk.services.neptune.CfnDBSubnetGroupProps,
) : CdkObject(cdkObject),
CfnDBSubnetGroupProps {
/**
* Provides the description of the DB subnet group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-neptune-dbsubnetgroup.html#cfn-neptune-dbsubnetgroup-dbsubnetgroupdescription)
*/
override fun dbSubnetGroupDescription(): String = unwrap(this).getDbSubnetGroupDescription()
/**
* The name of the DB subnet group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-neptune-dbsubnetgroup.html#cfn-neptune-dbsubnetgroup-dbsubnetgroupname)
*/
override fun dbSubnetGroupName(): String? = unwrap(this).getDbSubnetGroupName()
/**
* The Amazon EC2 subnet IDs for the DB subnet group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-neptune-dbsubnetgroup.html#cfn-neptune-dbsubnetgroup-subnetids)
*/
override fun subnetIds(): List = unwrap(this).getSubnetIds()
/**
* The tags that you want to attach to the DB subnet group.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-neptune-dbsubnetgroup.html#cfn-neptune-dbsubnetgroup-tags)
*/
override fun tags(): List = unwrap(this).getTags()?.map(CfnTag::wrap) ?: emptyList()
}
public companion object {
public operator fun invoke(block: Builder.() -> Unit = {}): CfnDBSubnetGroupProps {
val builderImpl = BuilderImpl()
return Wrapper(builderImpl.apply(block).build())
}
internal fun wrap(cdkObject: software.amazon.awscdk.services.neptune.CfnDBSubnetGroupProps):
CfnDBSubnetGroupProps = CdkObjectWrappers.wrap(cdkObject) as? CfnDBSubnetGroupProps ?:
Wrapper(cdkObject)
internal fun unwrap(wrapped: CfnDBSubnetGroupProps):
software.amazon.awscdk.services.neptune.CfnDBSubnetGroupProps = (wrapped as
CdkObject).cdkObject as software.amazon.awscdk.services.neptune.CfnDBSubnetGroupProps
}
}