commonMain.aws.sdk.kotlin.services.glue.model.AuthorizationCodeProperties.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The set of properties required for the the OAuth2 `AUTHORIZATION_CODE` grant type workflow.
*/
public class AuthorizationCodeProperties private constructor(builder: Builder) {
/**
* An authorization code to be used in the third leg of the `AUTHORIZATION_CODE` grant workflow. This is a single-use code which becomes invalid once exchanged for an access token, thus it is acceptable to have this value as a request parameter.
*/
public val authorizationCode: kotlin.String? = builder.authorizationCode
/**
* The redirect URI where the user gets redirected to by authorization server when issuing an authorization code. The URI is subsequently used when the authorization code is exchanged for an access token.
*/
public val redirectUri: kotlin.String? = builder.redirectUri
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.AuthorizationCodeProperties = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AuthorizationCodeProperties(")
append("authorizationCode=$authorizationCode,")
append("redirectUri=$redirectUri")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = authorizationCode?.hashCode() ?: 0
result = 31 * result + (redirectUri?.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 AuthorizationCodeProperties
if (authorizationCode != other.authorizationCode) return false
if (redirectUri != other.redirectUri) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.AuthorizationCodeProperties = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An authorization code to be used in the third leg of the `AUTHORIZATION_CODE` grant workflow. This is a single-use code which becomes invalid once exchanged for an access token, thus it is acceptable to have this value as a request parameter.
*/
public var authorizationCode: kotlin.String? = null
/**
* The redirect URI where the user gets redirected to by authorization server when issuing an authorization code. The URI is subsequently used when the authorization code is exchanged for an access token.
*/
public var redirectUri: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.AuthorizationCodeProperties) : this() {
this.authorizationCode = x.authorizationCode
this.redirectUri = x.redirectUri
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.AuthorizationCodeProperties = AuthorizationCodeProperties(this)
internal fun correctErrors(): Builder {
return this
}
}
}