Class CodeExecutionTool20250522
-
- All Implemented Interfaces:
public final class CodeExecutionTool20250522
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCodeExecutionTool20250522.BuilderA builder for CodeExecutionTool20250522.
public final classCodeExecutionTool20250522.AllowedCallerSpecifies who can invoke a tool.
Values: direct: The model can call this tool directly. code_execution_20250825: The tool can be called from the code execution environment (v1). code_execution_20260120: The tool can be called from the code execution environment (v2 with persistence).
-
Method Summary
Modifier and Type Method Description final JsonValue_name()Name of the tool. final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("code_execution_20250522")final Optional<List<CodeExecutionTool20250522.AllowedCaller>>allowedCallers()final Optional<CacheControlEphemeral>cacheControl()Create a cache control breakpoint at this content block. final Optional<Boolean>deferLoading()If true, tool will not be included in initial system prompt. final Optional<Boolean>strict()When true, guarantees schema validation on tool names and inputs final JsonField<List<CodeExecutionTool20250522.AllowedCaller>>_allowedCallers()Returns the raw JSON value of allowedCallers. final JsonField<CacheControlEphemeral>_cacheControl()Returns the raw JSON value of cacheControl. final JsonField<Boolean>_deferLoading()Returns the raw JSON value of deferLoading. final JsonField<Boolean>_strict()Returns the raw JSON value of strict. final Map<String, JsonValue>_additionalProperties()final CodeExecutionTool20250522.BuildertoBuilder()final CodeExecutionTool20250522validate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static CodeExecutionTool20250522.Builderbuilder()Returns a mutable builder for constructing an instance of CodeExecutionTool20250522. -
-
Method Detail
-
_name
final JsonValue _name()
Name of the tool.
This is how the tool will be called by the model and in
tool_useblocks.Expected to always return the following:
JsonValue.from("code_execution")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("code_execution_20250522")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
allowedCallers
final Optional<List<CodeExecutionTool20250522.AllowedCaller>> allowedCallers()
-
cacheControl
final Optional<CacheControlEphemeral> cacheControl()
Create a cache control breakpoint at this content block.
-
deferLoading
final Optional<Boolean> deferLoading()
If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
-
strict
final Optional<Boolean> strict()
When true, guarantees schema validation on tool names and inputs
-
_allowedCallers
final JsonField<List<CodeExecutionTool20250522.AllowedCaller>> _allowedCallers()
Returns the raw JSON value of allowedCallers.
Unlike allowedCallers, this method doesn't throw if the JSON field has an unexpected type.
-
_cacheControl
final JsonField<CacheControlEphemeral> _cacheControl()
Returns the raw JSON value of cacheControl.
Unlike cacheControl, this method doesn't throw if the JSON field has an unexpected type.
-
_deferLoading
final JsonField<Boolean> _deferLoading()
Returns the raw JSON value of deferLoading.
Unlike deferLoading, this method doesn't throw if the JSON field has an unexpected type.
-
_strict
final JsonField<Boolean> _strict()
Returns the raw JSON value of strict.
Unlike strict, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final CodeExecutionTool20250522.Builder toBuilder()
-
validate
final CodeExecutionTool20250522 validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static CodeExecutionTool20250522.Builder builder()
Returns a mutable builder for constructing an instance of CodeExecutionTool20250522.
-
-
-
-