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

commonMain.aws.sdk.kotlin.services.cloudhsmv2.model.InitializeClusterRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cloudhsmv2.model



public class InitializeClusterRequest private constructor(builder: Builder) {
    /**
     * The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use DescribeClusters.
     */
    public val clusterId: kotlin.String? = builder.clusterId
    /**
     * The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in PEM format and can contain a maximum of 5000 characters.
     */
    public val signedCert: kotlin.String? = builder.signedCert
    /**
     * The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. You must use a self-signed certificate. The certificate used to sign the HSM CSR must be directly available, and thus must be the root certificate. The certificate must be in PEM format and can contain a maximum of 5000 characters.
     */
    public val trustAnchor: kotlin.String? = builder.trustAnchor

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

    override fun toString(): kotlin.String = buildString {
        append("InitializeClusterRequest(")
        append("clusterId=$clusterId,")
        append("signedCert=$signedCert,")
        append("trustAnchor=$trustAnchor")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clusterId?.hashCode() ?: 0
        result = 31 * result + (signedCert?.hashCode() ?: 0)
        result = 31 * result + (trustAnchor?.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 InitializeClusterRequest

        if (clusterId != other.clusterId) return false
        if (signedCert != other.signedCert) return false
        if (trustAnchor != other.trustAnchor) return false

        return true
    }

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

    public class Builder {
        /**
         * The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use DescribeClusters.
         */
        public var clusterId: kotlin.String? = null
        /**
         * The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in PEM format and can contain a maximum of 5000 characters.
         */
        public var signedCert: kotlin.String? = null
        /**
         * The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. You must use a self-signed certificate. The certificate used to sign the HSM CSR must be directly available, and thus must be the root certificate. The certificate must be in PEM format and can contain a maximum of 5000 characters.
         */
        public var trustAnchor: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudhsmv2.model.InitializeClusterRequest) : this() {
            this.clusterId = x.clusterId
            this.signedCert = x.signedCert
            this.trustAnchor = x.trustAnchor
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy