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

commonMain.aws.sdk.kotlin.services.comprehend.model.InvalidRequestDetail.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.comprehend.model



/**
 * Provides additional detail about why the request failed:
 * + Document size is too large - Check the size of your file and resubmit the request.
 * + Document type is not supported - Check the file type and resubmit the request.
 * + Too many pages in the document - Check the number of pages in your file and resubmit the request.
 * + Access denied to Amazon Textract - Verify that your account has permission to use Amazon Textract API operations and resubmit the request.
 */
public class InvalidRequestDetail private constructor(builder: Builder) {
    /**
     * Reason code is `INVALID_DOCUMENT`.
     */
    public val reason: aws.sdk.kotlin.services.comprehend.model.InvalidRequestDetailReason? = builder.reason

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

    override fun toString(): kotlin.String = buildString {
        append("InvalidRequestDetail(")
        append("reason=$reason")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = reason?.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 InvalidRequestDetail

        if (reason != other.reason) return false

        return true
    }

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

    public class Builder {
        /**
         * Reason code is `INVALID_DOCUMENT`.
         */
        public var reason: aws.sdk.kotlin.services.comprehend.model.InvalidRequestDetailReason? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.comprehend.model.InvalidRequestDetail) : this() {
            this.reason = x.reason
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.comprehend.model.InvalidRequestDetail = InvalidRequestDetail(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy