commonMain.aws.sdk.kotlin.services.cloudwatchevents.model.CreateConnectionAuthRequestParameters.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudwatchevents-jvm Show documentation
Show all versions of cloudwatchevents-jvm Show documentation
The AWS SDK for Kotlin client for CloudWatch Events
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudwatchevents.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.cloudwatchevents.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.cloudwatchevents.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.cloudwatchevents.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.cloudwatchevents.model.CreateConnectionOAuthRequestParameters? = builder.oAuthParameters
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatchevents.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.cloudwatchevents.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.cloudwatchevents.model.CreateConnectionApiKeyAuthRequestParameters? = null
/**
* A `CreateConnectionBasicAuthRequestParameters` object that contains the Basic authorization parameters to use for the connection.
*/
public var basicAuthParameters: aws.sdk.kotlin.services.cloudwatchevents.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.cloudwatchevents.model.ConnectionHttpParameters? = null
/**
* A `CreateConnectionOAuthRequestParameters` object that contains the OAuth authorization parameters to use for the connection.
*/
public var oAuthParameters: aws.sdk.kotlin.services.cloudwatchevents.model.CreateConnectionOAuthRequestParameters? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchevents.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.cloudwatchevents.model.CreateConnectionAuthRequestParameters = CreateConnectionAuthRequestParameters(this)
/**
* construct an [aws.sdk.kotlin.services.cloudwatchevents.model.CreateConnectionApiKeyAuthRequestParameters] inside the given [block]
*/
public fun apiKeyAuthParameters(block: aws.sdk.kotlin.services.cloudwatchevents.model.CreateConnectionApiKeyAuthRequestParameters.Builder.() -> kotlin.Unit) {
this.apiKeyAuthParameters = aws.sdk.kotlin.services.cloudwatchevents.model.CreateConnectionApiKeyAuthRequestParameters.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.cloudwatchevents.model.CreateConnectionBasicAuthRequestParameters] inside the given [block]
*/
public fun basicAuthParameters(block: aws.sdk.kotlin.services.cloudwatchevents.model.CreateConnectionBasicAuthRequestParameters.Builder.() -> kotlin.Unit) {
this.basicAuthParameters = aws.sdk.kotlin.services.cloudwatchevents.model.CreateConnectionBasicAuthRequestParameters.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.cloudwatchevents.model.ConnectionHttpParameters] inside the given [block]
*/
public fun invocationHttpParameters(block: aws.sdk.kotlin.services.cloudwatchevents.model.ConnectionHttpParameters.Builder.() -> kotlin.Unit) {
this.invocationHttpParameters = aws.sdk.kotlin.services.cloudwatchevents.model.ConnectionHttpParameters.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.cloudwatchevents.model.CreateConnectionOAuthRequestParameters] inside the given [block]
*/
public fun oAuthParameters(block: aws.sdk.kotlin.services.cloudwatchevents.model.CreateConnectionOAuthRequestParameters.Builder.() -> kotlin.Unit) {
this.oAuthParameters = aws.sdk.kotlin.services.cloudwatchevents.model.CreateConnectionOAuthRequestParameters.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}