public InvokeModelResult withBody(java.nio.ByteBuffer body) {
        setBody(body);
        return this;
    }
<p>
Inference response from the model in the format specified in the <code>contentType</code> header. To see the
format and content of the request and response bodies for different models, refer to <a
href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters</a>.
</p>
<p>
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service.
Users of the SDK should not perform Base64 encoding on this field.
</p>
<p>
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will
be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or
ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future
major version of the SDK.
</p>

@param body
       Inference response from the model in the format specified in the <code>contentType</code> header. To see
       the format and content of the request and response bodies for different models, refer to <a
       href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference
       parameters</a>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-bedrockruntime/src/main/java/com/amazonaws/services/bedrockruntime/model/InvokeModelResult.java