commonMain.aws.sdk.kotlin.services.route53.model.CidrRoutingConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of route53-jvm Show documentation
Show all versions of route53-jvm Show documentation
The AWS SDK for Kotlin client for Route 53
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.route53.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The object that is specified in resource record set object when you are linking a resource record set to a CIDR location.
*
* A `LocationName` with an asterisk “*” can be used to create a default CIDR record. `CollectionId` is still required for default record.
*/
public class CidrRoutingConfig private constructor(builder: Builder) {
/**
* The CIDR collection ID.
*/
public val collectionId: kotlin.String = requireNotNull(builder.collectionId) { "A non-null value must be provided for collectionId" }
/**
* The CIDR collection location name.
*/
public val locationName: kotlin.String = requireNotNull(builder.locationName) { "A non-null value must be provided for locationName" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53.model.CidrRoutingConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CidrRoutingConfig(")
append("collectionId=$collectionId,")
append("locationName=$locationName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = collectionId.hashCode()
result = 31 * result + (locationName.hashCode())
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 CidrRoutingConfig
if (collectionId != other.collectionId) return false
if (locationName != other.locationName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53.model.CidrRoutingConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The CIDR collection ID.
*/
public var collectionId: kotlin.String? = null
/**
* The CIDR collection location name.
*/
public var locationName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53.model.CidrRoutingConfig) : this() {
this.collectionId = x.collectionId
this.locationName = x.locationName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53.model.CidrRoutingConfig = CidrRoutingConfig(this)
internal fun correctErrors(): Builder {
if (collectionId == null) collectionId = ""
if (locationName == null) locationName = ""
return this
}
}
}