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

commonMain.aws.sdk.kotlin.services.route53.model.CidrRoutingConfig.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

/**
 * 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
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy