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

commonMain.aws.sdk.kotlin.services.iot.model.CreateKeysAndCertificateResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iot.model



/**
 * The output of the CreateKeysAndCertificate operation.
 */
public class CreateKeysAndCertificateResponse private constructor(builder: Builder) {
    /**
     * The ARN of the certificate.
     */
    public val certificateArn: kotlin.String? = builder.certificateArn
    /**
     * The ID of the certificate. IoT issues a default subject name for the certificate (for example, IoT Certificate).
     */
    public val certificateId: kotlin.String? = builder.certificateId
    /**
     * The certificate data, in PEM format.
     */
    public val certificatePem: kotlin.String? = builder.certificatePem
    /**
     * The generated key pair.
     */
    public val keyPair: aws.sdk.kotlin.services.iot.model.KeyPair? = builder.keyPair

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

    override fun toString(): kotlin.String = buildString {
        append("CreateKeysAndCertificateResponse(")
        append("certificateArn=$certificateArn,")
        append("certificateId=$certificateId,")
        append("certificatePem=$certificatePem,")
        append("keyPair=$keyPair")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = certificateArn?.hashCode() ?: 0
        result = 31 * result + (certificateId?.hashCode() ?: 0)
        result = 31 * result + (certificatePem?.hashCode() ?: 0)
        result = 31 * result + (keyPair?.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 CreateKeysAndCertificateResponse

        if (certificateArn != other.certificateArn) return false
        if (certificateId != other.certificateId) return false
        if (certificatePem != other.certificatePem) return false
        if (keyPair != other.keyPair) return false

        return true
    }

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

    public class Builder {
        /**
         * The ARN of the certificate.
         */
        public var certificateArn: kotlin.String? = null
        /**
         * The ID of the certificate. IoT issues a default subject name for the certificate (for example, IoT Certificate).
         */
        public var certificateId: kotlin.String? = null
        /**
         * The certificate data, in PEM format.
         */
        public var certificatePem: kotlin.String? = null
        /**
         * The generated key pair.
         */
        public var keyPair: aws.sdk.kotlin.services.iot.model.KeyPair? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.CreateKeysAndCertificateResponse) : this() {
            this.certificateArn = x.certificateArn
            this.certificateId = x.certificateId
            this.certificatePem = x.certificatePem
            this.keyPair = x.keyPair
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy