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

commonMain.aws.sdk.kotlin.services.transfer.model.ImportHostKeyRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.79
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.transfer.model

import aws.smithy.kotlin.runtime.SdkDsl

public class ImportHostKeyRequest private constructor(builder: Builder) {
    /**
     * The text description that identifies this host key.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The private key portion of an SSH key pair.
     *
     * Transfer Family accepts RSA, ECDSA, and ED25519 keys.
     */
    public val hostKeyBody: kotlin.String? = builder.hostKeyBody
    /**
     * The identifier of the server that contains the host key that you are importing.
     */
    public val serverId: kotlin.String? = builder.serverId
    /**
     * Key-value pairs that can be used to group and search for host keys.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("ImportHostKeyRequest(")
        append("description=$description,")
        append("hostKeyBody=*** Sensitive Data Redacted ***,")
        append("serverId=$serverId,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (hostKeyBody?.hashCode() ?: 0)
        result = 31 * result + (serverId?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 ImportHostKeyRequest

        if (description != other.description) return false
        if (hostKeyBody != other.hostKeyBody) return false
        if (serverId != other.serverId) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The text description that identifies this host key.
         */
        public var description: kotlin.String? = null
        /**
         * The private key portion of an SSH key pair.
         *
         * Transfer Family accepts RSA, ECDSA, and ED25519 keys.
         */
        public var hostKeyBody: kotlin.String? = null
        /**
         * The identifier of the server that contains the host key that you are importing.
         */
        public var serverId: kotlin.String? = null
        /**
         * Key-value pairs that can be used to group and search for host keys.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.transfer.model.ImportHostKeyRequest) : this() {
            this.description = x.description
            this.hostKeyBody = x.hostKeyBody
            this.serverId = x.serverId
            this.tags = x.tags
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy