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

commonMain.aws.sdk.kotlin.services.appflow.model.SapoDataConnectorProfileCredentials.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.appflow.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The connector-specific profile credentials required when using SAPOData.
 */
public class SapoDataConnectorProfileCredentials private constructor(builder: Builder) {
    /**
     * The SAPOData basic authentication credentials.
     */
    public val basicAuthCredentials: aws.sdk.kotlin.services.appflow.model.BasicAuthCredentials? = builder.basicAuthCredentials
    /**
     * The SAPOData OAuth type authentication credentials.
     */
    public val oAuthCredentials: aws.sdk.kotlin.services.appflow.model.OAuthCredentials? = builder.oAuthCredentials

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

    override fun toString(): kotlin.String = buildString {
        append("SapoDataConnectorProfileCredentials(")
        append("basicAuthCredentials=$basicAuthCredentials,")
        append("oAuthCredentials=$oAuthCredentials")
        append(")")
    }

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

        if (basicAuthCredentials != other.basicAuthCredentials) return false
        if (oAuthCredentials != other.oAuthCredentials) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The SAPOData basic authentication credentials.
         */
        public var basicAuthCredentials: aws.sdk.kotlin.services.appflow.model.BasicAuthCredentials? = null
        /**
         * The SAPOData OAuth type authentication credentials.
         */
        public var oAuthCredentials: aws.sdk.kotlin.services.appflow.model.OAuthCredentials? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.appflow.model.SapoDataConnectorProfileCredentials) : this() {
            this.basicAuthCredentials = x.basicAuthCredentials
            this.oAuthCredentials = x.oAuthCredentials
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.appflow.model.BasicAuthCredentials] inside the given [block]
         */
        public fun basicAuthCredentials(block: aws.sdk.kotlin.services.appflow.model.BasicAuthCredentials.Builder.() -> kotlin.Unit) {
            this.basicAuthCredentials = aws.sdk.kotlin.services.appflow.model.BasicAuthCredentials.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.appflow.model.OAuthCredentials] inside the given [block]
         */
        public fun oAuthCredentials(block: aws.sdk.kotlin.services.appflow.model.OAuthCredentials.Builder.() -> kotlin.Unit) {
            this.oAuthCredentials = aws.sdk.kotlin.services.appflow.model.OAuthCredentials.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy