commonMain.aws.sdk.kotlin.services.ssooidc.model.StartDeviceAuthorizationResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ssooidc-jvm Show documentation
Show all versions of ssooidc-jvm Show documentation
The AWS SDK for Kotlin client for SSO OIDC
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssooidc.model
import aws.smithy.kotlin.runtime.SdkDsl
public class StartDeviceAuthorizationResponse private constructor(builder: Builder) {
/**
* The short-lived code that is used by the device when polling for a session token.
*/
public val deviceCode: kotlin.String? = builder.deviceCode
/**
* Indicates the number of seconds in which the verification code will become invalid.
*/
public val expiresIn: kotlin.Int = builder.expiresIn
/**
* Indicates the number of seconds the client must wait between attempts when polling for a session.
*/
public val interval: kotlin.Int = builder.interval
/**
* A one-time user verification code. This is needed to authorize an in-use device.
*/
public val userCode: kotlin.String? = builder.userCode
/**
* The URI of the verification page that takes the `userCode` to authorize the device.
*/
public val verificationUri: kotlin.String? = builder.verificationUri
/**
* An alternate URL that the client can use to automatically launch a browser. This process skips the manual step in which the user visits the verification page and enters their code.
*/
public val verificationUriComplete: kotlin.String? = builder.verificationUriComplete
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssooidc.model.StartDeviceAuthorizationResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StartDeviceAuthorizationResponse(")
append("deviceCode=$deviceCode,")
append("expiresIn=$expiresIn,")
append("interval=$interval,")
append("userCode=$userCode,")
append("verificationUri=$verificationUri,")
append("verificationUriComplete=$verificationUriComplete")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = deviceCode?.hashCode() ?: 0
result = 31 * result + (expiresIn)
result = 31 * result + (interval)
result = 31 * result + (userCode?.hashCode() ?: 0)
result = 31 * result + (verificationUri?.hashCode() ?: 0)
result = 31 * result + (verificationUriComplete?.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 StartDeviceAuthorizationResponse
if (deviceCode != other.deviceCode) return false
if (expiresIn != other.expiresIn) return false
if (interval != other.interval) return false
if (userCode != other.userCode) return false
if (verificationUri != other.verificationUri) return false
if (verificationUriComplete != other.verificationUriComplete) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssooidc.model.StartDeviceAuthorizationResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The short-lived code that is used by the device when polling for a session token.
*/
public var deviceCode: kotlin.String? = null
/**
* Indicates the number of seconds in which the verification code will become invalid.
*/
public var expiresIn: kotlin.Int = 0
/**
* Indicates the number of seconds the client must wait between attempts when polling for a session.
*/
public var interval: kotlin.Int = 0
/**
* A one-time user verification code. This is needed to authorize an in-use device.
*/
public var userCode: kotlin.String? = null
/**
* The URI of the verification page that takes the `userCode` to authorize the device.
*/
public var verificationUri: kotlin.String? = null
/**
* An alternate URL that the client can use to automatically launch a browser. This process skips the manual step in which the user visits the verification page and enters their code.
*/
public var verificationUriComplete: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssooidc.model.StartDeviceAuthorizationResponse) : this() {
this.deviceCode = x.deviceCode
this.expiresIn = x.expiresIn
this.interval = x.interval
this.userCode = x.userCode
this.verificationUri = x.verificationUri
this.verificationUriComplete = x.verificationUriComplete
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssooidc.model.StartDeviceAuthorizationResponse = StartDeviceAuthorizationResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}