commonMain.aws.sdk.kotlin.services.transfer.model.DescribedHostKey.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* The details for a server host key.
*/
public class DescribedHostKey private constructor(builder: Builder) {
/**
* The unique Amazon Resource Name (ARN) for the host key.
*/
public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
/**
* The date on which the host key was added to the server.
*/
public val dateImported: aws.smithy.kotlin.runtime.time.Instant? = builder.dateImported
/**
* The text description for this host key.
*/
public val description: kotlin.String? = builder.description
/**
* The public key fingerprint, which is a short sequence of bytes used to identify the longer public key.
*/
public val hostKeyFingerprint: kotlin.String? = builder.hostKeyFingerprint
/**
* A unique identifier for the host key.
*/
public val hostKeyId: kotlin.String? = builder.hostKeyId
/**
* Key-value pairs that can be used to group and search for host keys.
*/
public val tags: List? = builder.tags
/**
* The encryption algorithm that is used for the host key. The `Type` parameter is specified by using one of the following values:
* + `ssh-rsa`
* + `ssh-ed25519`
* + `ecdsa-sha2-nistp256`
* + `ecdsa-sha2-nistp384`
* + `ecdsa-sha2-nistp521`
*/
public val type: kotlin.String? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.transfer.model.DescribedHostKey = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DescribedHostKey(")
append("arn=$arn,")
append("dateImported=$dateImported,")
append("description=$description,")
append("hostKeyFingerprint=$hostKeyFingerprint,")
append("hostKeyId=$hostKeyId,")
append("tags=$tags,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn.hashCode()
result = 31 * result + (dateImported?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (hostKeyFingerprint?.hashCode() ?: 0)
result = 31 * result + (hostKeyId?.hashCode() ?: 0)
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (type?.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 DescribedHostKey
if (arn != other.arn) return false
if (dateImported != other.dateImported) return false
if (description != other.description) return false
if (hostKeyFingerprint != other.hostKeyFingerprint) return false
if (hostKeyId != other.hostKeyId) return false
if (tags != other.tags) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.transfer.model.DescribedHostKey = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The unique Amazon Resource Name (ARN) for the host key.
*/
public var arn: kotlin.String? = null
/**
* The date on which the host key was added to the server.
*/
public var dateImported: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The text description for this host key.
*/
public var description: kotlin.String? = null
/**
* The public key fingerprint, which is a short sequence of bytes used to identify the longer public key.
*/
public var hostKeyFingerprint: kotlin.String? = null
/**
* A unique identifier for the host key.
*/
public var hostKeyId: kotlin.String? = null
/**
* Key-value pairs that can be used to group and search for host keys.
*/
public var tags: List? = null
/**
* The encryption algorithm that is used for the host key. The `Type` parameter is specified by using one of the following values:
* + `ssh-rsa`
* + `ssh-ed25519`
* + `ecdsa-sha2-nistp256`
* + `ecdsa-sha2-nistp384`
* + `ecdsa-sha2-nistp521`
*/
public var type: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.transfer.model.DescribedHostKey) : this() {
this.arn = x.arn
this.dateImported = x.dateImported
this.description = x.description
this.hostKeyFingerprint = x.hostKeyFingerprint
this.hostKeyId = x.hostKeyId
this.tags = x.tags
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.transfer.model.DescribedHostKey = DescribedHostKey(this)
internal fun correctErrors(): Builder {
if (arn == null) arn = ""
return this
}
}
}