
commonMain.aws.sdk.kotlin.services.codeartifact.model.GetAuthorizationTokenRequest.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
public class GetAuthorizationTokenRequest private constructor(builder: Builder) {
/**
* The name of the domain that is in scope for the generated authorization token.
*/
public val domain: kotlin.String? = builder.domain
/**
* The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
*/
public val domainOwner: kotlin.String? = builder.domainOwner
/**
* The time, in seconds, that the generated authorization token is valid. Valid values are `0` and any number between `900` (15 minutes) and `43200` (12 hours). A value of `0` will set the expiration of the authorization token to the same expiration of the user's role's temporary credentials.
*/
public val durationSeconds: kotlin.Long? = builder.durationSeconds
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codeartifact.model.GetAuthorizationTokenRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetAuthorizationTokenRequest(")
append("domain=$domain,")
append("domainOwner=$domainOwner,")
append("durationSeconds=$durationSeconds")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = domain?.hashCode() ?: 0
result = 31 * result + (domainOwner?.hashCode() ?: 0)
result = 31 * result + (durationSeconds?.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 GetAuthorizationTokenRequest
if (domain != other.domain) return false
if (domainOwner != other.domainOwner) return false
if (durationSeconds != other.durationSeconds) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codeartifact.model.GetAuthorizationTokenRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the domain that is in scope for the generated authorization token.
*/
public var domain: kotlin.String? = null
/**
* The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
*/
public var domainOwner: kotlin.String? = null
/**
* The time, in seconds, that the generated authorization token is valid. Valid values are `0` and any number between `900` (15 minutes) and `43200` (12 hours). A value of `0` will set the expiration of the authorization token to the same expiration of the user's role's temporary credentials.
*/
public var durationSeconds: kotlin.Long? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.GetAuthorizationTokenRequest) : this() {
this.domain = x.domain
this.domainOwner = x.domainOwner
this.durationSeconds = x.durationSeconds
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codeartifact.model.GetAuthorizationTokenRequest = GetAuthorizationTokenRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy