
commonMain.aws.sdk.kotlin.services.lightsail.model.CreateKeyPairRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lightsail.model
public class CreateKeyPairRequest private constructor(builder: Builder) {
/**
* The name for your new key pair.
*/
public val keyPairName: kotlin.String? = builder.keyPairName
/**
* The tag keys and optional values to add to the resource during create.
*
* Use the `TagResource` action to tag a resource after it's created.
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lightsail.model.CreateKeyPairRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateKeyPairRequest(")
append("keyPairName=$keyPairName,")
append("tags=$tags)")
}
override fun hashCode(): kotlin.Int {
var result = keyPairName?.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 CreateKeyPairRequest
if (keyPairName != other.keyPairName) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lightsail.model.CreateKeyPairRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The name for your new key pair.
*/
public var keyPairName: kotlin.String? = null
/**
* The tag keys and optional values to add to the resource during create.
*
* Use the `TagResource` action to tag a resource after it's created.
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lightsail.model.CreateKeyPairRequest) : this() {
this.keyPairName = x.keyPairName
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lightsail.model.CreateKeyPairRequest = CreateKeyPairRequest(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy