commonMain.aws.sdk.kotlin.services.eventbridge.model.CreateEndpointRequest.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 CreateEndpointRequest private constructor(builder: Builder) {
/**
* A description of the global endpoint.
*/
public val description: kotlin.String? = builder.description
/**
* Define the event buses used.
*
* The names of the event buses must be identical in each Region.
*/
public val eventBuses: List? = builder.eventBuses
/**
* The name of the global endpoint. For example, `"Name":"us-east-2-custom_bus_A-endpoint"`.
*/
public val name: kotlin.String? = builder.name
/**
* Enable or disable event replication. The default state is `ENABLED` which means you must supply a `RoleArn`. If you don't have a `RoleArn` or you don't want event replication enabled, set the state to `DISABLED`.
*/
public val replicationConfig: aws.sdk.kotlin.services.eventbridge.model.ReplicationConfig? = builder.replicationConfig
/**
* The ARN of the role used for replication.
*/
public val roleArn: kotlin.String? = builder.roleArn
/**
* Configure the routing policy, including the health check and secondary Region..
*/
public val routingConfig: aws.sdk.kotlin.services.eventbridge.model.RoutingConfig? = builder.routingConfig
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.eventbridge.model.CreateEndpointRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateEndpointRequest(")
append("description=$description,")
append("eventBuses=$eventBuses,")
append("name=$name,")
append("replicationConfig=$replicationConfig,")
append("roleArn=$roleArn,")
append("routingConfig=$routingConfig")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = description?.hashCode() ?: 0
result = 31 * result + (eventBuses?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (replicationConfig?.hashCode() ?: 0)
result = 31 * result + (roleArn?.hashCode() ?: 0)
result = 31 * result + (routingConfig?.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 CreateEndpointRequest
if (description != other.description) return false
if (eventBuses != other.eventBuses) return false
if (name != other.name) return false
if (replicationConfig != other.replicationConfig) return false
if (roleArn != other.roleArn) return false
if (routingConfig != other.routingConfig) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.eventbridge.model.CreateEndpointRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A description of the global endpoint.
*/
public var description: kotlin.String? = null
/**
* Define the event buses used.
*
* The names of the event buses must be identical in each Region.
*/
public var eventBuses: List? = null
/**
* The name of the global endpoint. For example, `"Name":"us-east-2-custom_bus_A-endpoint"`.
*/
public var name: kotlin.String? = null
/**
* Enable or disable event replication. The default state is `ENABLED` which means you must supply a `RoleArn`. If you don't have a `RoleArn` or you don't want event replication enabled, set the state to `DISABLED`.
*/
public var replicationConfig: aws.sdk.kotlin.services.eventbridge.model.ReplicationConfig? = null
/**
* The ARN of the role used for replication.
*/
public var roleArn: kotlin.String? = null
/**
* Configure the routing policy, including the health check and secondary Region..
*/
public var routingConfig: aws.sdk.kotlin.services.eventbridge.model.RoutingConfig? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.eventbridge.model.CreateEndpointRequest) : this() {
this.description = x.description
this.eventBuses = x.eventBuses
this.name = x.name
this.replicationConfig = x.replicationConfig
this.roleArn = x.roleArn
this.routingConfig = x.routingConfig
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.eventbridge.model.CreateEndpointRequest = CreateEndpointRequest(this)
/**
* construct an [aws.sdk.kotlin.services.eventbridge.model.ReplicationConfig] inside the given [block]
*/
public fun replicationConfig(block: aws.sdk.kotlin.services.eventbridge.model.ReplicationConfig.Builder.() -> kotlin.Unit) {
this.replicationConfig = aws.sdk.kotlin.services.eventbridge.model.ReplicationConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.eventbridge.model.RoutingConfig] inside the given [block]
*/
public fun routingConfig(block: aws.sdk.kotlin.services.eventbridge.model.RoutingConfig.Builder.() -> kotlin.Unit) {
this.routingConfig = aws.sdk.kotlin.services.eventbridge.model.RoutingConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}