commonMain.aws.sdk.kotlin.services.route53.model.CidrCollectionChange.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
/**
* A complex type that contains information about the CIDR collection change.
*/
public class CidrCollectionChange private constructor(builder: Builder) {
/**
* CIDR collection change action.
*/
public val action: aws.sdk.kotlin.services.route53.model.CidrCollectionChangeAction = requireNotNull(builder.action) { "A non-null value must be provided for action" }
/**
* List of CIDR blocks.
*/
public val cidrList: List = requireNotNull(builder.cidrList) { "A non-null value must be provided for cidrList" }
/**
* Name of the location that is associated with the CIDR collection.
*/
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.CidrCollectionChange = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CidrCollectionChange(")
append("action=$action,")
append("cidrList=$cidrList,")
append("locationName=$locationName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = action.hashCode()
result = 31 * result + (cidrList.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 CidrCollectionChange
if (action != other.action) return false
if (cidrList != other.cidrList) return false
if (locationName != other.locationName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53.model.CidrCollectionChange = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* CIDR collection change action.
*/
public var action: aws.sdk.kotlin.services.route53.model.CidrCollectionChangeAction? = null
/**
* List of CIDR blocks.
*/
public var cidrList: List? = null
/**
* Name of the location that is associated with the CIDR collection.
*/
public var locationName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53.model.CidrCollectionChange) : this() {
this.action = x.action
this.cidrList = x.cidrList
this.locationName = x.locationName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53.model.CidrCollectionChange = CidrCollectionChange(this)
internal fun correctErrors(): Builder {
if (action == null) action = CidrCollectionChangeAction.SdkUnknown("no value provided")
if (cidrList == null) cidrList = emptyList()
if (locationName == null) locationName = ""
return this
}
}
}