All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.route53.model.CidrCollectionChange.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// 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
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy