
commonMain.aws.sdk.kotlin.services.bedrockruntime.model.InvokeModelWithResponseStreamResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockruntime.model
import aws.smithy.kotlin.runtime.SdkDsl
import kotlinx.coroutines.flow.Flow
public class InvokeModelWithResponseStreamResponse private constructor(builder: Builder) {
/**
* Inference response from the model in the format specified by the `contentType` header. To see the format and content of this field for different models, refer to [Inference parameters](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html).
*/
public val body: Flow? = builder.body
/**
* The MIME type of the inference result.
*/
public val contentType: kotlin.String = requireNotNull(builder.contentType) { "A non-null value must be provided for contentType" }
/**
* Model performance settings for the request.
*/
public val performanceConfigLatency: aws.sdk.kotlin.services.bedrockruntime.model.PerformanceConfigLatency? = builder.performanceConfigLatency
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockruntime.model.InvokeModelWithResponseStreamResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("InvokeModelWithResponseStreamResponse(")
append("body=$body,")
append("contentType=$contentType,")
append("performanceConfigLatency=$performanceConfigLatency")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = body?.hashCode() ?: 0
result = 31 * result + (contentType.hashCode())
result = 31 * result + (performanceConfigLatency?.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 InvokeModelWithResponseStreamResponse
if (body != other.body) return false
if (contentType != other.contentType) return false
if (performanceConfigLatency != other.performanceConfigLatency) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockruntime.model.InvokeModelWithResponseStreamResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Inference response from the model in the format specified by the `contentType` header. To see the format and content of this field for different models, refer to [Inference parameters](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html).
*/
public var body: Flow? = null
/**
* The MIME type of the inference result.
*/
public var contentType: kotlin.String? = null
/**
* Model performance settings for the request.
*/
public var performanceConfigLatency: aws.sdk.kotlin.services.bedrockruntime.model.PerformanceConfigLatency? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockruntime.model.InvokeModelWithResponseStreamResponse) : this() {
this.body = x.body
this.contentType = x.contentType
this.performanceConfigLatency = x.performanceConfigLatency
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockruntime.model.InvokeModelWithResponseStreamResponse = InvokeModelWithResponseStreamResponse(this)
internal fun correctErrors(): Builder {
if (contentType == null) contentType = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy