Class BetaWebFetchTool20260318.Builder
-
- All Implemented Interfaces:
public final class BetaWebFetchTool20260318.BuilderA builder for BetaWebFetchTool20260318.
-
-
Method Summary
-
-
Method Detail
-
name
final BetaWebFetchTool20260318.Builder name(JsonValue name)
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("web_fetch")This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final BetaWebFetchTool20260318.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("web_fetch_20260318")This method is primarily for setting the field to an undocumented or not yet supported value.
-
allowedCallers
final BetaWebFetchTool20260318.Builder allowedCallers(List<BetaWebFetchTool20260318.AllowedCaller> allowedCallers)
-
allowedCallers
final BetaWebFetchTool20260318.Builder allowedCallers(JsonField<List<BetaWebFetchTool20260318.AllowedCaller>> allowedCallers)
Sets Builder.allowedCallers to an arbitrary JSON value.
You should usually call Builder.allowedCallers with a well-typed
List<AllowedCaller>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
allowedDomains
final BetaWebFetchTool20260318.Builder allowedDomains(List<String> allowedDomains)
List of domains to allow fetching from
-
allowedDomains
final BetaWebFetchTool20260318.Builder allowedDomains(Optional<List<String>> allowedDomains)
Alias for calling Builder.allowedDomains with
allowedDomains.orElse(null).
-
allowedDomains
final BetaWebFetchTool20260318.Builder allowedDomains(JsonField<List<String>> allowedDomains)
Sets Builder.allowedDomains to an arbitrary JSON value.
You should usually call Builder.allowedDomains with a well-typed
List<String>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
blockedDomains
final BetaWebFetchTool20260318.Builder blockedDomains(List<String> blockedDomains)
List of domains to block fetching from
-
blockedDomains
final BetaWebFetchTool20260318.Builder blockedDomains(Optional<List<String>> blockedDomains)
Alias for calling Builder.blockedDomains with
blockedDomains.orElse(null).
-
blockedDomains
final BetaWebFetchTool20260318.Builder blockedDomains(JsonField<List<String>> blockedDomains)
Sets Builder.blockedDomains to an arbitrary JSON value.
You should usually call Builder.blockedDomains with a well-typed
List<String>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
cacheControl
final BetaWebFetchTool20260318.Builder cacheControl(BetaCacheControlEphemeral cacheControl)
Create a cache control breakpoint at this content block.
-
cacheControl
final BetaWebFetchTool20260318.Builder cacheControl(Optional<BetaCacheControlEphemeral> cacheControl)
Alias for calling Builder.cacheControl with
cacheControl.orElse(null).
-
cacheControl
final BetaWebFetchTool20260318.Builder cacheControl(JsonField<BetaCacheControlEphemeral> cacheControl)
Sets Builder.cacheControl to an arbitrary JSON value.
You should usually call Builder.cacheControl with a well-typed BetaCacheControlEphemeral value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
citations
final BetaWebFetchTool20260318.Builder citations(BetaCitationsConfigParam citations)
Citations configuration for fetched documents. Citations are disabled by default.
-
citations
final BetaWebFetchTool20260318.Builder citations(Optional<BetaCitationsConfigParam> citations)
Alias for calling Builder.citations with
citations.orElse(null).
-
citations
final BetaWebFetchTool20260318.Builder citations(JsonField<BetaCitationsConfigParam> citations)
Sets Builder.citations to an arbitrary JSON value.
You should usually call Builder.citations with a well-typed BetaCitationsConfigParam value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
deferLoading
final BetaWebFetchTool20260318.Builder deferLoading(Boolean deferLoading)
If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
-
deferLoading
final BetaWebFetchTool20260318.Builder deferLoading(JsonField<Boolean> deferLoading)
Sets Builder.deferLoading to an arbitrary JSON value.
You should usually call Builder.deferLoading with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
maxContentTokens
final BetaWebFetchTool20260318.Builder maxContentTokens(Long maxContentTokens)
Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
-
maxContentTokens
final BetaWebFetchTool20260318.Builder maxContentTokens(Long maxContentTokens)
Alias for Builder.maxContentTokens.
This unboxed primitive overload exists for backwards compatibility.
-
maxContentTokens
final BetaWebFetchTool20260318.Builder maxContentTokens(Optional<Long> maxContentTokens)
Alias for calling Builder.maxContentTokens with
maxContentTokens.orElse(null).
-
maxContentTokens
final BetaWebFetchTool20260318.Builder maxContentTokens(JsonField<Long> maxContentTokens)
Sets Builder.maxContentTokens to an arbitrary JSON value.
You should usually call Builder.maxContentTokens with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
maxUses
final BetaWebFetchTool20260318.Builder maxUses(Long maxUses)
Maximum number of times the tool can be used in the API request.
-
maxUses
final BetaWebFetchTool20260318.Builder maxUses(Long maxUses)
Alias for Builder.maxUses.
This unboxed primitive overload exists for backwards compatibility.
-
maxUses
final BetaWebFetchTool20260318.Builder maxUses(Optional<Long> maxUses)
Alias for calling Builder.maxUses with
maxUses.orElse(null).
-
maxUses
final BetaWebFetchTool20260318.Builder maxUses(JsonField<Long> maxUses)
Sets Builder.maxUses to an arbitrary JSON value.
You should usually call Builder.maxUses with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
responseInclusion
final BetaWebFetchTool20260318.Builder responseInclusion(BetaWebFetchTool20260318.ResponseInclusion responseInclusion)
How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.
-
responseInclusion
final BetaWebFetchTool20260318.Builder responseInclusion(JsonField<BetaWebFetchTool20260318.ResponseInclusion> responseInclusion)
Sets Builder.responseInclusion to an arbitrary JSON value.
You should usually call Builder.responseInclusion with a well-typed ResponseInclusion value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
strict
final BetaWebFetchTool20260318.Builder strict(Boolean strict)
When true, guarantees schema validation on tool names and inputs
-
strict
final BetaWebFetchTool20260318.Builder strict(JsonField<Boolean> strict)
Sets Builder.strict to an arbitrary JSON value.
You should usually call Builder.strict with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
urlSources
final BetaWebFetchTool20260318.Builder urlSources(BetaWebFetchUrlSources urlSources)
Which sources contribute to the set of URLs the tool may fetch. Omitted means every source.
-
urlSources
final BetaWebFetchTool20260318.Builder urlSources(Optional<BetaWebFetchUrlSources> urlSources)
Alias for calling Builder.urlSources with
urlSources.orElse(null).
-
urlSources
final BetaWebFetchTool20260318.Builder urlSources(JsonField<BetaWebFetchUrlSources> urlSources)
Sets Builder.urlSources to an arbitrary JSON value.
You should usually call Builder.urlSources with a well-typed BetaWebFetchUrlSources value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
useCache
final BetaWebFetchTool20260318.Builder useCache(Boolean useCache)
Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.
-
useCache
final BetaWebFetchTool20260318.Builder useCache(JsonField<Boolean> useCache)
Sets Builder.useCache to an arbitrary JSON value.
You should usually call Builder.useCache 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 BetaWebFetchTool20260318.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
addAllowedCaller
final BetaWebFetchTool20260318.Builder addAllowedCaller(BetaWebFetchTool20260318.AllowedCaller allowedCaller)
Adds a single AllowedCaller to allowedCallers.
-
addAllowedDomain
final BetaWebFetchTool20260318.Builder addAllowedDomain(String allowedDomain)
Adds a single String to allowedDomains.
-
addBlockedDomain
final BetaWebFetchTool20260318.Builder addBlockedDomain(String blockedDomain)
Adds a single String to blockedDomains.
-
putAdditionalProperty
final BetaWebFetchTool20260318.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaWebFetchTool20260318.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaWebFetchTool20260318.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaWebFetchTool20260318.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaWebFetchTool20260318 build()
Returns an immutable instance of BetaWebFetchTool20260318.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-