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

commonMain.aws.sdk.kotlin.services.lightsail.model.DownloadDefaultKeyPairResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lightsail.model

import aws.smithy.kotlin.runtime.time.Instant

public class DownloadDefaultKeyPairResponse private constructor(builder: Builder) {
    /**
     * The timestamp when the default key pair was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * A base64-encoded RSA private key.
     */
    public val privateKeyBase64: kotlin.String? = builder.privateKeyBase64
    /**
     * A base64-encoded public key of the `ssh-rsa` type.
     */
    public val publicKeyBase64: kotlin.String? = builder.publicKeyBase64

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

    override fun toString(): kotlin.String = buildString {
        append("DownloadDefaultKeyPairResponse(")
        append("createdAt=$createdAt,")
        append("privateKeyBase64=$privateKeyBase64,")
        append("publicKeyBase64=$publicKeyBase64")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = createdAt?.hashCode() ?: 0
        result = 31 * result + (privateKeyBase64?.hashCode() ?: 0)
        result = 31 * result + (publicKeyBase64?.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 DownloadDefaultKeyPairResponse

        if (createdAt != other.createdAt) return false
        if (privateKeyBase64 != other.privateKeyBase64) return false
        if (publicKeyBase64 != other.publicKeyBase64) return false

        return true
    }

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

    public class Builder {
        /**
         * The timestamp when the default key pair was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A base64-encoded RSA private key.
         */
        public var privateKeyBase64: kotlin.String? = null
        /**
         * A base64-encoded public key of the `ssh-rsa` type.
         */
        public var publicKeyBase64: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lightsail.model.DownloadDefaultKeyPairResponse) : this() {
            this.createdAt = x.createdAt
            this.privateKeyBase64 = x.privateKeyBase64
            this.publicKeyBase64 = x.publicKeyBase64
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy