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

commonMain.aws.sdk.kotlin.services.opensearch.model.InboundConnection.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.opensearch.model



/**
 * Describes an inbound cross-cluster connection for Amazon OpenSearch Service. For more information, see [Cross-cluster search for Amazon OpenSearch Service](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cross-cluster-search.html).
 */
public class InboundConnection private constructor(builder: Builder) {
    /**
     * The unique identifier of the connection.
     */
    public val connectionId: kotlin.String? = builder.connectionId
    /**
     * The connection mode.
     */
    public val connectionMode: aws.sdk.kotlin.services.opensearch.model.ConnectionMode? = builder.connectionMode
    /**
     * The current status of the connection.
     */
    public val connectionStatus: aws.sdk.kotlin.services.opensearch.model.InboundConnectionStatus? = builder.connectionStatus
    /**
     * Information about the source (local) domain.
     */
    public val localDomainInfo: aws.sdk.kotlin.services.opensearch.model.DomainInformationContainer? = builder.localDomainInfo
    /**
     * Information about the destination (remote) domain.
     */
    public val remoteDomainInfo: aws.sdk.kotlin.services.opensearch.model.DomainInformationContainer? = builder.remoteDomainInfo

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.opensearch.model.InboundConnection = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("InboundConnection(")
        append("connectionId=$connectionId,")
        append("connectionMode=$connectionMode,")
        append("connectionStatus=$connectionStatus,")
        append("localDomainInfo=$localDomainInfo,")
        append("remoteDomainInfo=$remoteDomainInfo")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = connectionId?.hashCode() ?: 0
        result = 31 * result + (connectionMode?.hashCode() ?: 0)
        result = 31 * result + (connectionStatus?.hashCode() ?: 0)
        result = 31 * result + (localDomainInfo?.hashCode() ?: 0)
        result = 31 * result + (remoteDomainInfo?.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 InboundConnection

        if (connectionId != other.connectionId) return false
        if (connectionMode != other.connectionMode) return false
        if (connectionStatus != other.connectionStatus) return false
        if (localDomainInfo != other.localDomainInfo) return false
        if (remoteDomainInfo != other.remoteDomainInfo) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.opensearch.model.InboundConnection = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The unique identifier of the connection.
         */
        public var connectionId: kotlin.String? = null
        /**
         * The connection mode.
         */
        public var connectionMode: aws.sdk.kotlin.services.opensearch.model.ConnectionMode? = null
        /**
         * The current status of the connection.
         */
        public var connectionStatus: aws.sdk.kotlin.services.opensearch.model.InboundConnectionStatus? = null
        /**
         * Information about the source (local) domain.
         */
        public var localDomainInfo: aws.sdk.kotlin.services.opensearch.model.DomainInformationContainer? = null
        /**
         * Information about the destination (remote) domain.
         */
        public var remoteDomainInfo: aws.sdk.kotlin.services.opensearch.model.DomainInformationContainer? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.opensearch.model.InboundConnection) : this() {
            this.connectionId = x.connectionId
            this.connectionMode = x.connectionMode
            this.connectionStatus = x.connectionStatus
            this.localDomainInfo = x.localDomainInfo
            this.remoteDomainInfo = x.remoteDomainInfo
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.opensearch.model.InboundConnection = InboundConnection(this)

        /**
         * construct an [aws.sdk.kotlin.services.opensearch.model.InboundConnectionStatus] inside the given [block]
         */
        public fun connectionStatus(block: aws.sdk.kotlin.services.opensearch.model.InboundConnectionStatus.Builder.() -> kotlin.Unit) {
            this.connectionStatus = aws.sdk.kotlin.services.opensearch.model.InboundConnectionStatus.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.opensearch.model.DomainInformationContainer] inside the given [block]
         */
        public fun localDomainInfo(block: aws.sdk.kotlin.services.opensearch.model.DomainInformationContainer.Builder.() -> kotlin.Unit) {
            this.localDomainInfo = aws.sdk.kotlin.services.opensearch.model.DomainInformationContainer.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.opensearch.model.DomainInformationContainer] inside the given [block]
         */
        public fun remoteDomainInfo(block: aws.sdk.kotlin.services.opensearch.model.DomainInformationContainer.Builder.() -> kotlin.Unit) {
            this.remoteDomainInfo = aws.sdk.kotlin.services.opensearch.model.DomainInformationContainer.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy