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

commonMain.aws.sdk.kotlin.services.eventbridge.model.UpdateEndpointRequest.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

public class UpdateEndpointRequest private constructor(builder: Builder) {
    /**
     * A description for the endpoint.
     */
    public val description: kotlin.String? = builder.description
    /**
     * Define event buses used for replication.
     */
    public val eventBuses: List? = builder.eventBuses
    /**
     * The name of the endpoint you want to update.
     */
    public val name: kotlin.String? = builder.name
    /**
     * Whether event replication was enabled or disabled by this request.
     */
    public val replicationConfig: aws.sdk.kotlin.services.eventbridge.model.ReplicationConfig? = builder.replicationConfig
    /**
     * The ARN of the role used by event replication for this request.
     */
    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.UpdateEndpointRequest = Builder().apply(block).build()
    }

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

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

    @SdkDsl
    public class Builder {
        /**
         * A description for the endpoint.
         */
        public var description: kotlin.String? = null
        /**
         * Define event buses used for replication.
         */
        public var eventBuses: List? = null
        /**
         * The name of the endpoint you want to update.
         */
        public var name: kotlin.String? = null
        /**
         * Whether event replication was enabled or disabled by this request.
         */
        public var replicationConfig: aws.sdk.kotlin.services.eventbridge.model.ReplicationConfig? = null
        /**
         * The ARN of the role used by event replication for this request.
         */
        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.UpdateEndpointRequest) : 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.UpdateEndpointRequest = UpdateEndpointRequest(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
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy