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

commonMain.aws.sdk.kotlin.services.lightsail.model.CreateCertificateRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.lightsail.model



public class CreateCertificateRequest private constructor(builder: Builder) {
    /**
     * The name for the certificate.
     */
    public val certificateName: kotlin.String? = builder.certificateName
    /**
     * The domain name (e.g., `example.com`) for the certificate.
     */
    public val domainName: kotlin.String? = builder.domainName
    /**
     * An array of strings that specify the alternate domains (e.g., `example2.com`) and subdomains (e.g., `blog.example.com`) for the certificate.
     *
     * You can specify a maximum of nine alternate domains (in addition to the primary domain name).
     *
     * Wildcard domain entries (e.g., `*.example.com`) are not supported.
     */
    public val subjectAlternativeNames: List? = builder.subjectAlternativeNames
    /**
     * The tag keys and optional values to add to the certificate during create.
     *
     * Use the `TagResource` action to tag a resource after it's created.
     */
    public val tags: List? = builder.tags

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lightsail.model.CreateCertificateRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateCertificateRequest(")
        append("certificateName=$certificateName,")
        append("domainName=$domainName,")
        append("subjectAlternativeNames=$subjectAlternativeNames,")
        append("tags=$tags)")
    }

    override fun hashCode(): kotlin.Int {
        var result = certificateName?.hashCode() ?: 0
        result = 31 * result + (domainName?.hashCode() ?: 0)
        result = 31 * result + (subjectAlternativeNames?.hashCode() ?: 0)
        result = 31 * result + (tags?.hashCode() ?: 0)
        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 CreateCertificateRequest

        if (certificateName != other.certificateName) return false
        if (domainName != other.domainName) return false
        if (subjectAlternativeNames != other.subjectAlternativeNames) return false
        if (tags != other.tags) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lightsail.model.CreateCertificateRequest = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The name for the certificate.
         */
        public var certificateName: kotlin.String? = null
        /**
         * The domain name (e.g., `example.com`) for the certificate.
         */
        public var domainName: kotlin.String? = null
        /**
         * An array of strings that specify the alternate domains (e.g., `example2.com`) and subdomains (e.g., `blog.example.com`) for the certificate.
         *
         * You can specify a maximum of nine alternate domains (in addition to the primary domain name).
         *
         * Wildcard domain entries (e.g., `*.example.com`) are not supported.
         */
        public var subjectAlternativeNames: List? = null
        /**
         * The tag keys and optional values to add to the certificate during create.
         *
         * Use the `TagResource` action to tag a resource after it's created.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lightsail.model.CreateCertificateRequest) : this() {
            this.certificateName = x.certificateName
            this.domainName = x.domainName
            this.subjectAlternativeNames = x.subjectAlternativeNames
            this.tags = x.tags
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.lightsail.model.CreateCertificateRequest = CreateCertificateRequest(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy