commonMain.aws.sdk.kotlin.services.eventbridge.model.CreateEventBusResponse.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 SDK for Kotlin client for EventBridge
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.eventbridge.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateEventBusResponse private constructor(builder: Builder) {
/**
* Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).
*
* For more information, see [Event retry policy and using dead-letter queues](eventbridge/latest/userguide/eb-rule-dlq.html) in the *EventBridge User Guide*.
*/
public val deadLetterConfig: aws.sdk.kotlin.services.eventbridge.model.DeadLetterConfig? = builder.deadLetterConfig
/**
* The event bus description.
*/
public val description: kotlin.String? = builder.description
/**
* The ARN of the new event bus.
*/
public val eventBusArn: kotlin.String? = builder.eventBusArn
/**
* The identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.
*
* For more information, see [Data encryption in EventBridge](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-encryption.html) in the *Amazon EventBridge User Guide*.
*/
public val kmsKeyIdentifier: kotlin.String? = builder.kmsKeyIdentifier
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.eventbridge.model.CreateEventBusResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateEventBusResponse(")
append("deadLetterConfig=$deadLetterConfig,")
append("description=$description,")
append("eventBusArn=$eventBusArn,")
append("kmsKeyIdentifier=$kmsKeyIdentifier")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = deadLetterConfig?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (eventBusArn?.hashCode() ?: 0)
result = 31 * result + (kmsKeyIdentifier?.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 CreateEventBusResponse
if (deadLetterConfig != other.deadLetterConfig) return false
if (description != other.description) return false
if (eventBusArn != other.eventBusArn) return false
if (kmsKeyIdentifier != other.kmsKeyIdentifier) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.eventbridge.model.CreateEventBusResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).
*
* For more information, see [Event retry policy and using dead-letter queues](eventbridge/latest/userguide/eb-rule-dlq.html) in the *EventBridge User Guide*.
*/
public var deadLetterConfig: aws.sdk.kotlin.services.eventbridge.model.DeadLetterConfig? = null
/**
* The event bus description.
*/
public var description: kotlin.String? = null
/**
* The ARN of the new event bus.
*/
public var eventBusArn: kotlin.String? = null
/**
* The identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.
*
* For more information, see [Data encryption in EventBridge](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-encryption.html) in the *Amazon EventBridge User Guide*.
*/
public var kmsKeyIdentifier: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.eventbridge.model.CreateEventBusResponse) : this() {
this.deadLetterConfig = x.deadLetterConfig
this.description = x.description
this.eventBusArn = x.eventBusArn
this.kmsKeyIdentifier = x.kmsKeyIdentifier
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.eventbridge.model.CreateEventBusResponse = CreateEventBusResponse(this)
/**
* construct an [aws.sdk.kotlin.services.eventbridge.model.DeadLetterConfig] inside the given [block]
*/
public fun deadLetterConfig(block: aws.sdk.kotlin.services.eventbridge.model.DeadLetterConfig.Builder.() -> kotlin.Unit) {
this.deadLetterConfig = aws.sdk.kotlin.services.eventbridge.model.DeadLetterConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}