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

commonMain.aws.sdk.kotlin.services.cloudsearchdomain.model.UploadDocumentsResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cloudsearchdomain.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains the response to an `UploadDocuments` request.
 */
public class UploadDocumentsResponse private constructor(builder: Builder) {
    /**
     * The number of documents that were added to the search domain.
     */
    public val adds: kotlin.Long = builder.adds
    /**
     * The number of documents that were deleted from the search domain.
     */
    public val deletes: kotlin.Long = builder.deletes
    /**
     * The status of an `UploadDocumentsRequest`.
     */
    public val status: kotlin.String? = builder.status
    /**
     * Any warnings returned by the document service about the documents being uploaded.
     */
    public val warnings: List? = builder.warnings

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

    override fun toString(): kotlin.String = buildString {
        append("UploadDocumentsResponse(")
        append("adds=$adds,")
        append("deletes=$deletes,")
        append("status=$status,")
        append("warnings=$warnings")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = adds.hashCode()
        result = 31 * result + (deletes.hashCode())
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (warnings?.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 UploadDocumentsResponse

        if (adds != other.adds) return false
        if (deletes != other.deletes) return false
        if (status != other.status) return false
        if (warnings != other.warnings) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The number of documents that were added to the search domain.
         */
        public var adds: kotlin.Long = 0L
        /**
         * The number of documents that were deleted from the search domain.
         */
        public var deletes: kotlin.Long = 0L
        /**
         * The status of an `UploadDocumentsRequest`.
         */
        public var status: kotlin.String? = null
        /**
         * Any warnings returned by the document service about the documents being uploaded.
         */
        public var warnings: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudsearchdomain.model.UploadDocumentsResponse) : this() {
            this.adds = x.adds
            this.deletes = x.deletes
            this.status = x.status
            this.warnings = x.warnings
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy