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

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

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

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



/**
 * Describes a key pair.
 */
public class KeyPair private constructor(builder: Builder) {
    /**
     * The private key.
     */
    public val privateKey: kotlin.String? = builder.privateKey
    /**
     * The public key.
     */
    public val publicKey: kotlin.String? = builder.publicKey

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

    override fun toString(): kotlin.String = buildString {
        append("KeyPair(")
        append("privateKey=*** Sensitive Data Redacted ***,")
        append("publicKey=$publicKey")
        append(")")
    }

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

        if (privateKey != other.privateKey) return false
        if (publicKey != other.publicKey) return false

        return true
    }

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

    public class Builder {
        /**
         * The private key.
         */
        public var privateKey: kotlin.String? = null
        /**
         * The public key.
         */
        public var publicKey: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.KeyPair) : this() {
            this.privateKey = x.privateKey
            this.publicKey = x.publicKey
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy