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

commonMain.aws.sdk.kotlin.services.opensearchserverless.model.BatchGetCollectionRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.opensearchserverless.model



public class BatchGetCollectionRequest private constructor(builder: Builder) {
    /**
     * A list of collection IDs. You can't provide names and IDs in the same request. The ID is part of the collection endpoint. You can also retrieve it using the [ListCollections](https://docs.aws.amazon.com/opensearch-service/latest/ServerlessAPIReference/API_ListCollections.html) API.
     */
    public val ids: List? = builder.ids
    /**
     * A list of collection names. You can't provide names and IDs in the same request.
     */
    public val names: List? = builder.names

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

    override fun toString(): kotlin.String = buildString {
        append("BatchGetCollectionRequest(")
        append("ids=$ids,")
        append("names=$names")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = ids?.hashCode() ?: 0
        result = 31 * result + (names?.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 BatchGetCollectionRequest

        if (ids != other.ids) return false
        if (names != other.names) return false

        return true
    }

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

    public class Builder {
        /**
         * A list of collection IDs. You can't provide names and IDs in the same request. The ID is part of the collection endpoint. You can also retrieve it using the [ListCollections](https://docs.aws.amazon.com/opensearch-service/latest/ServerlessAPIReference/API_ListCollections.html) API.
         */
        public var ids: List? = null
        /**
         * A list of collection names. You can't provide names and IDs in the same request.
         */
        public var names: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.opensearchserverless.model.BatchGetCollectionRequest) : this() {
            this.ids = x.ids
            this.names = x.names
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy