
commonMain.aws.sdk.kotlin.services.lightsail.model.ImportKeyPairRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lightsail.model
public class ImportKeyPairRequest private constructor(builder: Builder) {
/**
* The name of the key pair for which you want to import the public key.
*/
public val keyPairName: kotlin.String? = builder.keyPairName
/**
* 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.ImportKeyPairRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ImportKeyPairRequest(")
append("keyPairName=$keyPairName,")
append("publicKeyBase64=$publicKeyBase64)")
}
override fun hashCode(): kotlin.Int {
var result = keyPairName?.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 ImportKeyPairRequest
if (keyPairName != other.keyPairName) return false
if (publicKeyBase64 != other.publicKeyBase64) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lightsail.model.ImportKeyPairRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The name of the key pair for which you want to import the public key.
*/
public var keyPairName: 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.ImportKeyPairRequest) : this() {
this.keyPairName = x.keyPairName
this.publicKeyBase64 = x.publicKeyBase64
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lightsail.model.ImportKeyPairRequest = ImportKeyPairRequest(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy