commonMain.aws.sdk.kotlin.services.transfer.model.ServiceMetadata.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
/**
* A container object for the session details that are associated with a workflow.
*/
public class ServiceMetadata private constructor(builder: Builder) {
/**
* The Server ID (`ServerId`), Session ID (`SessionId`) and user (`UserName`) make up the `UserDetails`.
*/
public val userDetails: aws.sdk.kotlin.services.transfer.model.UserDetails? = builder.userDetails
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.transfer.model.ServiceMetadata = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ServiceMetadata(")
append("userDetails=$userDetails")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = userDetails?.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 ServiceMetadata
if (userDetails != other.userDetails) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.transfer.model.ServiceMetadata = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Server ID (`ServerId`), Session ID (`SessionId`) and user (`UserName`) make up the `UserDetails`.
*/
public var userDetails: aws.sdk.kotlin.services.transfer.model.UserDetails? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.transfer.model.ServiceMetadata) : this() {
this.userDetails = x.userDetails
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.transfer.model.ServiceMetadata = ServiceMetadata(this)
/**
* construct an [aws.sdk.kotlin.services.transfer.model.UserDetails] inside the given [block]
*/
public fun userDetails(block: aws.sdk.kotlin.services.transfer.model.UserDetails.Builder.() -> kotlin.Unit) {
this.userDetails = aws.sdk.kotlin.services.transfer.model.UserDetails.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}