commonMain.aws.sdk.kotlin.services.transfer.model.DescribeUserResponse.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
public class DescribeUserResponse private constructor(builder: Builder) {
/**
* A system-assigned unique identifier for a server that has this user assigned.
*/
public val serverId: kotlin.String = requireNotNull(builder.serverId) { "A non-null value must be provided for serverId" }
/**
* An array containing the properties of the Transfer Family user for the `ServerID` value that you specified.
*/
public val user: aws.sdk.kotlin.services.transfer.model.DescribedUser? = builder.user
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.transfer.model.DescribeUserResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DescribeUserResponse(")
append("serverId=$serverId,")
append("user=$user")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = serverId.hashCode()
result = 31 * result + (user?.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 DescribeUserResponse
if (serverId != other.serverId) return false
if (user != other.user) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.transfer.model.DescribeUserResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A system-assigned unique identifier for a server that has this user assigned.
*/
public var serverId: kotlin.String? = null
/**
* An array containing the properties of the Transfer Family user for the `ServerID` value that you specified.
*/
public var user: aws.sdk.kotlin.services.transfer.model.DescribedUser? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.transfer.model.DescribeUserResponse) : this() {
this.serverId = x.serverId
this.user = x.user
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.transfer.model.DescribeUserResponse = DescribeUserResponse(this)
/**
* construct an [aws.sdk.kotlin.services.transfer.model.DescribedUser] inside the given [block]
*/
public fun user(block: aws.sdk.kotlin.services.transfer.model.DescribedUser.Builder.() -> kotlin.Unit) {
this.user = aws.sdk.kotlin.services.transfer.model.DescribedUser.invoke(block)
}
internal fun correctErrors(): Builder {
if (serverId == null) serverId = ""
return this
}
}
}