
commonMain.aws.sdk.kotlin.services.cloudfront.model.Aliases.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudfront.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.
*/
public class Aliases private constructor(builder: Builder) {
/**
* A complex type that contains the CNAME aliases, if any, that you want to associate with this distribution.
*/
public val items: List? = builder.items
/**
* The number of CNAME aliases, if any, that you want to associate with this distribution.
*/
public val quantity: kotlin.Int = requireNotNull(builder.quantity) { "A non-null value must be provided for quantity" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudfront.model.Aliases = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Aliases(")
append("items=$items,")
append("quantity=$quantity")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = items?.hashCode() ?: 0
result = 31 * result + (quantity)
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 Aliases
if (items != other.items) return false
if (quantity != other.quantity) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudfront.model.Aliases = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A complex type that contains the CNAME aliases, if any, that you want to associate with this distribution.
*/
public var items: List? = null
/**
* The number of CNAME aliases, if any, that you want to associate with this distribution.
*/
public var quantity: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudfront.model.Aliases) : this() {
this.items = x.items
this.quantity = x.quantity
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudfront.model.Aliases = Aliases(this)
internal fun correctErrors(): Builder {
if (quantity == null) quantity = 0
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy