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

commonMain.aws.sdk.kotlin.services.eventbridge.model.CreateConnectionAuthRequestParameters.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 for the connection.
 */
public class CreateConnectionAuthRequestParameters private constructor(builder: Builder) {
    /**
     * A `CreateConnectionApiKeyAuthRequestParameters` object that contains the API key authorization parameters to use for the connection.
     */
    public val apiKeyAuthParameters: aws.sdk.kotlin.services.eventbridge.model.CreateConnectionApiKeyAuthRequestParameters? = builder.apiKeyAuthParameters
    /**
     * A `CreateConnectionBasicAuthRequestParameters` object that contains the Basic authorization parameters to use for the connection.
     */
    public val basicAuthParameters: aws.sdk.kotlin.services.eventbridge.model.CreateConnectionBasicAuthRequestParameters? = builder.basicAuthParameters
    /**
     * A `ConnectionHttpParameters` object that contains the API key authorization parameters to use for the connection. Note that if you include additional parameters for the target of a rule via `HttpParameters`, including query strings, the parameters added for the connection take precedence.
     */
    public val invocationHttpParameters: aws.sdk.kotlin.services.eventbridge.model.ConnectionHttpParameters? = builder.invocationHttpParameters
    /**
     * A `CreateConnectionOAuthRequestParameters` object that contains the OAuth authorization parameters to use for the connection.
     */
    public val oAuthParameters: aws.sdk.kotlin.services.eventbridge.model.CreateConnectionOAuthRequestParameters? = builder.oAuthParameters

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

    override fun toString(): kotlin.String = buildString {
        append("CreateConnectionAuthRequestParameters(")
        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 CreateConnectionAuthRequestParameters

        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.CreateConnectionAuthRequestParameters = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * A `CreateConnectionApiKeyAuthRequestParameters` object that contains the API key authorization parameters to use for the connection.
         */
        public var apiKeyAuthParameters: aws.sdk.kotlin.services.eventbridge.model.CreateConnectionApiKeyAuthRequestParameters? = null
        /**
         * A `CreateConnectionBasicAuthRequestParameters` object that contains the Basic authorization parameters to use for the connection.
         */
        public var basicAuthParameters: aws.sdk.kotlin.services.eventbridge.model.CreateConnectionBasicAuthRequestParameters? = null
        /**
         * A `ConnectionHttpParameters` object that contains the API key authorization parameters to use for the connection. Note that if you include additional parameters for the target of a rule via `HttpParameters`, including query strings, the parameters added for the connection take precedence.
         */
        public var invocationHttpParameters: aws.sdk.kotlin.services.eventbridge.model.ConnectionHttpParameters? = null
        /**
         * A `CreateConnectionOAuthRequestParameters` object that contains the OAuth authorization parameters to use for the connection.
         */
        public var oAuthParameters: aws.sdk.kotlin.services.eventbridge.model.CreateConnectionOAuthRequestParameters? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.eventbridge.model.CreateConnectionAuthRequestParameters) : 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.CreateConnectionAuthRequestParameters = CreateConnectionAuthRequestParameters(this)

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

        /**
         * construct an [aws.sdk.kotlin.services.eventbridge.model.CreateConnectionBasicAuthRequestParameters] inside the given [block]
         */
        public fun basicAuthParameters(block: aws.sdk.kotlin.services.eventbridge.model.CreateConnectionBasicAuthRequestParameters.Builder.() -> kotlin.Unit) {
            this.basicAuthParameters = aws.sdk.kotlin.services.eventbridge.model.CreateConnectionBasicAuthRequestParameters.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.CreateConnectionOAuthRequestParameters] inside the given [block]
         */
        public fun oAuthParameters(block: aws.sdk.kotlin.services.eventbridge.model.CreateConnectionOAuthRequestParameters.Builder.() -> kotlin.Unit) {
            this.oAuthParameters = aws.sdk.kotlin.services.eventbridge.model.CreateConnectionOAuthRequestParameters.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy