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

commonMain.aws.sdk.kotlin.services.acmpca.model.GetCertificateAuthorityCertificateResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.acmpca.model



public class GetCertificateAuthorityCertificateResponse private constructor(builder: Builder) {
    /**
     * Base64-encoded certificate authority (CA) certificate.
     */
    public val certificate: kotlin.String? = builder.certificate
    /**
     * Base64-encoded certificate chain that includes any intermediate certificates and chains up to root certificate that you used to sign your private CA certificate. The chain does not include your private CA certificate. If this is a root CA, the value will be null.
     */
    public val certificateChain: kotlin.String? = builder.certificateChain

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

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

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

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

        return true
    }

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

    public class Builder {
        /**
         * Base64-encoded certificate authority (CA) certificate.
         */
        public var certificate: kotlin.String? = null
        /**
         * Base64-encoded certificate chain that includes any intermediate certificates and chains up to root certificate that you used to sign your private CA certificate. The chain does not include your private CA certificate. If this is a root CA, the value will be null.
         */
        public var certificateChain: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.acmpca.model.GetCertificateAuthorityCertificateResponse) : this() {
            this.certificate = x.certificate
            this.certificateChain = x.certificateChain
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy