Class FunctionCall

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.FunctionCall

public abstract class FunctionCall extends JsonSerializable
A function call.
  • Constructor Details

    • FunctionCall

      public FunctionCall()
  • Method Details

    • id

      public abstract Optional<String> id()
      The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
    • args

      public abstract Optional<Map<String,Object>> args()
      Optional. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details.
    • name

      public abstract Optional<String> name()
      Required. The name of the function to call. Matches [FunctionDeclaration.name].
    • builder

      public static FunctionCall.Builder builder()
      Instantiates a builder for FunctionCall.
    • toBuilder

      public abstract FunctionCall.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static FunctionCall fromJson(String jsonString)
      Deserializes a JSON string to a FunctionCall object.