All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.glue.model.OAuth2ClientApplication.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.glue.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The OAuth2 client app used for the connection.
 */
public class OAuth2ClientApplication private constructor(builder: Builder) {
    /**
     * The reference to the SaaS-side client app that is Amazon Web Services managed.
     */
    public val awsManagedClientApplicationReference: kotlin.String? = builder.awsManagedClientApplicationReference
    /**
     * The client application clientID if the ClientAppType is `USER_MANAGED`.
     */
    public val userManagedClientApplicationClientId: kotlin.String? = builder.userManagedClientApplicationClientId

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.OAuth2ClientApplication = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("OAuth2ClientApplication(")
        append("awsManagedClientApplicationReference=$awsManagedClientApplicationReference,")
        append("userManagedClientApplicationClientId=$userManagedClientApplicationClientId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = awsManagedClientApplicationReference?.hashCode() ?: 0
        result = 31 * result + (userManagedClientApplicationClientId?.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 OAuth2ClientApplication

        if (awsManagedClientApplicationReference != other.awsManagedClientApplicationReference) return false
        if (userManagedClientApplicationClientId != other.userManagedClientApplicationClientId) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.OAuth2ClientApplication = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The reference to the SaaS-side client app that is Amazon Web Services managed.
         */
        public var awsManagedClientApplicationReference: kotlin.String? = null
        /**
         * The client application clientID if the ClientAppType is `USER_MANAGED`.
         */
        public var userManagedClientApplicationClientId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.OAuth2ClientApplication) : this() {
            this.awsManagedClientApplicationReference = x.awsManagedClientApplicationReference
            this.userManagedClientApplicationClientId = x.userManagedClientApplicationClientId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.glue.model.OAuth2ClientApplication = OAuth2ClientApplication(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy