Class BetaResponseOutputMessage.Builder
-
- All Implemented Interfaces:
public final class BetaResponseOutputMessage.BuilderA builder for BetaResponseOutputMessage.
-
-
Method Summary
-
-
Method Detail
-
id
final BetaResponseOutputMessage.Builder id(String id)
The unique ID of the output message.
-
id
final BetaResponseOutputMessage.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
content
final BetaResponseOutputMessage.Builder content(List<BetaResponseOutputMessage.Content> content)
The content of the output message.
-
content
final BetaResponseOutputMessage.Builder content(JsonField<List<BetaResponseOutputMessage.Content>> content)
Sets Builder.content to an arbitrary JSON value.
You should usually call Builder.content with a well-typed
List<Content>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addContent
final BetaResponseOutputMessage.Builder addContent(BetaResponseOutputMessage.Content content)
Adds a single Content to Builder.content.
-
addContent
final BetaResponseOutputMessage.Builder addContent(BetaResponseOutputText outputText)
Alias for calling addContent with
Content.ofOutputText(outputText).
-
addContent
final BetaResponseOutputMessage.Builder addContent(BetaResponseOutputRefusal refusal)
Alias for calling addContent with
Content.ofRefusal(refusal).
-
addRefusalContent
final BetaResponseOutputMessage.Builder addRefusalContent(String refusal)
Alias for calling addContent with the following:
BetaResponseOutputRefusal.builder() .refusal(refusal) .build()
-
role
final BetaResponseOutputMessage.Builder role(JsonValue role)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("assistant")This method is primarily for setting the field to an undocumented or not yet supported value.
-
status
final BetaResponseOutputMessage.Builder status(BetaResponseOutputMessage.Status status)
The status of the message input. One of
in_progress,completed, orincomplete. Populated when input items are returned via API.
-
status
final BetaResponseOutputMessage.Builder status(JsonField<BetaResponseOutputMessage.Status> status)
Sets Builder.status to an arbitrary JSON value.
You should usually call Builder.status with a well-typed Status value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final BetaResponseOutputMessage.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("message")This method is primarily for setting the field to an undocumented or not yet supported value.
-
agent
final BetaResponseOutputMessage.Builder agent(BetaResponseOutputMessage.Agent agent)
The agent that produced this item.
-
agent
final BetaResponseOutputMessage.Builder agent(Optional<BetaResponseOutputMessage.Agent> agent)
Alias for calling Builder.agent with
agent.orElse(null).
-
agent
final BetaResponseOutputMessage.Builder agent(JsonField<BetaResponseOutputMessage.Agent> agent)
Sets Builder.agent to an arbitrary JSON value.
You should usually call Builder.agent with a well-typed Agent value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
phase
final BetaResponseOutputMessage.Builder phase(BetaResponseOutputMessage.Phase phase)
Labels an
assistantmessage as intermediate commentary (commentary) or the final answer (final_answer). For models likegpt-5.3-codexand beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.
-
phase
final BetaResponseOutputMessage.Builder phase(Optional<BetaResponseOutputMessage.Phase> phase)
Alias for calling Builder.phase with
phase.orElse(null).
-
phase
final BetaResponseOutputMessage.Builder phase(JsonField<BetaResponseOutputMessage.Phase> phase)
Sets Builder.phase to an arbitrary JSON value.
You should usually call Builder.phase with a well-typed Phase value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final BetaResponseOutputMessage.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaResponseOutputMessage.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaResponseOutputMessage.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaResponseOutputMessage.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaResponseOutputMessage.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaResponseOutputMessage build()
Returns an immutable instance of BetaResponseOutputMessage.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .content() .status()
-
-
-
-