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

commonMain.aws.sdk.kotlin.services.eventbridge.model.ConnectionAuthResponseParameters.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.eventbridge.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains the authorization parameters to use for the connection.
 */
public class ConnectionAuthResponseParameters private constructor(builder: Builder) {
    /**
     * The API Key parameters to use for authorization.
     */
    public val apiKeyAuthParameters: aws.sdk.kotlin.services.eventbridge.model.ConnectionApiKeyAuthResponseParameters? = builder.apiKeyAuthParameters
    /**
     * The authorization parameters for Basic authorization.
     */
    public val basicAuthParameters: aws.sdk.kotlin.services.eventbridge.model.ConnectionBasicAuthResponseParameters? = builder.basicAuthParameters
    /**
     * Additional parameters for the connection that are passed through with every invocation to the HTTP endpoint.
     */
    public val invocationHttpParameters: aws.sdk.kotlin.services.eventbridge.model.ConnectionHttpParameters? = builder.invocationHttpParameters
    /**
     * The OAuth parameters to use for authorization.
     */
    public val oAuthParameters: aws.sdk.kotlin.services.eventbridge.model.ConnectionOAuthResponseParameters? = builder.oAuthParameters

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

    override fun toString(): kotlin.String = buildString {
        append("ConnectionAuthResponseParameters(")
        append("apiKeyAuthParameters=$apiKeyAuthParameters,")
        append("basicAuthParameters=$basicAuthParameters,")
        append("invocationHttpParameters=$invocationHttpParameters,")
        append("oAuthParameters=$oAuthParameters")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = apiKeyAuthParameters?.hashCode() ?: 0
        result = 31 * result + (basicAuthParameters?.hashCode() ?: 0)
        result = 31 * result + (invocationHttpParameters?.hashCode() ?: 0)
        result = 31 * result + (oAuthParameters?.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 ConnectionAuthResponseParameters

        if (apiKeyAuthParameters != other.apiKeyAuthParameters) return false
        if (basicAuthParameters != other.basicAuthParameters) return false
        if (invocationHttpParameters != other.invocationHttpParameters) return false
        if (oAuthParameters != other.oAuthParameters) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The API Key parameters to use for authorization.
         */
        public var apiKeyAuthParameters: aws.sdk.kotlin.services.eventbridge.model.ConnectionApiKeyAuthResponseParameters? = null
        /**
         * The authorization parameters for Basic authorization.
         */
        public var basicAuthParameters: aws.sdk.kotlin.services.eventbridge.model.ConnectionBasicAuthResponseParameters? = null
        /**
         * Additional parameters for the connection that are passed through with every invocation to the HTTP endpoint.
         */
        public var invocationHttpParameters: aws.sdk.kotlin.services.eventbridge.model.ConnectionHttpParameters? = null
        /**
         * The OAuth parameters to use for authorization.
         */
        public var oAuthParameters: aws.sdk.kotlin.services.eventbridge.model.ConnectionOAuthResponseParameters? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.eventbridge.model.ConnectionAuthResponseParameters) : this() {
            this.apiKeyAuthParameters = x.apiKeyAuthParameters
            this.basicAuthParameters = x.basicAuthParameters
            this.invocationHttpParameters = x.invocationHttpParameters
            this.oAuthParameters = x.oAuthParameters
        }

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy