commonMain.aws.sdk.kotlin.services.transfer.model.ImportSshPublicKeyResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of transfer-jvm Show documentation
Show all versions of transfer-jvm Show documentation
The AWS SDK for Kotlin client for Transfer
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.transfer.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Identifies the user, the server they belong to, and the identifier of the SSH public key associated with that user. A user can have more than one key on each server that they are associated with.
*/
public class ImportSshPublicKeyResponse private constructor(builder: Builder) {
/**
* A system-assigned unique identifier for a server.
*/
public val serverId: kotlin.String = requireNotNull(builder.serverId) { "A non-null value must be provided for serverId" }
/**
* The name given to a public key by the system that was imported.
*/
public val sshPublicKeyId: kotlin.String = requireNotNull(builder.sshPublicKeyId) { "A non-null value must be provided for sshPublicKeyId" }
/**
* A user name assigned to the `ServerID` value that you specified.
*/
public val userName: kotlin.String = requireNotNull(builder.userName) { "A non-null value must be provided for userName" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.transfer.model.ImportSshPublicKeyResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ImportSshPublicKeyResponse(")
append("serverId=$serverId,")
append("sshPublicKeyId=$sshPublicKeyId,")
append("userName=$userName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = serverId.hashCode()
result = 31 * result + (sshPublicKeyId.hashCode())
result = 31 * result + (userName.hashCode())
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 ImportSshPublicKeyResponse
if (serverId != other.serverId) return false
if (sshPublicKeyId != other.sshPublicKeyId) return false
if (userName != other.userName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.transfer.model.ImportSshPublicKeyResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A system-assigned unique identifier for a server.
*/
public var serverId: kotlin.String? = null
/**
* The name given to a public key by the system that was imported.
*/
public var sshPublicKeyId: kotlin.String? = null
/**
* A user name assigned to the `ServerID` value that you specified.
*/
public var userName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.transfer.model.ImportSshPublicKeyResponse) : this() {
this.serverId = x.serverId
this.sshPublicKeyId = x.sshPublicKeyId
this.userName = x.userName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.transfer.model.ImportSshPublicKeyResponse = ImportSshPublicKeyResponse(this)
internal fun correctErrors(): Builder {
if (serverId == null) serverId = ""
if (sshPublicKeyId == null) sshPublicKeyId = ""
if (userName == null) userName = ""
return this
}
}
}