Class BetaManagedAgentsUserCustomToolResultEventParams.Builder
-
- All Implemented Interfaces:
public final class BetaManagedAgentsUserCustomToolResultEventParams.BuilderA builder for BetaManagedAgentsUserCustomToolResultEventParams.
-
-
Method Summary
-
-
Method Detail
-
customToolUseId
final BetaManagedAgentsUserCustomToolResultEventParams.Builder customToolUseId(String customToolUseId)
The id of the
agent.custom_tool_useevent this result corresponds to, which can be found in the lastsession.status_idleevent'sstop_reason.event_idsfield.
-
customToolUseId
final BetaManagedAgentsUserCustomToolResultEventParams.Builder customToolUseId(JsonField<String> customToolUseId)
Sets Builder.customToolUseId to an arbitrary JSON value.
You should usually call Builder.customToolUseId 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 BetaManagedAgentsUserCustomToolResultEventParams.Builder type(BetaManagedAgentsUserCustomToolResultEventParams.Type type)
-
type
final BetaManagedAgentsUserCustomToolResultEventParams.Builder type(JsonField<BetaManagedAgentsUserCustomToolResultEventParams.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 BetaManagedAgentsUserCustomToolResultEventParams.Builder content(List<BetaManagedAgentsUserCustomToolResultEventParams.Content> content)
The result content returned by the tool.
-
content
final BetaManagedAgentsUserCustomToolResultEventParams.Builder content(JsonField<List<BetaManagedAgentsUserCustomToolResultEventParams.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 BetaManagedAgentsUserCustomToolResultEventParams.Builder addContent(BetaManagedAgentsUserCustomToolResultEventParams.Content content)
Adds a single Content to Builder.content.
-
addContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addContent(BetaManagedAgentsTextBlock text)
Alias for calling addContent with
Content.ofText(text).
-
addContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addContent(BetaManagedAgentsImageBlock image)
Alias for calling addContent with
Content.ofImage(image).
-
addContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addContent(BetaManagedAgentsDocumentBlock document)
Alias for calling addContent with
Content.ofDocument(document).
-
addContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addContent(BetaManagedAgentsSearchResultBlock searchResult)
Alias for calling addContent with
Content.ofSearchResult(searchResult).
-
addTextContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addTextContent(String text)
Alias for calling addContent with the following:
BetaManagedAgentsTextBlock.builder() .type(BetaManagedAgentsTextBlock.Type.TEXT) .text(text) .build()
-
addImageContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addImageContent(BetaManagedAgentsImageBlock.Source source)
Alias for calling addContent with the following:
BetaManagedAgentsImageBlock.builder() .type(BetaManagedAgentsImageBlock.Type.IMAGE) .source(source) .build()
-
addImageContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addImageContent(BetaManagedAgentsBase64ImageSource base64)
Alias for calling addImageContent with
BetaManagedAgentsImageBlock.Source.ofBase64(base64).
-
addImageContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addImageContent(BetaManagedAgentsUrlImageSource url)
Alias for calling addImageContent with
BetaManagedAgentsImageBlock.Source.ofUrl(url).
-
addImageContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addImageContent(BetaManagedAgentsFileImageSource file)
Alias for calling addImageContent with
BetaManagedAgentsImageBlock.Source.ofFile(file).
-
addUrlImageContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addUrlImageContent(String url)
Alias for calling addImageContent with the following:
BetaManagedAgentsUrlImageSource.builder() .type(BetaManagedAgentsUrlImageSource.Type.URL) .url(url) .build()
-
addFileImageContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addFileImageContent(String fileId)
Alias for calling addImageContent with the following:
BetaManagedAgentsFileImageSource.builder() .type(BetaManagedAgentsFileImageSource.Type.FILE) .fileId(fileId) .build()
-
addDocumentContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addDocumentContent(BetaManagedAgentsDocumentBlock.Source source)
Alias for calling addContent with the following:
BetaManagedAgentsDocumentBlock.builder() .type(BetaManagedAgentsDocumentBlock.Type.DOCUMENT) .source(source) .build()
-
addDocumentContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addDocumentContent(BetaManagedAgentsBase64DocumentSource base64)
Alias for calling addDocumentContent with
BetaManagedAgentsDocumentBlock.Source.ofBase64(base64).
-
addDocumentContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addDocumentContent(BetaManagedAgentsPlainTextDocumentSource text)
Alias for calling addDocumentContent with
BetaManagedAgentsDocumentBlock.Source.ofText(text).
-
addDocumentContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addDocumentContent(BetaManagedAgentsUrlDocumentSource url)
Alias for calling addDocumentContent with
BetaManagedAgentsDocumentBlock.Source.ofUrl(url).
-
addDocumentContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addDocumentContent(BetaManagedAgentsFileDocumentSource file)
Alias for calling addDocumentContent with
BetaManagedAgentsDocumentBlock.Source.ofFile(file).
-
addUrlDocumentContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addUrlDocumentContent(String url)
Alias for calling addDocumentContent with the following:
BetaManagedAgentsUrlDocumentSource.builder() .type(BetaManagedAgentsUrlDocumentSource.Type.URL) .url(url) .build()
-
addFileDocumentContent
final BetaManagedAgentsUserCustomToolResultEventParams.Builder addFileDocumentContent(String fileId)
Alias for calling addDocumentContent with the following:
BetaManagedAgentsFileDocumentSource.builder() .type(BetaManagedAgentsFileDocumentSource.Type.FILE) .fileId(fileId) .build()
-
isError
final BetaManagedAgentsUserCustomToolResultEventParams.Builder isError(Boolean isError)
Whether the tool execution resulted in an error.
-
isError
final BetaManagedAgentsUserCustomToolResultEventParams.Builder isError(Boolean isError)
Alias for Builder.isError.
This unboxed primitive overload exists for backwards compatibility.
-
isError
final BetaManagedAgentsUserCustomToolResultEventParams.Builder isError(Optional<Boolean> isError)
Alias for calling Builder.isError with
isError.orElse(null).
-
isError
final BetaManagedAgentsUserCustomToolResultEventParams.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 BetaManagedAgentsUserCustomToolResultEventParams.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaManagedAgentsUserCustomToolResultEventParams.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaManagedAgentsUserCustomToolResultEventParams.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaManagedAgentsUserCustomToolResultEventParams.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaManagedAgentsUserCustomToolResultEventParams.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaManagedAgentsUserCustomToolResultEventParams build()
Returns an immutable instance of BetaManagedAgentsUserCustomToolResultEventParams.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.customToolUseId() .type()
-
-
-
-