Set the result to a single content block (back-compat convenience).
The first (or only) content block, for the common single-block reply. Returns an empty text block when there are no blocks. For tool-use replies (which carry several tool_use blocks) iterate contentBlocks.
The typed view of stopReason, or null when it is empty or a provider-specific value not in the StopReason enum.
Build a single-text-block reply, the common onSampling case: an assistant message whose content is one Content.makeText(text) block. Parity with Content.makeText / ElicitResult.accept — saves a handler from assembling the struct by hand. stopReason defaults to "endTurn" and role to "assistant".
All content blocks of the reply. The spec models content as a single block OR an array of blocks (`SamplingMessageContentBlock | SamplingMessageContentBlock[]); a tool-use reply (stopReason:"toolUse"`) returns an array of tool_use blocks. This field holds every block so no tool_use id/name/input is dropped. For the common single-block reply, use the content accessor.
optional message-level _meta object (CreateMessageResult extends SamplingMessage)
the model identifier the client actually used
"user" or "assistant" (typically "assistant")
raw stop-reason wire string (may be empty)
Result of a sampling/createMessage request, returned by the client. Parse the client's reply with fromJson; build one (client side) with the constructor-style fields and toJson. stopReason is the raw wire string (which may be a known StopReason or a provider-specific value); use stopReasonEnum for the typed view.