commonMain.aws.sdk.kotlin.services.codeartifact.model.GetAuthorizationTokenResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codeartifact-jvm Show documentation
Show all versions of codeartifact-jvm Show documentation
The AWS SDK for Kotlin client for codeartifact
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codeartifact.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
public class GetAuthorizationTokenResponse private constructor(builder: Builder) {
/**
* The returned authentication token.
*/
public val authorizationToken: kotlin.String? = builder.authorizationToken
/**
* A timestamp that specifies the date and time the authorization token expires.
*/
public val expiration: aws.smithy.kotlin.runtime.time.Instant? = builder.expiration
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codeartifact.model.GetAuthorizationTokenResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetAuthorizationTokenResponse(")
append("*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = authorizationToken?.hashCode() ?: 0
result = 31 * result + (expiration?.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 GetAuthorizationTokenResponse
if (authorizationToken != other.authorizationToken) return false
if (expiration != other.expiration) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codeartifact.model.GetAuthorizationTokenResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The returned authentication token.
*/
public var authorizationToken: kotlin.String? = null
/**
* A timestamp that specifies the date and time the authorization token expires.
*/
public var expiration: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.GetAuthorizationTokenResponse) : this() {
this.authorizationToken = x.authorizationToken
this.expiration = x.expiration
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codeartifact.model.GetAuthorizationTokenResponse = GetAuthorizationTokenResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}