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

commonMain.aws.sdk.kotlin.services.ec2instanceconnect.model.SendSshPublicKeyRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.ec2instanceconnect.model

import aws.smithy.kotlin.runtime.SdkDsl

public class SendSshPublicKeyRequest private constructor(builder: Builder) {
    /**
     * The Availability Zone in which the EC2 instance was launched.
     */
    public val availabilityZone: kotlin.String? = builder.availabilityZone
    /**
     * The ID of the EC2 instance.
     */
    public val instanceId: kotlin.String? = builder.instanceId
    /**
     * The OS user on the EC2 instance for whom the key can be used to authenticate.
     */
    public val instanceOsUser: kotlin.String? = builder.instanceOsUser
    /**
     * The public key material. To use the public key, you must have the matching private key.
     */
    public val sshPublicKey: kotlin.String? = builder.sshPublicKey

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

    override fun toString(): kotlin.String = buildString {
        append("SendSshPublicKeyRequest(")
        append("availabilityZone=$availabilityZone,")
        append("instanceId=$instanceId,")
        append("instanceOsUser=$instanceOsUser,")
        append("sshPublicKey=$sshPublicKey")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = availabilityZone?.hashCode() ?: 0
        result = 31 * result + (instanceId?.hashCode() ?: 0)
        result = 31 * result + (instanceOsUser?.hashCode() ?: 0)
        result = 31 * result + (sshPublicKey?.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 SendSshPublicKeyRequest

        if (availabilityZone != other.availabilityZone) return false
        if (instanceId != other.instanceId) return false
        if (instanceOsUser != other.instanceOsUser) return false
        if (sshPublicKey != other.sshPublicKey) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Availability Zone in which the EC2 instance was launched.
         */
        public var availabilityZone: kotlin.String? = null
        /**
         * The ID of the EC2 instance.
         */
        public var instanceId: kotlin.String? = null
        /**
         * The OS user on the EC2 instance for whom the key can be used to authenticate.
         */
        public var instanceOsUser: kotlin.String? = null
        /**
         * The public key material. To use the public key, you must have the matching private key.
         */
        public var sshPublicKey: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ec2instanceconnect.model.SendSshPublicKeyRequest) : this() {
            this.availabilityZone = x.availabilityZone
            this.instanceId = x.instanceId
            this.instanceOsUser = x.instanceOsUser
            this.sshPublicKey = x.sshPublicKey
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy