Class CodeExecutionResult

  • All Implemented Interfaces:

    
    public abstract class CodeExecutionResult
    extends JsonSerializable
                        

    Result of executing the `ExecutableCode`.

    Generated only when the `CodeExecution` tool is used.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public abstract class CodeExecutionResult.Builder

      Builder for CodeExecutionResult.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Optional<Outcome> outcome() Required.
      abstract Optional<String> output() Optional.
      abstract Optional<String> id() The identifier of the `ExecutableCode` part this result is for.
      static CodeExecutionResult.Builder builder() Instantiates a builder for CodeExecutionResult.
      abstract CodeExecutionResult.Builder toBuilder() Creates a builder with the same values as this instance.
      static CodeExecutionResult fromJson(String jsonString) Deserializes a JSON string to a CodeExecutionResult object.
      • Methods inherited from class com.google.genai.JsonSerializable

        fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait