commonMain.aws.sdk.kotlin.services.servicediscovery.model.CreatePrivateDnsNamespaceRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.servicediscovery.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreatePrivateDnsNamespaceRequest private constructor(builder: Builder) {
/**
* A unique string that identifies the request and that allows failed `CreatePrivateDnsNamespace` requests to be retried without the risk of running the operation twice. `CreatorRequestId` can be any unique string (for example, a date/timestamp).
*/
public val creatorRequestId: kotlin.String? = builder.creatorRequestId
/**
* A description for the namespace.
*/
public val description: kotlin.String? = builder.description
/**
* The name that you want to assign to this namespace. When you create a private DNS namespace, Cloud Map automatically creates an Amazon Route 53 private hosted zone that has the same name as the namespace.
*/
public val name: kotlin.String? = builder.name
/**
* Properties for the private DNS namespace.
*/
public val properties: aws.sdk.kotlin.services.servicediscovery.model.PrivateDnsNamespaceProperties? = builder.properties
/**
* The tags to add to the namespace. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.
*/
public val tags: List? = builder.tags
/**
* The ID of the Amazon VPC that you want to associate the namespace with.
*/
public val vpc: kotlin.String? = builder.vpc
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.servicediscovery.model.CreatePrivateDnsNamespaceRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreatePrivateDnsNamespaceRequest(")
append("creatorRequestId=$creatorRequestId,")
append("description=$description,")
append("name=$name,")
append("properties=$properties,")
append("tags=$tags,")
append("vpc=$vpc")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = creatorRequestId?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (properties?.hashCode() ?: 0)
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (vpc?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as CreatePrivateDnsNamespaceRequest
if (creatorRequestId != other.creatorRequestId) return false
if (description != other.description) return false
if (name != other.name) return false
if (properties != other.properties) return false
if (tags != other.tags) return false
if (vpc != other.vpc) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.servicediscovery.model.CreatePrivateDnsNamespaceRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A unique string that identifies the request and that allows failed `CreatePrivateDnsNamespace` requests to be retried without the risk of running the operation twice. `CreatorRequestId` can be any unique string (for example, a date/timestamp).
*/
public var creatorRequestId: kotlin.String? = null
/**
* A description for the namespace.
*/
public var description: kotlin.String? = null
/**
* The name that you want to assign to this namespace. When you create a private DNS namespace, Cloud Map automatically creates an Amazon Route 53 private hosted zone that has the same name as the namespace.
*/
public var name: kotlin.String? = null
/**
* Properties for the private DNS namespace.
*/
public var properties: aws.sdk.kotlin.services.servicediscovery.model.PrivateDnsNamespaceProperties? = null
/**
* The tags to add to the namespace. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.
*/
public var tags: List? = null
/**
* The ID of the Amazon VPC that you want to associate the namespace with.
*/
public var vpc: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.servicediscovery.model.CreatePrivateDnsNamespaceRequest) : this() {
this.creatorRequestId = x.creatorRequestId
this.description = x.description
this.name = x.name
this.properties = x.properties
this.tags = x.tags
this.vpc = x.vpc
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.servicediscovery.model.CreatePrivateDnsNamespaceRequest = CreatePrivateDnsNamespaceRequest(this)
/**
* construct an [aws.sdk.kotlin.services.servicediscovery.model.PrivateDnsNamespaceProperties] inside the given [block]
*/
public fun properties(block: aws.sdk.kotlin.services.servicediscovery.model.PrivateDnsNamespaceProperties.Builder.() -> kotlin.Unit) {
this.properties = aws.sdk.kotlin.services.servicediscovery.model.PrivateDnsNamespaceProperties.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy