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

commonMain.aws.sdk.kotlin.services.sagemakerruntime.model.PayloadPart.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.sagemakerruntime.model



/**
 * A wrapper for pieces of the payload that's returned in response to a streaming inference request. A streaming inference response consists of one or more payload parts.
 */
public class PayloadPart private constructor(builder: Builder) {
    /**
     * A blob that contains part of the response for your streaming inference request.
     */
    public val bytes: kotlin.ByteArray? = builder.bytes

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

    override fun toString(): kotlin.String = buildString {
        append("PayloadPart(")
        append("bytes=*** Sensitive Data Redacted ***")
        append(")")
    }

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

        if (bytes != null) {
            if (other.bytes == null) return false
            if (!bytes.contentEquals(other.bytes)) return false
        } else if (other.bytes != null) return false

        return true
    }

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

    public class Builder {
        /**
         * A blob that contains part of the response for your streaming inference request.
         */
        public var bytes: kotlin.ByteArray? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.sagemakerruntime.model.PayloadPart) : this() {
            this.bytes = x.bytes
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy