commonMain.aws.sdk.kotlin.services.eventbridge.model.CreateConnectionAuthRequestParameters.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eventbridge-jvm Show documentation
Show all versions of eventbridge-jvm Show documentation
The AWS Kotlin client for EventBridge
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.eventbridge.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The authorization parameters for the connection.
*
* You must include only authorization parameters for the `AuthorizationType` you specify.
*/
public class CreateConnectionAuthRequestParameters private constructor(builder: Builder) {
/**
* The API key authorization parameters to use for the connection.
*/
public val apiKeyAuthParameters: aws.sdk.kotlin.services.eventbridge.model.CreateConnectionApiKeyAuthRequestParameters? = builder.apiKeyAuthParameters
/**
* The Basic authorization parameters to use for the connection.
*/
public val basicAuthParameters: aws.sdk.kotlin.services.eventbridge.model.CreateConnectionBasicAuthRequestParameters? = builder.basicAuthParameters
/**
* If you specify a private OAuth endpoint, the parameters for EventBridge to use when authenticating against the endpoint.
*
* For more information, see [Authorization methods for connections](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-target-connection-auth.html) in the **Amazon EventBridge User Guide**.
*/
public val connectivityParameters: aws.sdk.kotlin.services.eventbridge.model.ConnectivityResourceParameters? = builder.connectivityParameters
/**
* 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
/**
* 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("connectivityParameters=$connectivityParameters,")
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 + (connectivityParameters?.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 (connectivityParameters != other.connectivityParameters) 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 {
/**
* The API key authorization parameters to use for the connection.
*/
public var apiKeyAuthParameters: aws.sdk.kotlin.services.eventbridge.model.CreateConnectionApiKeyAuthRequestParameters? = null
/**
* The Basic authorization parameters to use for the connection.
*/
public var basicAuthParameters: aws.sdk.kotlin.services.eventbridge.model.CreateConnectionBasicAuthRequestParameters? = null
/**
* If you specify a private OAuth endpoint, the parameters for EventBridge to use when authenticating against the endpoint.
*
* For more information, see [Authorization methods for connections](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-target-connection-auth.html) in the **Amazon EventBridge User Guide**.
*/
public var connectivityParameters: aws.sdk.kotlin.services.eventbridge.model.ConnectivityResourceParameters? = null
/**
* 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
/**
* 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.connectivityParameters = x.connectivityParameters
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.ConnectivityResourceParameters] inside the given [block]
*/
public fun connectivityParameters(block: aws.sdk.kotlin.services.eventbridge.model.ConnectivityResourceParameters.Builder.() -> kotlin.Unit) {
this.connectivityParameters = aws.sdk.kotlin.services.eventbridge.model.ConnectivityResourceParameters.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 - 2025 Weber Informatics LLC | Privacy Policy