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

commonMain.aws.sdk.kotlin.services.eventbridge.endpoints.EventBridgeEndpointParameters.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.endpoints



/**
 * The set of values necessary for endpoint resolution.
 */
public class EventBridgeEndpointParameters private constructor(builder: Builder) {
    /**
     * Override the endpoint used to send this request
     */
    public val endpoint: String? = builder.endpoint

    /**
     * Operation parameter for EndpointId
     */
    public val endpointId: String? = builder.endpointId

    /**
     * The AWS region used to dispatch the request.
     */
    public val region: String? = builder.region

    /**
     * When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
     */
    public val useDualStack: Boolean? = requireNotNull(builder.useDualStack) { "endpoint provider parameter #useDualStack is required" }

    /**
     * When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
     */
    public val useFips: Boolean? = requireNotNull(builder.useFips) { "endpoint provider parameter #useFips is required" }

    public companion object {
        public inline operator fun invoke(block: Builder.() -> Unit): EventBridgeEndpointParameters = Builder().apply(block).build()
    }

    public override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (other !is EventBridgeEndpointParameters) return false
        if (this.endpoint != other.endpoint) return false
        if (this.endpointId != other.endpointId) return false
        if (this.region != other.region) return false
        if (this.useDualStack != other.useDualStack) return false
        if (this.useFips != other.useFips) return false
        return true
    }

    public override fun hashCode(): Int {
        var result = endpoint?.hashCode() ?: 0
        result = 31 * result + (endpointId?.hashCode() ?: 0)
        result = 31 * result + (region?.hashCode() ?: 0)
        result = 31 * result + (useDualStack?.hashCode() ?: 0)
        result = 31 * result + (useFips?.hashCode() ?: 0)
        return result
    }

    public override fun toString(): String = buildString {
        append("EventBridgeEndpointParameters(")
        append("endpoint=$endpoint,")
        append("endpointId=$endpointId,")
        append("region=$region,")
        append("useDualStack=$useDualStack,")
        append("useFips=$useFips)")
    }

    public fun copy(block: Builder.() -> Unit = {}): EventBridgeEndpointParameters {
        return Builder().apply {
            endpoint = [email protected]
            endpointId = [email protected]
            region = [email protected]
            useDualStack = [email protected]
            useFips = [email protected]
            block()
        }
        .build()
    }

    public class Builder {
        /**
         * Override the endpoint used to send this request
         */
        public var endpoint: String? = null

        /**
         * Operation parameter for EndpointId
         */
        public var endpointId: String? = null

        /**
         * The AWS region used to dispatch the request.
         */
        public var region: String? = null

        /**
         * When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
         */
        public var useDualStack: Boolean? = false

        /**
         * When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
         */
        public var useFips: Boolean? = false

        public fun build(): EventBridgeEndpointParameters = EventBridgeEndpointParameters(this)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy