
commonMain.aws.sdk.kotlin.services.sagemakerruntime.model.ResponseStream.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sagemakerruntime.model
/**
* A stream of payload parts. Each part contains a portion of the response for a streaming inference request.
*/
public sealed class ResponseStream {
/**
* 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 data class PayloadPart(val value: aws.sdk.kotlin.services.sagemakerruntime.model.PayloadPart) : aws.sdk.kotlin.services.sagemakerruntime.model.ResponseStream() {
}
public object SdkUnknown : aws.sdk.kotlin.services.sagemakerruntime.model.ResponseStream() {
}
/**
* Casts this [ResponseStream] as a [PayloadPart] and retrieves its [aws.sdk.kotlin.services.sagemakerruntime.model.PayloadPart] value. Throws an exception if the [ResponseStream] is not a
* [PayloadPart].
*/
public fun asPayloadPart(): aws.sdk.kotlin.services.sagemakerruntime.model.PayloadPart = (this as ResponseStream.PayloadPart).value
/**
* Casts this [ResponseStream] as a [PayloadPart] and retrieves its [aws.sdk.kotlin.services.sagemakerruntime.model.PayloadPart] value. Returns null if the [ResponseStream] is not a [PayloadPart].
*/
public fun asPayloadPartOrNull(): aws.sdk.kotlin.services.sagemakerruntime.model.PayloadPart? = (this as? ResponseStream.PayloadPart)?.value
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy