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

commonMain.aws.sdk.kotlin.services.workspacesweb.model.GetTrustStoreCertificateResponse.kt Maven / Gradle / Ivy

There is a newer version: 1.2.50
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.workspacesweb.model



public class GetTrustStoreCertificateResponse private constructor(builder: Builder) {
    /**
     * The certificate of the trust store certificate.
     */
    public val certificate: aws.sdk.kotlin.services.workspacesweb.model.Certificate? = builder.certificate
    /**
     * The ARN of the trust store certificate.
     */
    public val trustStoreArn: kotlin.String = requireNotNull(builder.trustStoreArn) { "A non-null value must be provided for trustStoreArn" }

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

    override fun toString(): kotlin.String = buildString {
        append("GetTrustStoreCertificateResponse(")
        append("certificate=$certificate,")
        append("trustStoreArn=$trustStoreArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = certificate?.hashCode() ?: 0
        result = 31 * result + (trustStoreArn.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 GetTrustStoreCertificateResponse

        if (certificate != other.certificate) return false
        if (trustStoreArn != other.trustStoreArn) return false

        return true
    }

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

    public class Builder {
        /**
         * The certificate of the trust store certificate.
         */
        public var certificate: aws.sdk.kotlin.services.workspacesweb.model.Certificate? = null
        /**
         * The ARN of the trust store certificate.
         */
        public var trustStoreArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.workspacesweb.model.GetTrustStoreCertificateResponse) : this() {
            this.certificate = x.certificate
            this.trustStoreArn = x.trustStoreArn
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.workspacesweb.model.GetTrustStoreCertificateResponse = GetTrustStoreCertificateResponse(this)

        /**
         * construct an [aws.sdk.kotlin.services.workspacesweb.model.Certificate] inside the given [block]
         */
        public fun certificate(block: aws.sdk.kotlin.services.workspacesweb.model.Certificate.Builder.() -> kotlin.Unit) {
            this.certificate = aws.sdk.kotlin.services.workspacesweb.model.Certificate.invoke(block)
        }

        internal fun correctErrors(): Builder {
            if (trustStoreArn == null) trustStoreArn = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy