Class BetaManagedAgentsAgentToolResultEvent.Builder
-
- All Implemented Interfaces:
public final class BetaManagedAgentsAgentToolResultEvent.BuilderA builder for BetaManagedAgentsAgentToolResultEvent.
-
-
Method Summary
-
-
Method Detail
-
id
final BetaManagedAgentsAgentToolResultEvent.Builder id(String id)
Unique identifier for this event.
-
id
final BetaManagedAgentsAgentToolResultEvent.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.
-
processedAt
final BetaManagedAgentsAgentToolResultEvent.Builder processedAt(OffsetDateTime processedAt)
A timestamp in RFC 3339 format
-
processedAt
final BetaManagedAgentsAgentToolResultEvent.Builder processedAt(JsonField<OffsetDateTime> processedAt)
Sets Builder.processedAt to an arbitrary JSON value.
You should usually call Builder.processedAt with a well-typed OffsetDateTime value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
toolUseId
final BetaManagedAgentsAgentToolResultEvent.Builder toolUseId(String toolUseId)
The id of the
agent.tool_useevent this result corresponds to.
-
toolUseId
final BetaManagedAgentsAgentToolResultEvent.Builder toolUseId(JsonField<String> toolUseId)
Sets Builder.toolUseId to an arbitrary JSON value.
You should usually call Builder.toolUseId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final BetaManagedAgentsAgentToolResultEvent.Builder type(BetaManagedAgentsAgentToolResultEvent.Type type)
-
type
final BetaManagedAgentsAgentToolResultEvent.Builder type(JsonField<BetaManagedAgentsAgentToolResultEvent.Type> type)
Sets Builder.type to an arbitrary JSON value.
You should usually call Builder.type with a well-typed Type value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
content
final BetaManagedAgentsAgentToolResultEvent.Builder content(List<BetaManagedAgentsAgentToolResultEvent.Content> content)
The result content returned by the tool.
-
content
final BetaManagedAgentsAgentToolResultEvent.Builder content(JsonField<List<BetaManagedAgentsAgentToolResultEvent.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 BetaManagedAgentsAgentToolResultEvent.Builder addContent(BetaManagedAgentsAgentToolResultEvent.Content content)
Adds a single Content to Builder.content.
-
addContent
final BetaManagedAgentsAgentToolResultEvent.Builder addContent(BetaManagedAgentsTextBlock text)
Alias for calling addContent with
Content.ofText(text).
-
addContent
final BetaManagedAgentsAgentToolResultEvent.Builder addContent(BetaManagedAgentsImageBlock image)
Alias for calling addContent with
Content.ofImage(image).
-
addContent
final BetaManagedAgentsAgentToolResultEvent.Builder addContent(BetaManagedAgentsDocumentBlock document)
Alias for calling addContent with
Content.ofDocument(document).
-
addContent
final BetaManagedAgentsAgentToolResultEvent.Builder addContent(BetaManagedAgentsSearchResultBlock searchResult)
Alias for calling addContent with
Content.ofSearchResult(searchResult).
-
addTextContent
final BetaManagedAgentsAgentToolResultEvent.Builder addTextContent(String text)
Alias for calling addContent with the following:
BetaManagedAgentsTextBlock.builder() .type(BetaManagedAgentsTextBlock.Type.TEXT) .text(text) .build()
-
addImageContent
final BetaManagedAgentsAgentToolResultEvent.Builder addImageContent(BetaManagedAgentsImageBlock.Source source)
Alias for calling addContent with the following:
BetaManagedAgentsImageBlock.builder() .type(BetaManagedAgentsImageBlock.Type.IMAGE) .source(source) .build()
-
addImageContent
final BetaManagedAgentsAgentToolResultEvent.Builder addImageContent(BetaManagedAgentsBase64ImageSource base64)
Alias for calling addImageContent with
BetaManagedAgentsImageBlock.Source.ofBase64(base64).
-
addImageContent
final BetaManagedAgentsAgentToolResultEvent.Builder addImageContent(BetaManagedAgentsUrlImageSource url)
Alias for calling addImageContent with
BetaManagedAgentsImageBlock.Source.ofUrl(url).
-
addImageContent
final BetaManagedAgentsAgentToolResultEvent.Builder addImageContent(BetaManagedAgentsFileImageSource file)
Alias for calling addImageContent with
BetaManagedAgentsImageBlock.Source.ofFile(file).
-
addUrlImageContent
final BetaManagedAgentsAgentToolResultEvent.Builder addUrlImageContent(String url)
Alias for calling addImageContent with the following:
BetaManagedAgentsUrlImageSource.builder() .type(BetaManagedAgentsUrlImageSource.Type.URL) .url(url) .build()
-
addFileImageContent
final BetaManagedAgentsAgentToolResultEvent.Builder addFileImageContent(String fileId)
Alias for calling addImageContent with the following:
BetaManagedAgentsFileImageSource.builder() .type(BetaManagedAgentsFileImageSource.Type.FILE) .fileId(fileId) .build()
-
addDocumentContent
final BetaManagedAgentsAgentToolResultEvent.Builder addDocumentContent(BetaManagedAgentsDocumentBlock.Source source)
Alias for calling addContent with the following:
BetaManagedAgentsDocumentBlock.builder() .type(BetaManagedAgentsDocumentBlock.Type.DOCUMENT) .source(source) .build()
-
addDocumentContent
final BetaManagedAgentsAgentToolResultEvent.Builder addDocumentContent(BetaManagedAgentsBase64DocumentSource base64)
Alias for calling addDocumentContent with
BetaManagedAgentsDocumentBlock.Source.ofBase64(base64).
-
addDocumentContent
final BetaManagedAgentsAgentToolResultEvent.Builder addDocumentContent(BetaManagedAgentsPlainTextDocumentSource text)
Alias for calling addDocumentContent with
BetaManagedAgentsDocumentBlock.Source.ofText(text).
-
addDocumentContent
final BetaManagedAgentsAgentToolResultEvent.Builder addDocumentContent(BetaManagedAgentsUrlDocumentSource url)
Alias for calling addDocumentContent with
BetaManagedAgentsDocumentBlock.Source.ofUrl(url).
-
addDocumentContent
final BetaManagedAgentsAgentToolResultEvent.Builder addDocumentContent(BetaManagedAgentsFileDocumentSource file)
Alias for calling addDocumentContent with
BetaManagedAgentsDocumentBlock.Source.ofFile(file).
-
addUrlDocumentContent
final BetaManagedAgentsAgentToolResultEvent.Builder addUrlDocumentContent(String url)
Alias for calling addDocumentContent with the following:
BetaManagedAgentsUrlDocumentSource.builder() .type(BetaManagedAgentsUrlDocumentSource.Type.URL) .url(url) .build()
-
addFileDocumentContent
final BetaManagedAgentsAgentToolResultEvent.Builder addFileDocumentContent(String fileId)
Alias for calling addDocumentContent with the following:
BetaManagedAgentsFileDocumentSource.builder() .type(BetaManagedAgentsFileDocumentSource.Type.FILE) .fileId(fileId) .build()
-
isError
final BetaManagedAgentsAgentToolResultEvent.Builder isError(Boolean isError)
Whether the tool execution resulted in an error.
-
isError
final BetaManagedAgentsAgentToolResultEvent.Builder isError(Boolean isError)
Alias for Builder.isError.
This unboxed primitive overload exists for backwards compatibility.
-
isError
final BetaManagedAgentsAgentToolResultEvent.Builder isError(Optional<Boolean> isError)
Alias for calling Builder.isError with
isError.orElse(null).
-
isError
final BetaManagedAgentsAgentToolResultEvent.Builder isError(JsonField<Boolean> isError)
Sets Builder.isError to an arbitrary JSON value.
You should usually call Builder.isError with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final BetaManagedAgentsAgentToolResultEvent.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaManagedAgentsAgentToolResultEvent.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaManagedAgentsAgentToolResultEvent.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaManagedAgentsAgentToolResultEvent.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaManagedAgentsAgentToolResultEvent.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaManagedAgentsAgentToolResultEvent build()
Returns an immutable instance of BetaManagedAgentsAgentToolResultEvent.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .processedAt() .toolUseId() .type()
-
-
-
-