{
  "servicePath": "",
  "basePath": "",
  "schemas": {
    "ImageResponseFormat": {
      "description": "Configuration for image output format.",
      "id": "ImageResponseFormat",
      "type": "object",
      "properties": {
        "delivery": {
          "enumDescriptions": [
            "Default value. This value is unused.",
            "Image data is returned inline in the response.",
            "Image data is returned as a URI."
          ],
          "type": "string",
          "enum": [
            "DELIVERY_UNSPECIFIED",
            "INLINE",
            "URI"
          ],
          "description": "Optional. The delivery mode for the image output."
        },
        "imageSize": {
          "enumDescriptions": [
            "Default value. This value is unused.",
            "512px image size.",
            "1K image size.",
            "2K image size.",
            "4K image size."
          ],
          "type": "string",
          "enum": [
            "IMAGE_SIZE_UNSPECIFIED",
            "IMAGE_SIZE_FIVE_TWELVE",
            "IMAGE_SIZE_ONE_K",
            "IMAGE_SIZE_TWO_K",
            "IMAGE_SIZE_FOUR_K"
          ],
          "description": "Optional. The size of the image output."
        },
        "mimeType": {
          "description": "Optional. The MIME type of the image output.",
          "enum": [
            "MIME_TYPE_UNSPECIFIED",
            "IMAGE_JPEG"
          ],
          "type": "string",
          "enumDescriptions": [
            "Default value. This value is unused.",
            "JPEG image format."
          ]
        },
        "aspectRatio": {
          "enumDescriptions": [
            "Default value. This value is unused.",
            "1:1 aspect ratio.",
            "2:3 aspect ratio.",
            "3:2 aspect ratio.",
            "3:4 aspect ratio.",
            "4:3 aspect ratio.",
            "4:5 aspect ratio.",
            "5:4 aspect ratio.",
            "9:16 aspect ratio.",
            "16:9 aspect ratio.",
            "21:9 aspect ratio.",
            "1:8 aspect ratio.",
            "8:1 aspect ratio.",
            "1:4 aspect ratio.",
            "4:1 aspect ratio."
          ],
          "type": "string",
          "enum": [
            "ASPECT_RATIO_UNSPECIFIED",
            "ASPECT_RATIO_ONE_BY_ONE",
            "ASPECT_RATIO_TWO_BY_THREE",
            "ASPECT_RATIO_THREE_BY_TWO",
            "ASPECT_RATIO_THREE_BY_FOUR",
            "ASPECT_RATIO_FOUR_BY_THREE",
            "ASPECT_RATIO_FOUR_BY_FIVE",
            "ASPECT_RATIO_FIVE_BY_FOUR",
            "ASPECT_RATIO_NINE_BY_SIXTEEN",
            "ASPECT_RATIO_SIXTEEN_BY_NINE",
            "ASPECT_RATIO_TWENTY_ONE_BY_NINE",
            "ASPECT_RATIO_ONE_BY_EIGHT",
            "ASPECT_RATIO_EIGHT_BY_ONE",
            "ASPECT_RATIO_ONE_BY_FOUR",
            "ASPECT_RATIO_FOUR_BY_ONE"
          ],
          "description": "Optional. The aspect ratio for the image output."
        }
      }
    },
    "ThinkingConfig": {
      "id": "ThinkingConfig",
      "type": "object",
      "properties": {
        "includeThoughts": {
          "description": "Indicates whether to include thoughts in the response. If true, thoughts are returned only when available.",
          "type": "boolean"
        },
        "thinkingBudget": {
          "description": "The number of thoughts tokens that the model should generate.",
          "type": "integer",
          "format": "int32"
        },
        "thinkingLevel": {
          "enum": [
            "THINKING_LEVEL_UNSPECIFIED",
            "MINIMAL",
            "LOW",
            "MEDIUM",
            "HIGH"
          ],
          "description": "Optional. Controls the maximum depth of the model's internal reasoning process before it produces a response. The default value is model-dependent. Refer to the [Thinking levels guide](https://ai.google.dev/gemini-api/docs/thinking#thinking-levels) for more details. Recommended for Gemini 3 or later models. Use with earlier models results in an error.",
          "enumDescriptions": [
            "Default value.",
            "Little to no thinking.",
            "Low thinking level.",
            "Medium thinking level.",
            "High thinking level."
          ],
          "type": "string"
        }
      },
      "description": "Config for thinking features."
    },
    "CreateTunedModelMetadata": {
      "description": "Metadata about the state and progress of creating a tuned model returned from the long-running operation",
      "id": "CreateTunedModelMetadata",
      "type": "object",
      "properties": {
        "tunedModel": {
          "description": "Name of the tuned model associated with the tuning operation.",
          "type": "string"
        },
        "totalSteps": {
          "description": "The total number of tuning steps.",
          "type": "integer",
          "format": "int32"
        },
        "snapshots": {
          "description": "Metrics collected during tuning.",
          "items": {
            "$ref": "TuningSnapshot"
          },
          "type": "array"
        },
        "completedPercent": {
          "description": "The completed percentage for the tuning operation.",
          "type": "number",
          "format": "float"
        },
        "completedSteps": {
          "description": "The number of steps completed.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "RetrievalMetadata": {
      "id": "RetrievalMetadata",
      "type": "object",
      "properties": {
        "googleSearchDynamicRetrievalScore": {
          "description": "Optional. Score indicating how likely information from google search could help answer the prompt. The score is in the range [0, 1], where 0 is the least likely and 1 is the most likely. This score is only populated when google search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger google search.",
          "type": "number",
          "format": "float"
        }
      },
      "description": "Metadata related to retrieval in the grounding flow."
    },
    "PromptFeedback": {
      "id": "PromptFeedback",
      "type": "object",
      "properties": {
        "blockReason": {
          "enumDescriptions": [
            "Default value. This value is unused.",
            "Prompt was blocked due to safety reasons. Inspect `safety_ratings` to understand which safety category blocked it.",
            "Prompt was blocked due to unknown reasons.",
            "Prompt was blocked due to the terms which are included from the terminology blocklist.",
            "Prompt was blocked due to prohibited content.",
            "Candidates blocked due to unsafe image generation content."
          ],
          "type": "string",
          "enum": [
            "BLOCK_REASON_UNSPECIFIED",
            "SAFETY",
            "OTHER",
            "BLOCKLIST",
            "PROHIBITED_CONTENT",
            "IMAGE_SAFETY"
          ],
          "description": "Optional. If set, the prompt was blocked and no candidates are returned. Rephrase the prompt."
        },
        "safetyRatings": {
          "type": "array",
          "items": {
            "$ref": "SafetyRating"
          },
          "description": "Ratings for safety of the prompt. There is at most one rating per category."
        }
      },
      "description": "A set of the feedback metadata the prompt specified in `GenerateContentRequest.content`."
    },
    "FunctionResponse": {
      "description": "The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction.",
      "id": "FunctionResponse",
      "type": "object",
      "properties": {
        "name": {
          "description": "Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128.",
          "type": "string"
        },
        "id": {
          "description": "Optional. The identifier of the function call this response is for. Populated by the client to match the corresponding function call `id`.",
          "type": "string"
        },
        "response": {
          "description": "Required. The function response in JSON object format. Callers can use any keys of their choice that fit the function's syntax to return the function output, e.g. \"output\", \"result\", etc. In particular, if the function call failed to execute, the response can have an \"error\" key to return error details to the model. Multimedia can be included by using a subobject containing a single \"$ref\" key whose value is the `inline_data.display_name` of a `FunctionResponsePart` holding the multimedia. See https://ai.google.dev/gemini-api/docs/function-calling#multimodal.",
          "type": "object",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          }
        }
      }
    },
    "SemanticRetrieverChunk": {
      "description": "Identifier for a `Chunk` retrieved via Semantic Retriever specified in the `GenerateAnswerRequest` using `SemanticRetrieverConfig`.",
      "id": "SemanticRetrieverChunk",
      "type": "object",
      "properties": {
        "source": {
          "description": "Output only. Name of the source matching the request's `SemanticRetrieverConfig.source`. Example: `corpora/123` or `corpora/123/documents/abc`",
          "readOnly": true,
          "type": "string"
        },
        "chunk": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. Name of the `Chunk` containing the attributed text. Example: `corpora/123/documents/abc/chunks/xyz`"
        }
      }
    },
    "InlinedRequests": {
      "description": "The requests to be processed in the batch if provided as part of the batch creation request.",
      "id": "InlinedRequests",
      "type": "object",
      "properties": {
        "requests": {
          "items": {
            "$ref": "InlinedRequest"
          },
          "type": "array",
          "description": "Required. The requests to be processed in the batch."
        }
      }
    },
    "Blob": {
      "description": "Raw media bytes. Text should not be sent as raw bytes, use the 'text' field.",
      "id": "Blob",
      "type": "object",
      "properties": {
        "mimeType": {
          "description": "The IANA standard MIME type of the source data. Examples of supported types: - Images: image/png, image/jpeg, image/jpg, image/webp, image/heic, image/heif, image/gif, image/avif - Audio: audio/*, video/audio/s16le, video/audio/wav - Video: video/* - Text: text/plain, text/html, text/css, text/javascript, text/x-typescript, text/csv, text/markdown, text/x-python, text/xml, text/rtf, video/text/timestamp - Applications: application/x-javascript, application/x-typescript, application/x-python-code, application/json, application/x-ipynb+json, application/rtf, application/pdf For additional context, see [Supported file formats](https://ai.google.dev/gemini-api/docs/file-input-methods#supported-content-types). //",
          "type": "string"
        },
        "data": {
          "type": "string",
          "format": "byte",
          "description": "Raw bytes for media formats."
        }
      }
    },
    "Model": {
      "id": "Model",
      "type": "object",
      "properties": {
        "baseModelId": {
          "description": "Required. The name of the base model, pass this to the generation request. Examples: * `gemini-1.5-flash`",
          "type": "string"
        },
        "temperature": {
          "type": "number",
          "format": "float",
          "description": "Controls the randomness of the output. Values can range over `[0.0,max_temperature]`, inclusive. A higher value will produce responses that are more varied, while a value closer to `0.0` will typically result in less surprising responses from the model. This value specifies default to be used by the backend while making the call to the model."
        },
        "topP": {
          "description": "For [Nucleus sampling](https://ai.google.dev/gemini-api/docs/prompting-strategies#top-p). Nucleus sampling considers the smallest set of tokens whose probability sum is at least `top_p`. This value specifies default to be used by the backend while making the call to the model.",
          "type": "number",
          "format": "float"
        },
        "name": {
          "description": "Required. The resource name of the `Model`. Refer to [Model variants](https://ai.google.dev/gemini-api/docs/models/gemini#model-variations) for all allowed values. Format: `models/{model}` with a `{model}` naming convention of: * \"{base_model_id}-{version}\" Examples: * `models/gemini-1.5-flash-001`",
          "type": "string"
        },
        "inputTokenLimit": {
          "type": "integer",
          "format": "int32",
          "description": "Maximum number of input tokens allowed for this model."
        },
        "topK": {
          "description": "For Top-k sampling. Top-k sampling considers the set of `top_k` most probable tokens. This value specifies default to be used by the backend while making the call to the model. If empty, indicates the model doesn't use top-k sampling, and `top_k` isn't allowed as a generation parameter.",
          "type": "integer",
          "format": "int32"
        },
        "description": {
          "description": "A short description of the model.",
          "type": "string"
        },
        "maxTemperature": {
          "type": "number",
          "format": "float",
          "description": "The maximum temperature this model can use."
        },
        "thinking": {
          "description": "Whether the model supports thinking.",
          "type": "boolean"
        },
        "supportedGenerationMethods": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "The model's supported generation methods. The corresponding API method names are defined as Pascal case strings, such as `generateMessage` and `generateContent`."
        },
        "outputTokenLimit": {
          "type": "integer",
          "format": "int32",
          "description": "Maximum number of output tokens available for this model."
        },
        "displayName": {
          "description": "The human-readable name of the model. E.g. \"Gemini 1.5 Flash\". The name can be up to 128 characters long and can consist of any UTF-8 characters.",
          "type": "string"
        },
        "version": {
          "description": "Required. The version number of the model. This represents the major version (`1.0` or `1.5`)",
          "type": "string"
        }
      },
      "description": "Information about a Generative Language Model."
    },
    "GenerateContentBatchOutput": {
      "description": "The output of a batch request. This is returned in the `BatchGenerateContentResponse` or the `GenerateContentBatch.output` field.",
      "id": "GenerateContentBatchOutput",
      "type": "object",
      "properties": {
        "responsesFile": {
          "description": "Output only. The file ID of the file containing the responses. The file will be a JSONL file with a single response per line. The responses will be `GenerateContentResponse` messages formatted as JSON. The responses will be written in the same order as the input requests.",
          "readOnly": true,
          "type": "string"
        },
        "inlinedResponses": {
          "readOnly": true,
          "description": "Output only. The responses to the requests in the batch. Returned when the batch was built using inlined requests. The responses will be in the same order as the input requests.",
          "$ref": "InlinedResponses"
        }
      }
    },
    "Content": {
      "id": "Content",
      "type": "object",
      "properties": {
        "parts": {
          "type": "array",
          "items": {
            "$ref": "Part"
          },
          "description": "Ordered `Parts` that constitute a single message. Parts may have different MIME types."
        },
        "role": {
          "description": "Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset.",
          "type": "string"
        }
      },
      "description": "The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn."
    },
    "DynamicRetrievalConfig": {
      "id": "DynamicRetrievalConfig",
      "type": "object",
      "properties": {
        "mode": {
          "description": "The mode of the predictor to be used in dynamic retrieval.",
          "enum": [
            "MODE_UNSPECIFIED",
            "MODE_DYNAMIC"
          ],
          "type": "string",
          "enumDescriptions": [
            "Always trigger retrieval.",
            "Run retrieval only when system decides it is necessary."
          ]
        },
        "dynamicThreshold": {
          "description": "The threshold to be used in dynamic retrieval. If not set, a system default value is used.",
          "type": "number",
          "format": "float"
        }
      },
      "description": "Describes the options to customize dynamic retrieval."
    },
    "RetrievalConfig": {
      "id": "RetrievalConfig",
      "type": "object",
      "properties": {
        "languageCode": {
          "description": "Optional. The language code of the user. Language code for content. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).",
          "type": "string"
        },
        "latLng": {
          "description": "Optional. The location of the user.",
          "$ref": "LatLng"
        }
      },
      "description": "Retrieval config."
    },
    "ModalityTokenCount": {
      "description": "Represents token counting info for a single modality.",
      "id": "ModalityTokenCount",
      "type": "object",
      "properties": {
        "modality": {
          "description": "The modality associated with this token count.",
          "enum": [
            "MODALITY_UNSPECIFIED",
            "TEXT",
            "IMAGE",
            "VIDEO",
            "AUDIO",
            "DOCUMENT"
          ],
          "type": "string",
          "enumDescriptions": [
            "Unspecified modality.",
            "Plain text.",
            "Image.",
            "Video.",
            "Audio.",
            "Document, e.g. PDF."
          ]
        },
        "tokenCount": {
          "type": "integer",
          "format": "int32",
          "description": "Number of tokens."
        }
      }
    },
    "ToolCall": {
      "id": "ToolCall",
      "type": "object",
      "properties": {
        "id": {
          "description": "Optional. Unique identifier of the tool call. The server returns the tool response with the matching `id`.",
          "type": "string"
        },
        "args": {
          "type": "object",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          },
          "description": "Optional. The tool call arguments. Example: {\"arg1\" : \"value1\", \"arg2\" : \"value2\" , ...}"
        },
        "toolType": {
          "enumDescriptions": [
            "Unspecified tool type.",
            "Google search tool, maps to Tool.google_search.search_types.web_search.",
            "Image search tool, maps to Tool.google_search.search_types.image_search.",
            "URL context tool, maps to Tool.url_context.",
            "Google maps tool, maps to Tool.google_maps.",
            "File search tool, maps to Tool.file_search."
          ],
          "type": "string",
          "enum": [
            "TOOL_TYPE_UNSPECIFIED",
            "GOOGLE_SEARCH_WEB",
            "GOOGLE_SEARCH_IMAGE",
            "URL_CONTEXT",
            "GOOGLE_MAPS",
            "FILE_SEARCH"
          ],
          "description": "Required. The type of tool that was called."
        }
      },
      "description": "A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`."
    },
    "UrlContextMetadata": {
      "id": "UrlContextMetadata",
      "type": "object",
      "properties": {
        "urlMetadata": {
          "items": {
            "$ref": "UrlMetadata"
          },
          "type": "array",
          "description": "List of url context."
        }
      },
      "description": "Metadata related to url context retrieval tool."
    },
    "TopCandidates": {
      "id": "TopCandidates",
      "type": "object",
      "properties": {
        "candidates": {
          "type": "array",
          "items": {
            "$ref": "LogprobsResultCandidate"
          },
          "description": "Sorted by log probability in descending order."
        }
      },
      "description": "Candidates with top log probabilities at each decoding step."
    },
    "InputConfig": {
      "description": "Configures the input to the batch request.",
      "id": "InputConfig",
      "type": "object",
      "properties": {
        "requests": {
          "description": "The requests to be processed in the batch.",
          "$ref": "InlinedRequests"
        },
        "fileName": {
          "description": "The name of the `File` containing the input requests.",
          "type": "string"
        }
      }
    },
    "CountTokensResponse": {
      "id": "CountTokensResponse",
      "type": "object",
      "properties": {
        "totalTokens": {
          "description": "The number of tokens that the `Model` tokenizes the `prompt` into. Always non-negative.",
          "type": "integer",
          "format": "int32"
        },
        "promptTokensDetails": {
          "readOnly": true,
          "type": "array",
          "items": {
            "$ref": "ModalityTokenCount"
          },
          "description": "Output only. List of modalities that were processed in the request input."
        },
        "cacheTokensDetails": {
          "description": "Output only. List of modalities that were processed in the cached content.",
          "readOnly": true,
          "type": "array",
          "items": {
            "$ref": "ModalityTokenCount"
          }
        }
      },
      "description": "A response from `CountTokens`. It returns the model's `token_count` for the `prompt`."
    },
    "ToolConfig": {
      "id": "ToolConfig",
      "type": "object",
      "properties": {
        "includeServerSideToolInvocations": {
          "description": "Optional. If true, the API response will include the server-side tool calls and responses within the `Content` message. This allows clients to observe the server's tool interactions.",
          "type": "boolean"
        },
        "retrievalConfig": {
          "description": "Optional. Retrieval config.",
          "$ref": "RetrievalConfig"
        },
        "functionCallingConfig": {
          "description": "Optional. Function calling config.",
          "$ref": "FunctionCallingConfig"
        }
      },
      "description": "The Tool configuration containing parameters for specifying `Tool` use in the request."
    },
    "CountTokensRequest": {
      "description": "Counts the number of tokens in the `prompt` sent to a model. Models may tokenize text differently, so each model may return a different `token_count`.",
      "id": "CountTokensRequest",
      "type": "object",
      "properties": {
        "contents": {
          "items": {
            "$ref": "Content"
          },
          "type": "array",
          "description": "Optional. The input given to the model as a prompt. This field is ignored when `generate_content_request` is set."
        },
        "generateContentRequest": {
          "description": "Optional. The overall input given to the `Model`. This includes the prompt as well as other model steering information like [system instructions](https://ai.google.dev/gemini-api/docs/system-instructions), and/or function declarations for [function calling](https://ai.google.dev/gemini-api/docs/function-calling). `Model`s/`Content`s and `generate_content_request`s are mutually exclusive. You can either send `Model` + `Content`s or a `generate_content_request`, but never both.",
          "$ref": "GenerateContentRequest"
        }
      }
    },
    "WebSearch": {
      "description": "Standard web search for grounding and related configurations.",
      "id": "WebSearch",
      "type": "object",
      "properties": {}
    },
    "ContentEmbedding": {
      "description": "A list of floats representing an embedding.",
      "id": "ContentEmbedding",
      "type": "object",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "type": "number",
            "format": "float"
          },
          "description": "The embedding values. This is for 3P users only and will not be populated for 1P calls."
        },
        "shape": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int32"
          },
          "description": "This field stores the soft tokens tensor frame shape (e.g. [1, 1, 256, 2048])."
        }
      }
    },
    "FileSearch": {
      "description": "The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API.",
      "id": "FileSearch",
      "type": "object",
      "properties": {
        "fileSearchStoreNames": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "Required. The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`"
        },
        "topK": {
          "description": "Optional. The number of semantic retrieval chunks to retrieve.",
          "type": "integer",
          "format": "int32"
        },
        "metadataFilter": {
          "description": "Optional. Metadata filter to apply to the semantic retrieval documents and chunks.",
          "type": "string"
        }
      }
    },
    "InputEmbedContentConfig": {
      "description": "Configures the input to the batch request.",
      "id": "InputEmbedContentConfig",
      "type": "object",
      "properties": {
        "fileName": {
          "description": "The name of the `File` containing the input requests.",
          "type": "string"
        },
        "requests": {
          "description": "The requests to be processed in the batch.",
          "$ref": "InlinedEmbedContentRequests"
        }
      }
    },
    "GroundingAttribution": {
      "id": "GroundingAttribution",
      "type": "object",
      "properties": {
        "content": {
          "description": "Grounding source content that makes up this attribution.",
          "$ref": "Content"
        },
        "sourceId": {
          "description": "Output only. Identifier for the source contributing to this attribution.",
          "$ref": "AttributionSourceId",
          "readOnly": true
        }
      },
      "description": "Attribution for a source that contributed to an answer."
    },
    "Web": {
      "description": "Chunk from the web.",
      "id": "Web",
      "type": "object",
      "properties": {
        "uri": {
          "description": "Output only. URI reference of the chunk.",
          "readOnly": true,
          "type": "string"
        },
        "title": {
          "description": "Output only. Title of the chunk.",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "LogprobsResult": {
      "description": "Logprobs Result",
      "id": "LogprobsResult",
      "type": "object",
      "properties": {
        "chosenCandidates": {
          "items": {
            "$ref": "LogprobsResultCandidate"
          },
          "type": "array",
          "description": "Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates."
        },
        "topCandidates": {
          "items": {
            "$ref": "TopCandidates"
          },
          "type": "array",
          "description": "Length = total number of decoding steps."
        },
        "logProbabilitySum": {
          "type": "number",
          "format": "float",
          "description": "Sum of log probabilities for all tokens."
        }
      }
    },
    "EmbedContentRequest": {
      "id": "EmbedContentRequest",
      "type": "object",
      "properties": {
        "taskType": {
          "enum": [
            "TASK_TYPE_UNSPECIFIED",
            "RETRIEVAL_QUERY",
            "RETRIEVAL_DOCUMENT",
            "SEMANTIC_SIMILARITY",
            "CLASSIFICATION",
            "CLUSTERING",
            "QUESTION_ANSWERING",
            "FACT_VERIFICATION",
            "CODE_RETRIEVAL_QUERY"
          ],
          "enumDescriptions": [
            "Unset value, which will default to one of the other enum values.",
            "Specifies the given text is a query in a search/retrieval setting.",
            "Specifies the given text is a document from the corpus being searched.",
            "Specifies the given text will be used for STS.",
            "Specifies that the given text will be classified.",
            "Specifies that the embeddings will be used for clustering.",
            "Specifies that the given text will be used for question answering.",
            "Specifies that the given text will be used for fact verification.",
            "Specifies that the given text will be used for code retrieval."
          ],
          "type": "string",
          "description": "Optional. Deprecated: Please use EmbedContentConfig.task_type instead. Optional task type for which the embeddings will be used. Not supported on earlier models (`models/embedding-001`).",
          "deprecated": true
        },
        "outputDimensionality": {
          "deprecated": true,
          "type": "integer",
          "format": "int32",
          "description": "Optional. Deprecated: Please use EmbedContentConfig.output_dimensionality instead. Optional reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end. Supported by newer models since 2024 only. You cannot set this value if using the earlier model (`models/embedding-001`)."
        },
        "content": {
          "description": "Required. The content to embed. Only the `parts.text` fields will be counted.",
          "$ref": "Content"
        },
        "title": {
          "deprecated": true,
          "type": "string",
          "description": "Optional. Deprecated: Please use EmbedContentConfig.title instead. An optional title for the text. Only applicable when TaskType is `RETRIEVAL_DOCUMENT`. Note: Specifying a `title` for `RETRIEVAL_DOCUMENT` provides better quality embeddings for retrieval."
        },
        "model": {
          "description": "Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`",
          "type": "string"
        },
        "embedContentConfig": {
          "description": "Optional. Configuration for the EmbedContent request.",
          "$ref": "EmbedContentConfig"
        }
      },
      "description": "Request containing the `Content` for the model to embed."
    },
    "BatchEmbedContentsResponse": {
      "description": "The response to a `BatchEmbedContentsRequest`.",
      "id": "BatchEmbedContentsResponse",
      "type": "object",
      "properties": {
        "embeddings": {
          "items": {
            "$ref": "ContentEmbedding"
          },
          "readOnly": true,
          "type": "array",
          "description": "Output only. The embeddings for each request, in the same order as provided in the batch request."
        },
        "usageMetadata": {
          "description": "Output only. The usage metadata for the request.",
          "$ref": "EmbeddingUsageMetadata",
          "readOnly": true
        }
      }
    },
    "AudioResponseFormat": {
      "description": "Configuration for audio output format.",
      "id": "AudioResponseFormat",
      "type": "object",
      "properties": {
        "delivery": {
          "description": "Optional. The delivery mode for the audio output.",
          "enum": [
            "DELIVERY_UNSPECIFIED",
            "INLINE",
            "URI"
          ],
          "type": "string",
          "enumDescriptions": [
            "Default value. This value is unused.",
            "Audio data is returned inline in the response.",
            "Audio data is returned as a URI."
          ]
        },
        "sampleRate": {
          "type": "integer",
          "format": "int32",
          "description": "Optional. Sample rate in Hz."
        },
        "mimeType": {
          "description": "Optional. The MIME type of the audio output.",
          "enum": [
            "MIME_TYPE_UNSPECIFIED",
            "AUDIO_MP3",
            "AUDIO_OGG_OPUS",
            "AUDIO_L16",
            "AUDIO_WAV",
            "AUDIO_ALAW",
            "AUDIO_MULAW"
          ],
          "type": "string",
          "enumDescriptions": [
            "Default value. This value is unused.",
            "MP3 audio format.",
            "OGG Opus audio format.",
            "Raw PCM (L16) audio format.",
            "WAV audio format.",
            "A-law audio format.",
            "Mu-law audio format."
          ]
        },
        "bitRate": {
          "type": "integer",
          "format": "int32",
          "description": "Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus)."
        }
      }
    },
    "InlinedEmbedContentRequest": {
      "id": "InlinedEmbedContentRequest",
      "type": "object",
      "properties": {
        "metadata": {
          "type": "object",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          },
          "description": "Optional. The metadata to be associated with the request."
        },
        "request": {
          "description": "Required. The request to be processed in the batch.",
          "$ref": "EmbedContentRequest"
        }
      },
      "description": "The request to be processed in the batch."
    },
    "MediaResolution": {
      "description": "Media resolution for tokenization.",
      "id": "MediaResolution",
      "type": "object",
      "properties": {
        "level": {
          "enum": [
            "MEDIA_RESOLUTION_UNSPECIFIED",
            "MEDIA_RESOLUTION_LOW",
            "MEDIA_RESOLUTION_MEDIUM",
            "MEDIA_RESOLUTION_HIGH",
            "MEDIA_RESOLUTION_ULTRA_HIGH"
          ],
          "description": "The tokenization quality used for given media. for Gemini API support .",
          "enumDescriptions": [
            "Media resolution has not been set.",
            "Media resolution set to low.",
            "Media resolution set to medium.",
            "Media resolution set to high.",
            "Media resolution set to ultra high."
          ],
          "type": "string"
        }
      }
    },
    "GoogleSearch": {
      "id": "GoogleSearch",
      "type": "object",
      "properties": {
        "searchTypes": {
          "description": "Optional. The set of search types to enable. If not set, web search is enabled by default.",
          "$ref": "SearchTypes"
        },
        "timeRangeFilter": {
          "description": "Optional. Filter search results to a specific time range. If customers set a start time, they must set an end time (and vice versa).",
          "$ref": "Interval"
        }
      },
      "description": "GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google."
    },
    "EmbedContentBatch": {
      "description": "A resource representing a batch of `EmbedContent` requests.",
      "id": "EmbedContentBatch",
      "type": "object",
      "properties": {
        "name": {
          "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`.",
          "readOnly": true,
          "type": "string"
        },
        "inputConfig": {
          "description": "Required. Input configuration of the instances on which batch processing are performed.",
          "$ref": "InputEmbedContentConfig"
        },
        "displayName": {
          "description": "Required. The user-defined name of this batch.",
          "type": "string"
        },
        "model": {
          "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
          "type": "string"
        },
        "endTime": {
          "readOnly": true,
          "type": "string",
          "format": "google-datetime",
          "description": "Output only. The time at which the batch processing completed."
        },
        "updateTime": {
          "description": "Output only. The time at which the batch was last updated.",
          "readOnly": true,
          "type": "string",
          "format": "google-datetime"
        },
        "priority": {
          "description": "Optional. The priority of the batch. Batches with a higher priority value will be processed before batches with a lower priority value. Negative values are allowed. Default is 0.",
          "type": "string",
          "format": "int64"
        },
        "output": {
          "description": "Output only. The output of the batch request.",
          "$ref": "EmbedContentBatchOutput",
          "readOnly": true
        },
        "createTime": {
          "description": "Output only. The time at which the batch was created.",
          "readOnly": true,
          "type": "string",
          "format": "google-datetime"
        },
        "batchStats": {
          "description": "Output only. Stats about the batch.",
          "$ref": "EmbedContentBatchStats",
          "readOnly": true
        },
        "state": {
          "description": "Output only. The state of the batch.",
          "enumDescriptions": [
            "The batch state is unspecified.",
            "The service is preparing to run the batch.",
            "The batch is in progress.",
            "The batch completed successfully.",
            "The batch failed.",
            "The batch has been cancelled.",
            "The batch has expired."
          ],
          "readOnly": true,
          "type": "string",
          "enum": [
            "BATCH_STATE_UNSPECIFIED",
            "BATCH_STATE_PENDING",
            "BATCH_STATE_RUNNING",
            "BATCH_STATE_SUCCEEDED",
            "BATCH_STATE_FAILED",
            "BATCH_STATE_CANCELLED",
            "BATCH_STATE_EXPIRED"
          ]
        }
      }
    },
    "ListOperationsResponse": {
      "id": "ListOperationsResponse",
      "type": "object",
      "properties": {
        "nextPageToken": {
          "description": "The standard List next-page token.",
          "type": "string"
        },
        "unreachable": {
          "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "operations": {
          "type": "array",
          "items": {
            "$ref": "Operation"
          },
          "description": "A list of operations that matches the specified filter in the request."
        }
      },
      "description": "The response message for Operations.ListOperations."
    },
    "GroundingMetadata": {
      "id": "GroundingMetadata",
      "type": "object",
      "properties": {
        "retrievalMetadata": {
          "description": "Metadata related to retrieval in the grounding flow.",
          "$ref": "RetrievalMetadata"
        },
        "groundingChunks": {
          "description": "List of supporting references retrieved from specified grounding source. When streaming, this only contains the grounding chunks that have not been included in the grounding metadata of previous responses.",
          "type": "array",
          "items": {
            "$ref": "GroundingChunk"
          }
        },
        "googleMapsWidgetContextToken": {
          "description": "Optional. Resource name of the Google Maps widget context token that can be used with the PlacesContextElement widget in order to render contextual data. Only populated in the case that grounding with Google Maps is enabled.",
          "type": "string"
        },
        "searchEntryPoint": {
          "description": "Optional. Google search entry for the following-up web searches.",
          "$ref": "SearchEntryPoint"
        },
        "groundingSupports": {
          "type": "array",
          "items": {
            "$ref": "GroundingSupport"
          },
          "description": "List of grounding support."
        },
        "webSearchQueries": {
          "description": "Web search queries for the following-up web search.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "imageSearchQueries": {
          "description": "Image search queries used for grounding.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "description": "Metadata returned to client when grounding is enabled."
    },
    "Empty": {
      "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
      "id": "Empty",
      "type": "object",
      "properties": {}
    },
    "GoogleMaps": {
      "id": "GoogleMaps",
      "type": "object",
      "properties": {
        "enableWidget": {
          "description": "Optional. Whether to return a widget context token in the GroundingMetadata of the response. Developers can use the widget context token to render a Google Maps widget with geospatial context related to the places that the model references in the response.",
          "type": "boolean"
        }
      },
      "description": "The GoogleMaps Tool that provides geospatial context for the user's query."
    },
    "SafetyRating": {
      "description": "Safety rating for a piece of content. The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here.",
      "id": "SafetyRating",
      "type": "object",
      "properties": {
        "category": {
          "description": "Required. The category for this rating.",
          "enumDeprecated": [
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            true,
            false
          ],
          "enum": [
            "HARM_CATEGORY_UNSPECIFIED",
            "HARM_CATEGORY_DEROGATORY",
            "HARM_CATEGORY_TOXICITY",
            "HARM_CATEGORY_VIOLENCE",
            "HARM_CATEGORY_SEXUAL",
            "HARM_CATEGORY_MEDICAL",
            "HARM_CATEGORY_DANGEROUS",
            "HARM_CATEGORY_HARASSMENT",
            "HARM_CATEGORY_HATE_SPEECH",
            "HARM_CATEGORY_SEXUALLY_EXPLICIT",
            "HARM_CATEGORY_DANGEROUS_CONTENT",
            "HARM_CATEGORY_CIVIC_INTEGRITY",
            "HARM_CATEGORY_JAILBREAK"
          ],
          "enumDescriptions": [
            "Category is unspecified.",
            "**PaLM** - Negative or harmful comments targeting identity and/or protected attribute.",
            "**PaLM** - Content that is rude, disrespectful, or profane.",
            "**PaLM** - Describes scenarios depicting violence against an individual or group, or general descriptions of gore.",
            "**PaLM** - Contains references to sexual acts or other lewd content.",
            "**PaLM** - Promotes unchecked medical advice.",
            "**PaLM** - Dangerous content that promotes, facilitates, or encourages harmful acts.",
            "**Gemini** - Harassment content.",
            "**Gemini** - Hate speech and content.",
            "**Gemini** - Sexually explicit content.",
            "**Gemini** - Dangerous content.",
            "**Gemini** - Content that may be used to harm civic integrity. DEPRECATED: use enable_enhanced_civic_answers instead.",
            "**Gemini** - Prompts attempting to bypass or subvert the model's safety guidelines (jailbreak attempts)."
          ],
          "type": "string"
        },
        "probability": {
          "type": "string",
          "enumDescriptions": [
            "Probability is unspecified.",
            "Content has a negligible chance of being unsafe.",
            "Content has a low chance of being unsafe.",
            "Content has a medium chance of being unsafe.",
            "Content has a high chance of being unsafe."
          ],
          "description": "Required. The probability of harm for this content.",
          "enum": [
            "HARM_PROBABILITY_UNSPECIFIED",
            "NEGLIGIBLE",
            "LOW",
            "MEDIUM",
            "HIGH"
          ]
        },
        "blocked": {
          "description": "Was this content blocked because of this rating?",
          "type": "boolean"
        }
      }
    },
    "InlinedResponses": {
      "id": "InlinedResponses",
      "type": "object",
      "properties": {
        "inlinedResponses": {
          "description": "Output only. The responses to the requests in the batch.",
          "items": {
            "$ref": "InlinedResponse"
          },
          "readOnly": true,
          "type": "array"
        }
      },
      "description": "The responses to the requests in the batch."
    },
    "FunctionCall": {
      "description": "A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values.",
      "id": "FunctionCall",
      "type": "object",
      "properties": {
        "id": {
          "description": "Optional. Unique identifier of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.",
          "type": "string"
        },
        "args": {
          "type": "object",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          },
          "description": "Optional. The function parameters and values in JSON object format."
        },
        "name": {
          "description": "Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128.",
          "type": "string"
        }
      }
    },
    "GenerateContentRequest": {
      "id": "GenerateContentRequest",
      "type": "object",
      "properties": {
        "contents": {
          "type": "array",
          "items": {
            "$ref": "Content"
          },
          "description": "Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like [chat](https://ai.google.dev/gemini-api/docs/text-generation#chat), this is a repeated field that contains the conversation history and the latest request."
        },
        "tools": {
          "items": {
            "$ref": "Tool"
          },
          "type": "array",
          "description": "Optional. A list of `Tools` the `Model` may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the `Model`. Supported `Tool`s are `Function` and `code_execution`. Refer to the [Function calling](https://ai.google.dev/gemini-api/docs/function-calling) and the [Code execution](https://ai.google.dev/gemini-api/docs/code-execution) guides to learn more."
        },
        "safetySettings": {
          "description": "Optional. A list of unique `SafetySetting` instances for blocking unsafe content. This will be enforced on the `GenerateContentRequest.contents` and `GenerateContentResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type. The API will block any contents and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY, HARM_CATEGORY_JAILBREAK are supported. Refer to the [guide](https://ai.google.dev/gemini-api/docs/safety-settings) for detailed information on available safety settings. Also refer to the [Safety guidance](https://ai.google.dev/gemini-api/docs/safety-guidance) to learn how to incorporate safety considerations in your AI applications.",
          "items": {
            "$ref": "SafetySetting"
          },
          "type": "array"
        },
        "systemInstruction": {
          "description": "Optional. Developer set [system instruction(s)](https://ai.google.dev/gemini-api/docs/system-instructions). Currently, text only.",
          "$ref": "Content"
        },
        "toolConfig": {
          "description": "Optional. Tool configuration for any `Tool` specified in the request. Refer to the [Function calling guide](https://ai.google.dev/gemini-api/docs/function-calling#function_calling_mode) for a usage example.",
          "$ref": "ToolConfig"
        },
        "serviceTier": {
          "description": "Optional. The service tier of the request.",
          "enum": [
            "unspecified",
            "standard",
            "flex",
            "priority"
          ],
          "type": "string",
          "enumDescriptions": [
            "Default service tier, which is standard.",
            "Standard service tier.",
            "Flex service tier.",
            "Priority service tier."
          ]
        },
        "store": {
          "description": "Optional. Configures the logging behavior for a given request. If set, it takes precedence over the project-level logging config.",
          "type": "boolean"
        },
        "model": {
          "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
          "type": "string"
        },
        "generationConfig": {
          "description": "Optional. Configuration options for model generation and outputs.",
          "$ref": "GenerationConfig"
        }
      },
      "description": "Request to generate a completion from the model."
    },
    "TuningSnapshot": {
      "id": "TuningSnapshot",
      "type": "object",
      "properties": {
        "meanLoss": {
          "readOnly": true,
          "type": "number",
          "format": "float",
          "description": "Output only. The mean loss of the training examples for this step."
        },
        "computeTime": {
          "description": "Output only. The timestamp when this metric was computed.",
          "readOnly": true,
          "type": "string",
          "format": "google-datetime"
        },
        "step": {
          "readOnly": true,
          "type": "integer",
          "format": "int32",
          "description": "Output only. The tuning step."
        },
        "epoch": {
          "readOnly": true,
          "type": "integer",
          "format": "int32",
          "description": "Output only. The epoch this step was part of."
        }
      },
      "description": "Record for a single tuning step."
    },
    "SearchEntryPoint": {
      "id": "SearchEntryPoint",
      "type": "object",
      "properties": {
        "sdkBlob": {
          "description": "Optional. Base64 encoded JSON representing array of tuple.",
          "type": "string",
          "format": "byte"
        },
        "renderedContent": {
          "description": "Optional. Web content snippet that can be embedded in a web page or an app webview.",
          "type": "string"
        }
      },
      "description": "Google search entry point."
    },
    "ResponseFormatConfig": {
      "description": "Configuration for the response output format. This is a flat object where each optional sub-field configures a specific output modality.",
      "id": "ResponseFormatConfig",
      "type": "object",
      "properties": {
        "text": {
          "description": "Optional. Text output format configuration.",
          "$ref": "TextResponseFormat"
        },
        "audio": {
          "description": "Optional. Audio output format configuration.",
          "$ref": "AudioResponseFormat"
        },
        "image": {
          "description": "Optional. Image output format configuration.",
          "$ref": "ImageResponseFormat"
        }
      }
    },
    "TextResponseFormat": {
      "id": "TextResponseFormat",
      "type": "object",
      "properties": {
        "mimeType": {
          "description": "Optional. The MIME type of the text output.",
          "enum": [
            "MIME_TYPE_UNSPECIFIED",
            "APPLICATION_JSON",
            "TEXT_PLAIN"
          ],
          "type": "string",
          "enumDescriptions": [
            "Default value. This value is unused.",
            "JSON output format.",
            "Plain text output format."
          ]
        },
        "schema": {
          "description": "Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.",
          "type": "any"
        }
      },
      "description": "Configuration for text output format."
    },
    "AttributionSourceId": {
      "id": "AttributionSourceId",
      "type": "object",
      "properties": {
        "semanticRetrieverChunk": {
          "description": "Identifier for a `Chunk` fetched via Semantic Retriever.",
          "$ref": "SemanticRetrieverChunk"
        },
        "groundingPassage": {
          "description": "Identifier for an inline passage.",
          "$ref": "GroundingPassageId"
        }
      },
      "description": "Identifier for the source contributing to this attribution."
    },
    "VideoMetadata": {
      "id": "VideoMetadata",
      "deprecated": true,
      "description": "Deprecated: Use `GenerateContentRequest.processing_options` instead. Metadata describes the input video content.",
      "type": "object",
      "properties": {
        "startOffset": {
          "description": "Optional. The start offset of the video.",
          "type": "string",
          "format": "google-duration"
        },
        "fps": {
          "type": "number",
          "format": "double",
          "description": "Optional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]."
        },
        "endOffset": {
          "description": "Optional. The end offset of the video.",
          "type": "string",
          "format": "google-duration"
        }
      }
    },
    "SearchTypes": {
      "description": "Different types of search that can be enabled on the GoogleSearch tool.",
      "id": "SearchTypes",
      "type": "object",
      "properties": {
        "webSearch": {
          "description": "Optional. Enables web search. Only text results are returned.",
          "$ref": "WebSearch"
        },
        "imageSearch": {
          "description": "Optional. Enables image search. Image bytes are returned.",
          "$ref": "ImageSearch"
        }
      }
    },
    "FunctionCallingConfig": {
      "id": "FunctionCallingConfig",
      "type": "object",
      "properties": {
        "mode": {
          "enumDescriptions": [
            "Unspecified function calling mode. This value should not be used.",
            "Default model behavior, model decides to predict either a function call or a natural language response.",
            "Model is constrained to always predicting a function call only. If \"allowed_function_names\" are set, the predicted function call will be limited to any one of \"allowed_function_names\", else the predicted function call will be any one of the provided \"function_declarations\".",
            "Model will not predict any function call. Model behavior is same as when not passing any function declarations.",
            "Model decides to predict either a function call or a natural language response, but will validate function calls with constrained decoding. If \"allowed_function_names\" are set, the predicted function call will be limited to any one of \"allowed_function_names\", else the predicted function call will be any one of the provided \"function_declarations\"."
          ],
          "type": "string",
          "enum": [
            "MODE_UNSPECIFIED",
            "AUTO",
            "ANY",
            "NONE",
            "VALIDATED"
          ],
          "description": "Optional. Specifies the mode in which function calling should execute. If unspecified, the default value will be set to AUTO."
        },
        "allowedFunctionNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Optional. A set of function names that, when provided, limits the functions the model will call. This should only be set when the Mode is ANY or VALIDATED. Function names should match [FunctionDeclaration.name]. When set, model will predict a function call from only allowed function names."
        }
      },
      "description": "Configuration for specifying function calling behavior."
    },
    "Interval": {
      "description": "Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.",
      "id": "Interval",
      "type": "object",
      "properties": {
        "endTime": {
          "description": "Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.",
          "type": "string",
          "format": "google-datetime"
        },
        "startTime": {
          "description": "Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.",
          "type": "string",
          "format": "google-datetime"
        }
      }
    },
    "BatchGenerateContentRequest": {
      "description": "Request for a `BatchGenerateContent` operation.",
      "id": "BatchGenerateContentRequest",
      "type": "object",
      "properties": {
        "batch": {
          "description": "Required. The batch to create.",
          "$ref": "GenerateContentBatch"
        }
      }
    },
    "EmbedContentBatchOutput": {
      "id": "EmbedContentBatchOutput",
      "type": "object",
      "properties": {
        "responsesFile": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. The file ID of the file containing the responses. The file will be a JSONL file with a single response per line. The responses will be `EmbedContentResponse` messages formatted as JSON. The responses will be written in the same order as the input requests."
        },
        "inlinedResponses": {
          "description": "Output only. The responses to the requests in the batch. Returned when the batch was built using inlined requests. The responses will be in the same order as the input requests.",
          "$ref": "InlinedEmbedContentResponses",
          "readOnly": true
        }
      },
      "description": "The output of a batch request. This is returned in the `AsyncBatchEmbedContentResponse` or the `EmbedContentBatch.output` field."
    },
    "GroundingChunk": {
      "description": "A `GroundingChunk` represents a segment of supporting evidence that grounds the model's response. It can be a chunk from the web, a retrieved context from a file, or information from Google Maps.",
      "id": "GroundingChunk",
      "type": "object",
      "properties": {
        "maps": {
          "description": "Optional. Grounding chunk from Google Maps.",
          "$ref": "Maps"
        },
        "web": {
          "description": "Grounding chunk from the web.",
          "$ref": "Web"
        },
        "image": {
          "description": "Optional. Grounding chunk from image search.",
          "$ref": "Image"
        }
      }
    },
    "ImageSearch": {
      "description": "Image search for grounding and related configurations.",
      "id": "ImageSearch",
      "type": "object",
      "properties": {}
    },
    "ExecutableCode": {
      "description": "Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated.",
      "id": "ExecutableCode",
      "type": "object",
      "properties": {
        "id": {
          "description": "Optional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`.",
          "type": "string"
        },
        "language": {
          "description": "Required. Programming language of the `code`.",
          "enum": [
            "LANGUAGE_UNSPECIFIED",
            "PYTHON"
          ],
          "type": "string",
          "enumDescriptions": [
            "Unspecified language. This value should not be used.",
            "Python \u003e= 3.10, with numpy and simpy available. Python is the default language."
          ]
        },
        "code": {
          "description": "Required. The code to be executed.",
          "type": "string"
        }
      }
    },
    "FunctionDeclaration": {
      "id": "FunctionDeclaration",
      "type": "object",
      "properties": {
        "response": {
          "description": "Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.",
          "$ref": "Schema"
        },
        "description": {
          "description": "Required. A brief description of the function.",
          "type": "string"
        },
        "parameters": {
          "description": "Optional. Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.",
          "$ref": "Schema"
        },
        "name": {
          "description": "Required. The name of the function. Must be a-z, A-Z, 0-9, or contain underscores, colons, dots, and dashes, with a maximum length of 128.",
          "type": "string"
        }
      },
      "description": "Structured representation of a function declaration as defined by the [OpenAPI 3.03 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client."
    },
    "ImageConfig": {
      "id": "ImageConfig",
      "type": "object",
      "properties": {
        "aspectRatio": {
          "description": "Optional. The aspect ratio of the image to generate. Supported aspect ratios: `1:1`, `1:4`, `4:1`, `1:8`, `8:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, or `21:9`. If not specified, the model will choose a default aspect ratio based on any reference images provided.",
          "type": "string"
        },
        "imageSize": {
          "description": "Optional. Specifies the size of generated images. Supported values are `512`, `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.",
          "type": "string"
        }
      },
      "description": "Config for image generation features."
    },
    "CitationMetadata": {
      "description": "A collection of source attributions for a piece of content.",
      "id": "CitationMetadata",
      "type": "object",
      "properties": {
        "citationSources": {
          "description": "Citations to sources for a specific response.",
          "items": {
            "$ref": "CitationSource"
          },
          "type": "array"
        }
      }
    },
    "GroundingSupport": {
      "description": "Grounding support.",
      "id": "GroundingSupport",
      "type": "object",
      "properties": {
        "segment": {
          "description": "Segment of the content this support belongs to.",
          "$ref": "Segment"
        },
        "confidenceScores": {
          "description": "Optional. Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices.",
          "items": {
            "type": "number",
            "format": "float"
          },
          "type": "array"
        },
        "renderedParts": {
          "description": "Output only. Indices into the `parts` field of the candidate's content. These indices specify which rendered parts are associated with this support source.",
          "items": {
            "type": "integer",
            "format": "int32"
          },
          "readOnly": true,
          "type": "array"
        },
        "groundingChunkIndices": {
          "items": {
            "type": "integer",
            "format": "int32"
          },
          "type": "array",
          "description": "Optional. A list of indices (into 'grounding_chunk' in `response.candidate.grounding_metadata`) specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. If the response is streaming, the grounding_chunk_indices refer to the indices across all responses. It is the client's responsibility to accumulate the grounding chunks from all responses (while maintaining the same order)."
        }
      }
    },
    "EmbedContentResponse": {
      "id": "EmbedContentResponse",
      "type": "object",
      "properties": {
        "embedding": {
          "readOnly": true,
          "description": "Output only. The embedding generated from the input content.",
          "$ref": "ContentEmbedding"
        },
        "usageMetadata": {
          "description": "Output only. The usage metadata for the request.",
          "$ref": "EmbeddingUsageMetadata",
          "readOnly": true
        }
      },
      "description": "The response to an `EmbedContentRequest`."
    },
    "InlinedEmbedContentResponses": {
      "description": "The responses to the requests in the batch.",
      "id": "InlinedEmbedContentResponses",
      "type": "object",
      "properties": {
        "inlinedResponses": {
          "description": "Output only. The responses to the requests in the batch.",
          "items": {
            "$ref": "InlinedEmbedContentResponse"
          },
          "readOnly": true,
          "type": "array"
        }
      }
    },
    "GoogleSearchRetrieval": {
      "id": "GoogleSearchRetrieval",
      "type": "object",
      "properties": {
        "dynamicRetrievalConfig": {
          "description": "Specifies the dynamic retrieval configuration for the given source.",
          "$ref": "DynamicRetrievalConfig"
        }
      },
      "description": "Tool to retrieve public web data for grounding, powered by Google."
    },
    "Image": {
      "id": "Image",
      "type": "object",
      "properties": {
        "sourceUri": {
          "description": "The web page URI for attribution.",
          "type": "string"
        },
        "imageUri": {
          "description": "The image asset URL.",
          "type": "string"
        },
        "title": {
          "description": "The title of the web page that the image is from.",
          "type": "string"
        },
        "domain": {
          "description": "The root domain of the web page that the image is from, e.g. \"example.com\".",
          "type": "string"
        }
      },
      "description": "Chunk from image search."
    },
    "Maps": {
      "id": "Maps",
      "type": "object",
      "properties": {
        "placeId": {
          "description": "The ID of the place, in `places/{place_id}` format. A user can use this ID to look up that place.",
          "type": "string"
        },
        "uri": {
          "description": "URI reference of the place.",
          "type": "string"
        },
        "text": {
          "description": "Text description of the place answer.",
          "type": "string"
        },
        "placeAnswerSources": {
          "description": "Sources that provide answers about the features of a given place in Google Maps.",
          "$ref": "PlaceAnswerSources"
        },
        "title": {
          "description": "Title of the place.",
          "type": "string"
        }
      },
      "description": "A grounding chunk from Google Maps. A Maps chunk corresponds to a single place."
    },
    "BatchStats": {
      "description": "Stats about the batch.",
      "id": "BatchStats",
      "type": "object",
      "properties": {
        "failedRequestCount": {
          "readOnly": true,
          "type": "string",
          "format": "int64",
          "description": "Output only. The number of requests that failed to be processed."
        },
        "requestCount": {
          "description": "Output only. The number of requests in the batch.",
          "readOnly": true,
          "type": "string",
          "format": "int64"
        },
        "successfulRequestCount": {
          "description": "Output only. The number of requests that were successfully processed.",
          "readOnly": true,
          "type": "string",
          "format": "int64"
        },
        "pendingRequestCount": {
          "description": "Output only. The number of requests that are still pending processing.",
          "readOnly": true,
          "type": "string",
          "format": "int64"
        }
      }
    },
    "UrlMetadata": {
      "id": "UrlMetadata",
      "type": "object",
      "properties": {
        "retrievedUrl": {
          "description": "Retrieved url by the tool.",
          "type": "string"
        },
        "urlRetrievalStatus": {
          "type": "string",
          "enumDescriptions": [
            "Default value. This value is unused.",
            "Url retrieval is successful.",
            "Url retrieval is failed due to error.",
            "Url retrieval is failed because the content is behind paywall.",
            "Url retrieval is failed because the content is unsafe."
          ],
          "description": "Status of the url retrieval.",
          "enum": [
            "URL_RETRIEVAL_STATUS_UNSPECIFIED",
            "URL_RETRIEVAL_STATUS_SUCCESS",
            "URL_RETRIEVAL_STATUS_ERROR",
            "URL_RETRIEVAL_STATUS_PAYWALL",
            "URL_RETRIEVAL_STATUS_UNSAFE"
          ]
        }
      },
      "description": "Context of the a single url retrieval."
    },
    "Part": {
      "id": "Part",
      "type": "object",
      "properties": {
        "videoMetadata": {
          "description": "Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.",
          "$ref": "VideoMetadata"
        },
        "functionResponse": {
          "description": "The result output of a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model.",
          "$ref": "FunctionResponse"
        },
        "partMetadata": {
          "description": "Custom metadata associated with the Part. Agents using genai.Part as content representation may need to keep track of the additional information. For example it can be name of a file/source from which the Part originates or a way to multiplex multiple Part streams.",
          "type": "object",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          }
        },
        "fileData": {
          "description": "URI based data.",
          "$ref": "FileData"
        },
        "functionCall": {
          "description": "A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values.",
          "$ref": "FunctionCall"
        },
        "toolResponse": {
          "description": "The output from a server-side `ToolCall` execution. This field is populated by the client with the results of executing the corresponding `ToolCall`.",
          "$ref": "ToolResponse"
        },
        "executableCode": {
          "description": "Code generated by the model that is meant to be executed.",
          "$ref": "ExecutableCode"
        },
        "codeExecutionResult": {
          "description": "Result of executing the `ExecutableCode`.",
          "$ref": "CodeExecutionResult"
        },
        "thoughtSignature": {
          "description": "Optional. An opaque signature for the thought so it can be reused in subsequent requests.",
          "type": "string",
          "format": "byte"
        },
        "mediaResolution": {
          "description": "Optional. Media resolution for the input media.",
          "$ref": "MediaResolution"
        },
        "toolCall": {
          "description": "Server-side tool call. This field is populated when the model predicts a tool invocation that should be executed on the server. The client is expected to echo this message back to the API.",
          "$ref": "ToolCall"
        },
        "text": {
          "description": "Inline text.",
          "type": "string"
        },
        "thought": {
          "description": "Optional. Indicates if the part is thought from the model.",
          "type": "boolean"
        },
        "inlineData": {
          "description": "Inline media bytes.",
          "$ref": "Blob"
        }
      },
      "description": "A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes."
    },
    "CitationSource": {
      "description": "A citation to a source for a portion of a specific response.",
      "id": "CitationSource",
      "type": "object",
      "properties": {
        "license": {
          "description": "Optional. License for the GitHub project that is attributed as a source for segment. License info is required for code citations.",
          "type": "string"
        },
        "startIndex": {
          "description": "Optional. Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.",
          "type": "integer",
          "format": "int32"
        },
        "endIndex": {
          "type": "integer",
          "format": "int32",
          "description": "Optional. End of the attributed segment, exclusive."
        },
        "uri": {
          "description": "Optional. URI that is attributed as a source for a portion of the text.",
          "type": "string"
        }
      }
    },
    "GenerationConfig": {
      "id": "GenerationConfig",
      "type": "object",
      "properties": {
        "enableEnhancedCivicAnswers": {
          "description": "Optional. Enables enhanced civic answers. It may not be available for all models.",
          "type": "boolean"
        },
        "responseModalities": {
          "description": "Optional. The requested modalities of the response. Represents the set of modalities that the model can return, and should be expected in the response. This is an exact match to the modalities of the response. A model may have multiple combinations of supported modalities. If the requested modalities do not match any of the supported combinations, an error will be returned. An empty list is equivalent to requesting only text.",
          "items": {
            "enum": [
              "MODALITY_UNSPECIFIED",
              "TEXT",
              "IMAGE",
              "AUDIO"
            ],
            "enumDescriptions": [
              "Default value.",
              "Indicates the model should return text.",
              "Indicates the model should return images.",
              "Indicates the model should return audio."
            ],
            "type": "string"
          },
          "type": "array"
        },
        "responseSchema": {
          "description": "Optional. Output schema of the generated candidate text. Schemas must be a subset of the [OpenAPI schema](https://spec.openapis.org/oas/v3.0.3#schema) and can be objects, primitives or arrays. If set, a compatible `response_mime_type` must also be set. Compatible MIME types: `application/json`: Schema for JSON response. Refer to the [JSON text generation guide](https://ai.google.dev/gemini-api/docs/json-mode) for more details.",
          "$ref": "Schema",
          "deprecated": true
        },
        "imageConfig": {
          "description": "Optional. Config for image generation. An error will be returned if this field is set for models that don't support these config options.",
          "$ref": "ImageConfig"
        },
        "stopSequences": {
          "description": "Optional. The set of character sequences (up to 5) that will stop output generation. If specified, the API will stop at the first appearance of a `stop_sequence`. The stop sequence will not be included as part of the response.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "responseMimeType": {
          "description": "Optional. MIME type of the generated candidate text. Supported MIME types are: `text/plain`: (default) Text output. `application/json`: JSON response in the response candidates. `text/x.enum`: ENUM as a string response in the response candidates. Refer to the [docs](https://ai.google.dev/gemini-api/docs/prompting_with_media#plain_text_formats) for a list of all supported text MIME types.",
          "type": "string"
        },
        "frequencyPenalty": {
          "type": "number",
          "format": "float",
          "description": "Optional. Frequency penalty applied to the next token's logprobs, multiplied by the number of times each token has been seen in the respponse so far. A positive penalty will discourage the use of tokens that have already been used, proportional to the number of times the token has been used: The more a token is used, the more difficult it is for the model to use that token again increasing the vocabulary of responses. Caution: A _negative_ penalty will encourage the model to reuse tokens proportional to the number of times the token has been used. Small negative values will reduce the vocabulary of a response. Larger negative values will cause the model to start repeating a common token until it hits the max_output_tokens limit."
        },
        "presencePenalty": {
          "type": "number",
          "format": "float",
          "description": "Optional. Presence penalty applied to the next token's logprobs if the token has already been seen in the response. This penalty is binary on/off and not dependant on the number of times the token is used (after the first). Use frequency_penalty for a penalty that increases with each use. A positive penalty will discourage the use of tokens that have already been used in the response, increasing the vocabulary. A negative penalty will encourage the use of tokens that have already been used in the response, decreasing the vocabulary."
        },
        "candidateCount": {
          "description": "Optional. Number of generated responses to return. If unset, this will default to 1. Please note that this doesn't work for previous generation models (Gemini 1.0 family)",
          "type": "integer",
          "format": "int32"
        },
        "_responseJsonSchema": {
          "description": "Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). If set, `response_schema` must be omitted, but `response_mime_type` is required. While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported: - `$id` - `$defs` - `$ref` - `$anchor` - `type` - `format` - `title` - `description` - `enum` (for strings and numbers) - `items` - `prefixItems` - `minItems` - `maxItems` - `minimum` - `maximum` - `anyOf` - `oneOf` (interpreted the same as `anyOf`) - `properties` - `additionalProperties` - `required` The non-standard `propertyOrdering` property may also be set. Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If `$ref` is set on a sub-schema, no other properties, except for than those starting as a `$`, may be set.",
          "deprecated": true,
          "type": "any"
        },
        "logprobs": {
          "description": "Optional. Only valid if response_logprobs=True. This sets the number of top logprobs, including the chosen candidate, to return at each decoding step in the Candidate.logprobs_result. The number must be in the range of [0, 20].",
          "type": "integer",
          "format": "int32"
        },
        "maxOutputTokens": {
          "description": "Optional. The maximum number of tokens to include in a response candidate. Note: The default value varies by model, see the `Model.output_token_limit` attribute of the `Model` returned from the `getModel` function.",
          "type": "integer",
          "format": "int32"
        },
        "thinkingConfig": {
          "description": "Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.",
          "$ref": "ThinkingConfig"
        },
        "temperature": {
          "type": "number",
          "format": "float",
          "description": "Optional. Controls the randomness of the output. Note: The default value varies by model, see the `Model.temperature` attribute of the `Model` returned from the `getModel` function. Values can range from [0.0, 2.0]."
        },
        "topP": {
          "description": "Optional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and Top-p (nucleus) sampling. Tokens are sorted based on their assigned probabilities so that only the most likely tokens are considered. Top-k sampling directly limits the maximum number of tokens to consider, while Nucleus sampling limits the number of tokens based on the cumulative probability. Note: The default value varies by `Model` and is specified by the`Model.top_p` attribute returned from the `getModel` function. An empty `top_k` attribute indicates that the model doesn't apply top-k sampling and doesn't allow setting `top_k` on requests.",
          "type": "number",
          "format": "float"
        },
        "responseFormat": {
          "description": "Optional. Configuration for the response output format. Allows specifying output configuration per modality (text, audio, image) in a flat structure.",
          "$ref": "ResponseFormatConfig"
        },
        "mediaResolution": {
          "enum": [
            "MEDIA_RESOLUTION_UNSPECIFIED",
            "MEDIA_RESOLUTION_LOW",
            "MEDIA_RESOLUTION_MEDIUM",
            "MEDIA_RESOLUTION_HIGH"
          ],
          "description": "Optional. If specified, the media resolution specified will be used.",
          "enumDescriptions": [
            "Media resolution has not been set.",
            "Media resolution set to low (64 tokens).",
            "Media resolution set to medium (256 tokens).",
            "Media resolution set to high (zoomed reframing with 256 tokens)."
          ],
          "type": "string"
        },
        "responseJsonSchema": {
          "description": "Optional. An internal detail. Use `responseJsonSchema` rather than this field.",
          "type": "any"
        },
        "seed": {
          "type": "integer",
          "format": "int32",
          "description": "Optional. Seed used in decoding. If not set, the request uses a randomly generated seed."
        },
        "topK": {
          "type": "integer",
          "format": "int32",
          "description": "Optional. The maximum number of tokens to consider when sampling. Gemini models use Top-p (nucleus) sampling or a combination of Top-k and nucleus sampling. Top-k sampling considers the set of `top_k` most probable tokens. Models running with nucleus sampling don't allow top_k setting. Note: The default value varies by `Model` and is specified by the`Model.top_p` attribute returned from the `getModel` function. An empty `top_k` attribute indicates that the model doesn't apply top-k sampling and doesn't allow setting `top_k` on requests."
        },
        "responseLogprobs": {
          "description": "Optional. If true, export the logprobs results in response.",
          "type": "boolean"
        }
      },
      "description": "Configuration options for model generation and outputs. Not all parameters are configurable for every model."
    },
    "FileData": {
      "description": "URI based data.",
      "id": "FileData",
      "type": "object",
      "properties": {
        "mimeType": {
          "description": "Optional. The IANA standard MIME type of the source data.",
          "type": "string"
        },
        "fileUri": {
          "description": "Required. URI.",
          "type": "string"
        }
      }
    },
    "GroundingPassageId": {
      "description": "Identifier for a part within a `GroundingPassage`.",
      "id": "GroundingPassageId",
      "type": "object",
      "properties": {
        "passageId": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. ID of the passage matching the `GenerateAnswerRequest`'s `GroundingPassage.id`."
        },
        "partIndex": {
          "readOnly": true,
          "type": "integer",
          "format": "int32",
          "description": "Output only. Index of the part within the `GenerateAnswerRequest`'s `GroundingPassage.content`."
        }
      }
    },
    "Status": {
      "id": "Status",
      "type": "object",
      "properties": {
        "message": {
          "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.",
          "type": "string"
        },
        "details": {
          "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": {
              "type": "any",
              "description": "Properties of the object. Contains field @type with type URL."
            }
          }
        },
        "code": {
          "type": "integer",
          "format": "int32",
          "description": "The status code, which should be an enum value of google.rpc.Code."
        }
      },
      "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors)."
    },
    "Schema": {
      "description": "The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema).",
      "id": "Schema",
      "type": "object",
      "properties": {
        "minItems": {
          "type": "string",
          "format": "int64",
          "description": "Optional. Minimum number of the elements for Type.ARRAY."
        },
        "minLength": {
          "type": "string",
          "format": "int64",
          "description": "Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING"
        },
        "maxLength": {
          "description": "Optional. Maximum length of the Type.STRING",
          "type": "string",
          "format": "int64"
        },
        "description": {
          "description": "Optional. A brief description of the parameter. This could contain examples of use. Parameter description may be formatted as Markdown.",
          "type": "string"
        },
        "minimum": {
          "description": "Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER",
          "type": "number",
          "format": "double"
        },
        "items": {
          "description": "Optional. Schema of the elements of Type.ARRAY.",
          "$ref": "Schema"
        },
        "enum": {
          "description": "Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]}",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "pattern": {
          "description": "Optional. Pattern of the Type.STRING to restrict a string to a regular expression.",
          "type": "string"
        },
        "properties": {
          "description": "Optional. Properties of Type.OBJECT.",
          "type": "object",
          "additionalProperties": {
            "$ref": "Schema"
          }
        },
        "minProperties": {
          "type": "string",
          "format": "int64",
          "description": "Optional. Minimum number of the properties for Type.OBJECT."
        },
        "title": {
          "description": "Optional. The title of the schema.",
          "type": "string"
        },
        "example": {
          "description": "Optional. Example of the object. Will only populated when the object is the root.",
          "type": "any"
        },
        "format": {
          "description": "Optional. The format of the data. Any value is allowed, but most do not trigger any special functionality.",
          "type": "string"
        },
        "required": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "Optional. Required properties of Type.OBJECT."
        },
        "maxProperties": {
          "type": "string",
          "format": "int64",
          "description": "Optional. Maximum number of the properties for Type.OBJECT."
        },
        "maxItems": {
          "type": "string",
          "format": "int64",
          "description": "Optional. Maximum number of the elements for Type.ARRAY."
        },
        "propertyOrdering": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Optional. The order of the properties. Not a standard field in open api spec. Used to determine the order of the properties in the response."
        },
        "nullable": {
          "description": "Optional. Indicates if the value may be null.",
          "type": "boolean"
        },
        "maximum": {
          "description": "Optional. Maximum value of the Type.INTEGER and Type.NUMBER",
          "type": "number",
          "format": "double"
        },
        "anyOf": {
          "description": "Optional. The value should be validated against any (one or more) of the subschemas in the list.",
          "type": "array",
          "items": {
            "$ref": "Schema"
          }
        },
        "type": {
          "description": "Required. Data type.",
          "enum": [
            "TYPE_UNSPECIFIED",
            "STRING",
            "NUMBER",
            "INTEGER",
            "BOOLEAN",
            "ARRAY",
            "OBJECT",
            "NULL"
          ],
          "type": "string",
          "enumDescriptions": [
            "Not specified, should not be used.",
            "String type.",
            "Number type.",
            "Integer type.",
            "Boolean type.",
            "Array type.",
            "Object type.",
            "Null type."
          ]
        },
        "default": {
          "description": "Optional. Default value of the field. Per JSON Schema, this field is intended for documentation generators and doesn't affect validation. Thus it's included here and ignored so that developers who send schemas with a `default` field don't get unknown-field errors.",
          "type": "any"
        }
      }
    },
    "Segment": {
      "description": "Segment of the content.",
      "id": "Segment",
      "type": "object",
      "properties": {
        "text": {
          "description": "The text corresponding to the segment from the response.",
          "type": "string"
        },
        "partIndex": {
          "description": "The index of a Part object within its parent Content object.",
          "type": "integer",
          "format": "int32"
        },
        "startIndex": {
          "type": "integer",
          "format": "int32",
          "description": "Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero."
        },
        "endIndex": {
          "type": "integer",
          "format": "int32",
          "description": "End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero."
        }
      }
    },
    "SafetySetting": {
      "id": "SafetySetting",
      "type": "object",
      "properties": {
        "category": {
          "enumDeprecated": [
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            true,
            false
          ],
          "description": "Required. The category for this setting.",
          "type": "string",
          "enumDescriptions": [
            "Category is unspecified.",
            "**PaLM** - Negative or harmful comments targeting identity and/or protected attribute.",
            "**PaLM** - Content that is rude, disrespectful, or profane.",
            "**PaLM** - Describes scenarios depicting violence against an individual or group, or general descriptions of gore.",
            "**PaLM** - Contains references to sexual acts or other lewd content.",
            "**PaLM** - Promotes unchecked medical advice.",
            "**PaLM** - Dangerous content that promotes, facilitates, or encourages harmful acts.",
            "**Gemini** - Harassment content.",
            "**Gemini** - Hate speech and content.",
            "**Gemini** - Sexually explicit content.",
            "**Gemini** - Dangerous content.",
            "**Gemini** - Content that may be used to harm civic integrity. DEPRECATED: use enable_enhanced_civic_answers instead.",
            "**Gemini** - Prompts attempting to bypass or subvert the model's safety guidelines (jailbreak attempts)."
          ],
          "enum": [
            "HARM_CATEGORY_UNSPECIFIED",
            "HARM_CATEGORY_DEROGATORY",
            "HARM_CATEGORY_TOXICITY",
            "HARM_CATEGORY_VIOLENCE",
            "HARM_CATEGORY_SEXUAL",
            "HARM_CATEGORY_MEDICAL",
            "HARM_CATEGORY_DANGEROUS",
            "HARM_CATEGORY_HARASSMENT",
            "HARM_CATEGORY_HATE_SPEECH",
            "HARM_CATEGORY_SEXUALLY_EXPLICIT",
            "HARM_CATEGORY_DANGEROUS_CONTENT",
            "HARM_CATEGORY_CIVIC_INTEGRITY",
            "HARM_CATEGORY_JAILBREAK"
          ]
        },
        "threshold": {
          "description": "Required. Controls the probability threshold at which harm is blocked.",
          "enum": [
            "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
            "BLOCK_LOW_AND_ABOVE",
            "BLOCK_MEDIUM_AND_ABOVE",
            "BLOCK_ONLY_HIGH",
            "BLOCK_NONE",
            "OFF"
          ],
          "type": "string",
          "enumDescriptions": [
            "Threshold is unspecified.",
            "Content with NEGLIGIBLE will be allowed.",
            "Content with NEGLIGIBLE and LOW will be allowed.",
            "Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed.",
            "All content will be allowed.",
            "Turn off the safety filter."
          ]
        }
      },
      "description": "Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked."
    },
    "EmbeddingUsageMetadata": {
      "id": "EmbeddingUsageMetadata",
      "type": "object",
      "properties": {
        "promptTokenCount": {
          "description": "Output only. Number of tokens in the prompt.",
          "readOnly": true,
          "type": "integer",
          "format": "int32"
        },
        "promptTokenDetails": {
          "readOnly": true,
          "type": "array",
          "items": {
            "$ref": "ModalityTokenCount"
          },
          "description": "Output only. List of modalities that were processed in the request input."
        }
      },
      "description": "Metadata on the usage of the embedding request."
    },
    "GenerateContentBatch": {
      "id": "GenerateContentBatch",
      "type": "object",
      "properties": {
        "name": {
          "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`.",
          "readOnly": true,
          "type": "string"
        },
        "displayName": {
          "description": "Required. The user-defined name of this batch.",
          "type": "string"
        },
        "inputConfig": {
          "description": "Required. Input configuration of the instances on which batch processing are performed.",
          "$ref": "InputConfig"
        },
        "model": {
          "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
          "type": "string"
        },
        "endTime": {
          "description": "Output only. The time at which the batch processing completed.",
          "readOnly": true,
          "type": "string",
          "format": "google-datetime"
        },
        "updateTime": {
          "description": "Output only. The time at which the batch was last updated.",
          "readOnly": true,
          "type": "string",
          "format": "google-datetime"
        },
        "output": {
          "readOnly": true,
          "description": "Output only. The output of the batch request.",
          "$ref": "GenerateContentBatchOutput"
        },
        "createTime": {
          "description": "Output only. The time at which the batch was created.",
          "readOnly": true,
          "type": "string",
          "format": "google-datetime"
        },
        "batchStats": {
          "description": "Output only. Stats about the batch.",
          "$ref": "BatchStats",
          "readOnly": true
        },
        "state": {
          "enum": [
            "BATCH_STATE_UNSPECIFIED",
            "BATCH_STATE_PENDING",
            "BATCH_STATE_RUNNING",
            "BATCH_STATE_SUCCEEDED",
            "BATCH_STATE_FAILED",
            "BATCH_STATE_CANCELLED",
            "BATCH_STATE_EXPIRED"
          ],
          "readOnly": true,
          "type": "string",
          "enumDescriptions": [
            "The batch state is unspecified.",
            "The service is preparing to run the batch.",
            "The batch is in progress.",
            "The batch completed successfully.",
            "The batch failed.",
            "The batch has been cancelled.",
            "The batch has expired."
          ],
          "description": "Output only. The state of the batch."
        },
        "priority": {
          "description": "Optional. The priority of the batch. Batches with a higher priority value will be processed before batches with a lower priority value. Negative values are allowed. Default is 0.",
          "type": "string",
          "format": "int64"
        }
      },
      "description": "A resource representing a batch of `GenerateContent` requests."
    },
    "UrlContext": {
      "id": "UrlContext",
      "type": "object",
      "properties": {},
      "description": "Tool to support URL context retrieval."
    },
    "Candidate": {
      "id": "Candidate",
      "type": "object",
      "properties": {
        "finishReason": {
          "enum": [
            "FINISH_REASON_UNSPECIFIED",
            "STOP",
            "MAX_TOKENS",
            "SAFETY",
            "RECITATION",
            "LANGUAGE",
            "OTHER",
            "BLOCKLIST",
            "PROHIBITED_CONTENT",
            "SPII",
            "MALFORMED_FUNCTION_CALL",
            "IMAGE_SAFETY",
            "IMAGE_PROHIBITED_CONTENT",
            "IMAGE_OTHER",
            "NO_IMAGE",
            "IMAGE_RECITATION",
            "UNEXPECTED_TOOL_CALL",
            "TOO_MANY_TOOL_CALLS",
            "MISSING_THOUGHT_SIGNATURE",
            "MALFORMED_RESPONSE",
            "ESCALATION"
          ],
          "readOnly": true,
          "type": "string",
          "enumDescriptions": [
            "Default value. This value is unused.",
            "Natural stop point of the model or provided stop sequence.",
            "The maximum number of tokens as specified in the request was reached.",
            "The response candidate content was flagged for safety reasons.",
            "The response candidate content was flagged for recitation reasons.",
            "The response candidate content was flagged for using an unsupported language.",
            "Unknown reason.",
            "Token generation stopped because the content contains forbidden terms.",
            "Token generation stopped for potentially containing prohibited content.",
            "Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).",
            "The function call generated by the model is invalid.",
            "Token generation stopped because generated images contain safety violations.",
            "Image generation stopped because generated images has other prohibited content.",
            "Image generation stopped because of other miscellaneous issue.",
            "The model was expected to generate an image, but none was generated.",
            "Image generation stopped due to recitation.",
            "Model generated a tool call but no tools were enabled in the request.",
            "Model called too many tools consecutively, thus the system exited execution.",
            "Request has at least one thought signature missing.",
            "Finished due to malformed response.",
            "Request was filtered by an escalation rule."
          ],
          "description": "Optional. Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating tokens."
        },
        "urlContextMetadata": {
          "description": "Output only. Metadata related to url context retrieval tool.",
          "$ref": "UrlContextMetadata",
          "readOnly": true
        },
        "groundingAttributions": {
          "description": "Output only. Attribution information for sources that contributed to a grounded answer. This field is populated for `GenerateAnswer` calls.",
          "items": {
            "$ref": "GroundingAttribution"
          },
          "readOnly": true,
          "type": "array"
        },
        "safetyRatings": {
          "type": "array",
          "items": {
            "$ref": "SafetyRating"
          },
          "description": "List of ratings for the safety of a response candidate. There is at most one rating per category."
        },
        "tokenCount": {
          "description": "Output only. Token count for this candidate.",
          "readOnly": true,
          "type": "integer",
          "format": "int32"
        },
        "logprobsResult": {
          "readOnly": true,
          "description": "Output only. Log-likelihood scores for the response tokens and top tokens",
          "$ref": "LogprobsResult"
        },
        "avgLogprobs": {
          "readOnly": true,
          "type": "number",
          "format": "double",
          "description": "Output only. Average log probability score of the candidate."
        },
        "index": {
          "description": "Output only. Index of the candidate in the list of response candidates.",
          "readOnly": true,
          "type": "integer",
          "format": "int32"
        },
        "content": {
          "readOnly": true,
          "description": "Output only. Generated content returned from the model.",
          "$ref": "Content"
        },
        "finishMessage": {
          "description": "Optional. Output only. Details the reason why the model stopped generating tokens. This is populated only when `finish_reason` is set.",
          "readOnly": true,
          "type": "string"
        },
        "citationMetadata": {
          "description": "Output only. Citation information for model-generated candidate. This field may be populated with recitation information for any text included in the `content`. These are passages that are \"recited\" from copyrighted material in the foundational LLM's training data.",
          "$ref": "CitationMetadata",
          "readOnly": true
        },
        "groundingMetadata": {
          "readOnly": true,
          "description": "Output only. Grounding metadata for the candidate. This field is populated for `GenerateContent` calls.",
          "$ref": "GroundingMetadata"
        }
      },
      "description": "A response candidate generated from the model."
    },
    "InlinedEmbedContentRequests": {
      "id": "InlinedEmbedContentRequests",
      "type": "object",
      "properties": {
        "requests": {
          "type": "array",
          "items": {
            "$ref": "InlinedEmbedContentRequest"
          },
          "description": "Required. The requests to be processed in the batch."
        }
      },
      "description": "The requests to be processed in the batch if provided as part of the batch creation request."
    },
    "GenerateContentResponse": {
      "description": "Response from the model supporting multiple candidate responses. Safety ratings and content filtering are reported for both prompt in `GenerateContentResponse.prompt_feedback` and for each candidate in `finish_reason` and in `safety_ratings`. The API: - Returns either all requested candidates or none of them - Returns no candidates at all only if there was something wrong with the prompt (check `prompt_feedback`) - Reports feedback on each candidate in `finish_reason` and `safety_ratings`.",
      "id": "GenerateContentResponse",
      "type": "object",
      "properties": {
        "modelStatus": {
          "description": "Output only. The current model status of this model.",
          "$ref": "ModelStatus",
          "readOnly": true
        },
        "candidates": {
          "description": "Candidate responses from the model.",
          "items": {
            "$ref": "Candidate"
          },
          "type": "array"
        },
        "promptFeedback": {
          "description": "Returns the prompt's feedback related to the content filters.",
          "$ref": "PromptFeedback"
        },
        "modelVersion": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. The model version used to generate the response."
        },
        "usageMetadata": {
          "description": "Output only. Metadata on the generation requests' token usage.",
          "$ref": "UsageMetadata",
          "readOnly": true
        },
        "responseId": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. response_id is used to identify each response."
        }
      }
    },
    "ReviewSnippet": {
      "description": "Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.",
      "id": "ReviewSnippet",
      "type": "object",
      "properties": {
        "reviewId": {
          "description": "The ID of the review snippet.",
          "type": "string"
        },
        "googleMapsUri": {
          "description": "A link that corresponds to the user review on Google Maps.",
          "type": "string"
        },
        "title": {
          "description": "Title of the review.",
          "type": "string"
        }
      }
    },
    "InlinedResponse": {
      "id": "InlinedResponse",
      "type": "object",
      "properties": {
        "error": {
          "description": "Output only. The error encountered while processing the request.",
          "$ref": "Status",
          "readOnly": true
        },
        "metadata": {
          "description": "Output only. The metadata associated with the request.",
          "readOnly": true,
          "type": "object",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          }
        },
        "response": {
          "readOnly": true,
          "description": "Output only. The response to the request.",
          "$ref": "GenerateContentResponse"
        }
      },
      "description": "The response to a single request in the batch."
    },
    "InlinedRequest": {
      "id": "InlinedRequest",
      "type": "object",
      "properties": {
        "request": {
          "description": "Required. The request to be processed in the batch.",
          "$ref": "GenerateContentRequest"
        },
        "metadata": {
          "description": "Optional. The metadata to be associated with the request.",
          "type": "object",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          }
        }
      },
      "description": "The request to be processed in the batch."
    },
    "EmbedContentBatchStats": {
      "id": "EmbedContentBatchStats",
      "type": "object",
      "properties": {
        "requestCount": {
          "description": "Output only. The number of requests in the batch.",
          "readOnly": true,
          "type": "string",
          "format": "int64"
        },
        "failedRequestCount": {
          "description": "Output only. The number of requests that failed to be processed.",
          "readOnly": true,
          "type": "string",
          "format": "int64"
        },
        "pendingRequestCount": {
          "readOnly": true,
          "type": "string",
          "format": "int64",
          "description": "Output only. The number of requests that are still pending processing."
        },
        "successfulRequestCount": {
          "description": "Output only. The number of requests that were successfully processed.",
          "readOnly": true,
          "type": "string",
          "format": "int64"
        }
      },
      "description": "Stats about the batch."
    },
    "AsyncBatchEmbedContentRequest": {
      "description": "Request for an `AsyncBatchEmbedContent` operation.",
      "id": "AsyncBatchEmbedContentRequest",
      "type": "object",
      "properties": {
        "batch": {
          "description": "Required. The batch to create.",
          "$ref": "EmbedContentBatch"
        }
      }
    },
    "InlinedEmbedContentResponse": {
      "description": "The response to a single request in the batch.",
      "id": "InlinedEmbedContentResponse",
      "type": "object",
      "properties": {
        "response": {
          "readOnly": true,
          "description": "Output only. The response to the request.",
          "$ref": "EmbedContentResponse"
        },
        "error": {
          "readOnly": true,
          "description": "Output only. The error encountered while processing the request.",
          "$ref": "Status"
        },
        "metadata": {
          "description": "Output only. The metadata associated with the request.",
          "readOnly": true,
          "type": "object",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          }
        }
      }
    },
    "PlaceAnswerSources": {
      "id": "PlaceAnswerSources",
      "type": "object",
      "properties": {
        "reviewSnippets": {
          "items": {
            "$ref": "ReviewSnippet"
          },
          "type": "array",
          "description": "Snippets of reviews that are used to generate answers about the features of a given place in Google Maps."
        }
      },
      "description": "Collection of sources that provide answers about the features of a given place in Google Maps. Each PlaceAnswerSources message corresponds to a specific place in Google Maps. The Google Maps tool used these sources in order to answer questions about features of the place (e.g: \"does Bar Foo have Wifi\" or \"is Foo Bar wheelchair accessible?\"). Currently we only support review snippets as sources."
    },
    "LatLng": {
      "id": "LatLng",
      "type": "object",
      "properties": {
        "latitude": {
          "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].",
          "type": "number",
          "format": "double"
        },
        "longitude": {
          "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].",
          "type": "number",
          "format": "double"
        }
      },
      "description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges."
    },
    "CodeExecutionResult": {
      "description": "Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used.",
      "id": "CodeExecutionResult",
      "type": "object",
      "properties": {
        "outcome": {
          "description": "Required. Outcome of the code execution.",
          "enum": [
            "OUTCOME_UNSPECIFIED",
            "OUTCOME_OK",
            "OUTCOME_FAILED",
            "OUTCOME_DEADLINE_EXCEEDED"
          ],
          "type": "string",
          "enumDescriptions": [
            "Unspecified status. This value should not be used.",
            "Code execution completed successfully. `output` contains the stdout, if any.",
            "Code execution failed. `output` contains the stderr and stdout, if any.",
            "Code execution ran for too long, and was cancelled. There may or may not be a partial `output` present."
          ]
        },
        "output": {
          "description": "Optional. Contains stdout when code execution is successful, stderr or other description otherwise.",
          "type": "string"
        },
        "id": {
          "description": "Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id.",
          "type": "string"
        }
      }
    },
    "Operation": {
      "id": "Operation",
      "type": "object",
      "properties": {
        "name": {
          "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.",
          "type": "string"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object. Contains field @type with type URL."
          },
          "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any."
        },
        "done": {
          "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.",
          "type": "boolean"
        },
        "response": {
          "type": "object",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object. Contains field @type with type URL."
          },
          "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`."
        },
        "error": {
          "description": "The error result of the operation in case of failure or cancellation.",
          "$ref": "Status"
        }
      },
      "description": "This resource represents a long-running operation that is the result of a network API call."
    },
    "ModelStatus": {
      "description": "The status of the underlying model. This is used to indicate the stage of the underlying model and the retirement time if applicable.",
      "id": "ModelStatus",
      "type": "object",
      "properties": {
        "message": {
          "description": "A message explaining the model status.",
          "type": "string"
        },
        "modelStage": {
          "enumDescriptions": [
            "Unspecified model stage.",
            "The underlying model is subject to lots of tunings.",
            "Models in this stage are for experimental purposes only.",
            "Models in this stage are more mature than experimental models.",
            "Models in this stage are considered stable and ready for production use.",
            "If the model is on this stage, it means that this model is on the path to deprecation in near future. Only existing customers can use this model.",
            "Models in this stage are deprecated. These models cannot be used.",
            "Models in this stage are retired. These models cannot be used."
          ],
          "type": "string",
          "enum": [
            "MODEL_STAGE_UNSPECIFIED",
            "UNSTABLE_EXPERIMENTAL",
            "EXPERIMENTAL",
            "PREVIEW",
            "STABLE",
            "LEGACY",
            "DEPRECATED",
            "RETIRED"
          ],
          "enumDeprecated": [
            false,
            true,
            false,
            false,
            false,
            false,
            true,
            false
          ],
          "description": "The stage of the underlying model."
        },
        "retirementTime": {
          "type": "string",
          "format": "google-datetime",
          "description": "The time at which the model will be retired."
        }
      }
    },
    "ToolResponse": {
      "description": "The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`.",
      "id": "ToolResponse",
      "type": "object",
      "properties": {
        "toolType": {
          "enumDescriptions": [
            "Unspecified tool type.",
            "Google search tool, maps to Tool.google_search.search_types.web_search.",
            "Image search tool, maps to Tool.google_search.search_types.image_search.",
            "URL context tool, maps to Tool.url_context.",
            "Google maps tool, maps to Tool.google_maps.",
            "File search tool, maps to Tool.file_search."
          ],
          "type": "string",
          "enum": [
            "TOOL_TYPE_UNSPECIFIED",
            "GOOGLE_SEARCH_WEB",
            "GOOGLE_SEARCH_IMAGE",
            "URL_CONTEXT",
            "GOOGLE_MAPS",
            "FILE_SEARCH"
          ],
          "description": "Required. The type of tool that was called, matching the `tool_type` in the corresponding `ToolCall`."
        },
        "id": {
          "description": "Optional. The identifier of the tool call this response is for.",
          "type": "string"
        },
        "response": {
          "description": "Optional. The tool response.",
          "type": "object",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          }
        }
      }
    },
    "BatchEmbedContentsRequest": {
      "description": "Batch request to get embeddings from the model for a list of prompts.",
      "id": "BatchEmbedContentsRequest",
      "type": "object",
      "properties": {
        "requests": {
          "items": {
            "$ref": "EmbedContentRequest"
          },
          "type": "array",
          "description": "Required. Embed requests for the batch. The model in each of these requests must match the model specified `BatchEmbedContentsRequest.model`."
        }
      }
    },
    "CancelOperationRequest": {
      "id": "CancelOperationRequest",
      "type": "object",
      "properties": {},
      "description": "The request message for Operations.CancelOperation."
    },
    "UsageMetadata": {
      "id": "UsageMetadata",
      "type": "object",
      "properties": {
        "promptTokensDetails": {
          "description": "Output only. List of modalities that were processed in the request input.",
          "readOnly": true,
          "type": "array",
          "items": {
            "$ref": "ModalityTokenCount"
          }
        },
        "totalTokenCount": {
          "description": "Total token count for the generation request (prompt + thoughts + response candidates).",
          "type": "integer",
          "format": "int32"
        },
        "cacheTokensDetails": {
          "items": {
            "$ref": "ModalityTokenCount"
          },
          "readOnly": true,
          "type": "array",
          "description": "Output only. List of modalities of the cached content in the request input."
        },
        "toolUsePromptTokensDetails": {
          "readOnly": true,
          "type": "array",
          "items": {
            "$ref": "ModalityTokenCount"
          },
          "description": "Output only. List of modalities that were processed for tool-use request inputs."
        },
        "serviceTier": {
          "description": "Output only. Service tier of the request.",
          "enum": [
            "unspecified",
            "standard",
            "flex",
            "priority"
          ],
          "enumDescriptions": [
            "Default service tier, which is standard.",
            "Standard service tier.",
            "Flex service tier.",
            "Priority service tier."
          ],
          "readOnly": true,
          "type": "string"
        },
        "candidatesTokenCount": {
          "description": "Total number of tokens across all the generated response candidates.",
          "type": "integer",
          "format": "int32"
        },
        "candidatesTokensDetails": {
          "description": "Output only. List of modalities that were returned in the response.",
          "items": {
            "$ref": "ModalityTokenCount"
          },
          "readOnly": true,
          "type": "array"
        },
        "toolUsePromptTokenCount": {
          "readOnly": true,
          "type": "integer",
          "format": "int32",
          "description": "Output only. Number of tokens present in tool-use prompt(s)."
        },
        "thoughtsTokenCount": {
          "description": "Output only. Number of tokens of thoughts for thinking models.",
          "readOnly": true,
          "type": "integer",
          "format": "int32"
        },
        "promptTokenCount": {
          "description": "Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.",
          "type": "integer",
          "format": "int32"
        }
      },
      "description": "Metadata on the generation request's token usage."
    },
    "CodeExecution": {
      "description": "Tool that executes code generated by the model, and automatically returns the result to the model. See also `ExecutableCode` and `CodeExecutionResult` which are only generated when using this tool.",
      "id": "CodeExecution",
      "type": "object",
      "properties": {}
    },
    "EmbedContentConfig": {
      "description": "Configurations for the EmbedContent request.",
      "id": "EmbedContentConfig",
      "type": "object",
      "properties": {
        "documentOcr": {
          "description": "Optional. Whether to enable OCR for document content.",
          "type": "boolean"
        },
        "title": {
          "description": "Optional. The title for the text.",
          "type": "string"
        },
        "taskType": {
          "description": "Optional. The task type of the embedding.",
          "enum": [
            "TASK_TYPE_UNSPECIFIED",
            "RETRIEVAL_QUERY",
            "RETRIEVAL_DOCUMENT",
            "SEMANTIC_SIMILARITY",
            "CLASSIFICATION",
            "CLUSTERING",
            "QUESTION_ANSWERING",
            "FACT_VERIFICATION",
            "CODE_RETRIEVAL_QUERY"
          ],
          "type": "string",
          "enumDescriptions": [
            "Unset value, which will default to one of the other enum values.",
            "Specifies the given text is a query in a search/retrieval setting.",
            "Specifies the given text is a document from the corpus being searched.",
            "Specifies the given text will be used for STS.",
            "Specifies that the given text will be classified.",
            "Specifies that the embeddings will be used for clustering.",
            "Specifies that the given text will be used for question answering.",
            "Specifies that the given text will be used for fact verification.",
            "Specifies that the given text will be used for code retrieval."
          ]
        },
        "outputDimensionality": {
          "type": "integer",
          "format": "int32",
          "description": "Optional. Reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end."
        },
        "audioTrackExtraction": {
          "description": "Optional. Whether to extract audio from video content.",
          "type": "boolean"
        },
        "autoTruncate": {
          "description": "Optional. Whether to silently truncate the input content if it's longer than the maximum sequence length.",
          "type": "boolean"
        }
      }
    },
    "Tool": {
      "description": "Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. Next ID: 16",
      "id": "Tool",
      "type": "object",
      "properties": {
        "googleSearch": {
          "description": "Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.",
          "$ref": "GoogleSearch"
        },
        "googleSearchRetrieval": {
          "description": "Optional. Retrieval tool that is powered by Google search.",
          "$ref": "GoogleSearchRetrieval"
        },
        "functionDeclarations": {
          "description": "Optional. A list of `FunctionDeclarations` available to the model that can be used for function calling. The model or system does not execute the function. Instead the defined function may be returned as a FunctionCall with arguments to the client side for execution. The model may decide to call a subset of these functions by populating FunctionCall in the response. The next conversation turn may contain a FunctionResponse with the Content.role \"function\" generation context for the next model turn.",
          "type": "array",
          "items": {
            "$ref": "FunctionDeclaration"
          }
        },
        "codeExecution": {
          "description": "Optional. Enables the model to execute code as part of generation.",
          "$ref": "CodeExecution"
        },
        "fileSearch": {
          "description": "Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora.",
          "$ref": "FileSearch"
        },
        "googleMaps": {
          "description": "Optional. Tool that allows grounding the model's response with geospatial context related to the user's query.",
          "$ref": "GoogleMaps"
        },
        "urlContext": {
          "description": "Optional. Tool to support URL context retrieval.",
          "$ref": "UrlContext"
        }
      }
    },
    "LogprobsResultCandidate": {
      "id": "LogprobsResultCandidate",
      "type": "object",
      "properties": {
        "token": {
          "description": "The candidate’s token string value.",
          "type": "string"
        },
        "tokenId": {
          "type": "integer",
          "format": "int32",
          "description": "The candidate’s token id value."
        },
        "logProbability": {
          "description": "The candidate's log probability.",
          "type": "number",
          "format": "float"
        }
      },
      "description": "Candidate for the logprobs token and score."
    },
    "ListModelsResponse": {
      "id": "ListModelsResponse",
      "type": "object",
      "properties": {
        "models": {
          "type": "array",
          "items": {
            "$ref": "Model"
          },
          "description": "The returned Models."
        },
        "nextPageToken": {
          "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages.",
          "type": "string"
        }
      },
      "description": "Response from `ListModel` containing a paginated list of Models."
    }
  },
  "description": "The Gemini API allows developers to build generative AI applications using Gemini models. Gemini is our most capable model, built from the ground up to be multimodal. It can generalize and seamlessly understand, operate across, and combine different types of information including language, images, audio, video, and code. You can use the Gemini API for use cases like reasoning across text and images, content generation, dialogue agents, summarization and classification systems, and more.",
  "ownerName": "Google",
  "canonicalName": "Generative Language",
  "version": "v1",
  "icons": {
    "x32": "http://www.google.com/images/icons/product/search-32.gif",
    "x16": "http://www.google.com/images/icons/product/search-16.gif"
  },
  "rootUrl": "https://generativelanguage.googleapis.com/",
  "discoveryVersion": "v1",
  "batchPath": "batch",
  "mtlsRootUrl": "https://generativelanguage.mtls.googleapis.com/",
  "id": "generativelanguage:v1",
  "kind": "discovery#restDescription",
  "resources": {
    "operations": {
      "methods": {
        "list": {
          "parameterOrder": [
            "name"
          ],
          "id": "generativelanguage.operations.list",
          "parameters": {
            "filter": {
              "description": "The standard list filter.",
              "location": "query",
              "type": "string"
            },
            "pageSize": {
              "description": "The standard list page size.",
              "location": "query",
              "type": "integer",
              "format": "int32"
            },
            "name": {
              "pattern": "^operations$",
              "location": "path",
              "type": "string",
              "required": true,
              "description": "The name of the operation's parent resource."
            },
            "pageToken": {
              "location": "query",
              "type": "string",
              "description": "The standard list page token."
            },
            "returnPartialSuccess": {
              "location": "query",
              "type": "boolean",
              "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation."
            }
          },
          "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.",
          "path": "v1/{+name}",
          "response": {
            "$ref": "ListOperationsResponse"
          },
          "httpMethod": "GET",
          "flatPath": "v1/operations"
        },
        "delete": {
          "path": "v1/{+name}",
          "response": {
            "$ref": "Empty"
          },
          "flatPath": "v1/operations/{operationsId}",
          "httpMethod": "DELETE",
          "id": "generativelanguage.operations.delete",
          "parameterOrder": [
            "name"
          ],
          "parameters": {
            "name": {
              "location": "path",
              "type": "string",
              "required": true,
              "pattern": "^operations/.*$",
              "description": "The name of the operation resource to be deleted."
            }
          },
          "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`."
        }
      }
    },
    "fileSearchStores": {
      "resources": {
        "upload": {
          "resources": {
            "operations": {
              "methods": {
                "get": {
                  "path": "v1/{+name}",
                  "response": {
                    "$ref": "Operation"
                  },
                  "httpMethod": "GET",
                  "flatPath": "v1/fileSearchStores/{fileSearchStoresId}/upload/operations/{operationsId}",
                  "parameterOrder": [
                    "name"
                  ],
                  "id": "generativelanguage.fileSearchStores.upload.operations.get",
                  "parameters": {
                    "name": {
                      "required": true,
                      "location": "path",
                      "type": "string",
                      "pattern": "^fileSearchStores/[^/]+/upload/operations/[^/]+$",
                      "description": "The name of the operation resource."
                    }
                  },
                  "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service."
                }
              }
            }
          }
        },
        "operations": {
          "methods": {
            "get": {
              "parameterOrder": [
                "name"
              ],
              "id": "generativelanguage.fileSearchStores.operations.get",
              "parameters": {
                "name": {
                  "description": "The name of the operation resource.",
                  "location": "path",
                  "type": "string",
                  "required": true,
                  "pattern": "^fileSearchStores/[^/]+/operations/[^/]+$"
                }
              },
              "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
              "path": "v1/{+name}",
              "response": {
                "$ref": "Operation"
              },
              "httpMethod": "GET",
              "flatPath": "v1/fileSearchStores/{fileSearchStoresId}/operations/{operationsId}"
            }
          }
        }
      }
    },
    "dynamic": {
      "methods": {
        "streamGenerateContent": {
          "parameters": {
            "model": {
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "required": true,
              "location": "path",
              "type": "string",
              "pattern": "^dynamic/[^/]+$"
            }
          },
          "request": {
            "$ref": "GenerateContentRequest"
          },
          "parameterOrder": [
            "model"
          ],
          "flatPath": "v1/dynamic/{dynamicId}:streamGenerateContent",
          "path": "v1/{+model}:streamGenerateContent",
          "response": {
            "$ref": "GenerateContentResponse"
          },
          "description": "Generates a [streamed response](https://ai.google.dev/gemini-api/docs/text-generation?lang=python#generate-a-text-stream) from the model given an input `GenerateContentRequest`.",
          "id": "generativelanguage.dynamic.streamGenerateContent",
          "httpMethod": "POST"
        },
        "generateContent": {
          "path": "v1/{+model}:generateContent",
          "response": {
            "$ref": "GenerateContentResponse"
          },
          "flatPath": "v1/dynamic/{dynamicId}:generateContent",
          "parameterOrder": [
            "model"
          ],
          "parameters": {
            "model": {
              "location": "path",
              "type": "string",
              "required": true,
              "pattern": "^dynamic/[^/]+$",
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`."
            }
          },
          "request": {
            "$ref": "GenerateContentRequest"
          },
          "httpMethod": "POST",
          "id": "generativelanguage.dynamic.generateContent",
          "description": "Generates a model response given an input `GenerateContentRequest`. Refer to the [text generation guide](https://ai.google.dev/gemini-api/docs/text-generation) for detailed usage information. Input capabilities differ between models, including tuned models. Refer to the [model guide](https://ai.google.dev/gemini-api/docs/models/gemini) and [tuning guide](https://ai.google.dev/gemini-api/docs/model-tuning) for details."
        }
      }
    },
    "tunedModels": {
      "methods": {
        "streamGenerateContent": {
          "path": "v1/{+model}:streamGenerateContent",
          "response": {
            "$ref": "GenerateContentResponse"
          },
          "flatPath": "v1/tunedModels/{tunedModelsId}:streamGenerateContent",
          "parameterOrder": [
            "model"
          ],
          "parameters": {
            "model": {
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "pattern": "^tunedModels/[^/]+$",
              "location": "path",
              "type": "string",
              "required": true
            }
          },
          "request": {
            "$ref": "GenerateContentRequest"
          },
          "httpMethod": "POST",
          "id": "generativelanguage.tunedModels.streamGenerateContent",
          "description": "Generates a [streamed response](https://ai.google.dev/gemini-api/docs/text-generation?lang=python#generate-a-text-stream) from the model given an input `GenerateContentRequest`."
        },
        "generateContent": {
          "parameterOrder": [
            "model"
          ],
          "parameters": {
            "model": {
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "required": true,
              "location": "path",
              "type": "string",
              "pattern": "^tunedModels/[^/]+$"
            }
          },
          "request": {
            "$ref": "GenerateContentRequest"
          },
          "path": "v1/{+model}:generateContent",
          "response": {
            "$ref": "GenerateContentResponse"
          },
          "flatPath": "v1/tunedModels/{tunedModelsId}:generateContent",
          "id": "generativelanguage.tunedModels.generateContent",
          "description": "Generates a model response given an input `GenerateContentRequest`. Refer to the [text generation guide](https://ai.google.dev/gemini-api/docs/text-generation) for detailed usage information. Input capabilities differ between models, including tuned models. Refer to the [model guide](https://ai.google.dev/gemini-api/docs/models/gemini) and [tuning guide](https://ai.google.dev/gemini-api/docs/model-tuning) for details.",
          "httpMethod": "POST"
        },
        "batchGenerateContent": {
          "httpMethod": "POST",
          "id": "generativelanguage.tunedModels.batchGenerateContent",
          "description": "Enqueues a batch of `GenerateContent` requests for batch processing.",
          "path": "v1/{+model}:batchGenerateContent",
          "response": {
            "$ref": "Operation"
          },
          "flatPath": "v1/tunedModels/{tunedModelsId}:batchGenerateContent",
          "parameterOrder": [
            "model"
          ],
          "parameters": {
            "model": {
              "pattern": "^tunedModels/[^/]+$",
              "location": "path",
              "type": "string",
              "required": true,
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`."
            }
          },
          "request": {
            "$ref": "BatchGenerateContentRequest"
          }
        },
        "asyncBatchEmbedContent": {
          "httpMethod": "POST",
          "description": "Enqueues a batch of `EmbedContent` requests for batch processing. We have a `BatchEmbedContents` handler in `GenerativeService`, but it was synchronized. So we name this one to be `Async` to avoid confusion.",
          "id": "generativelanguage.tunedModels.asyncBatchEmbedContent",
          "flatPath": "v1/tunedModels/{tunedModelsId}:asyncBatchEmbedContent",
          "path": "v1/{+model}:asyncBatchEmbedContent",
          "response": {
            "$ref": "Operation"
          },
          "parameters": {
            "model": {
              "location": "path",
              "type": "string",
              "required": true,
              "pattern": "^tunedModels/[^/]+$",
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`."
            }
          },
          "request": {
            "$ref": "AsyncBatchEmbedContentRequest"
          },
          "parameterOrder": [
            "model"
          ]
        }
      },
      "resources": {
        "operations": {
          "methods": {
            "get": {
              "httpMethod": "GET",
              "flatPath": "v1/tunedModels/{tunedModelsId}/operations/{operationsId}",
              "path": "v1/{+name}",
              "response": {
                "$ref": "Operation"
              },
              "parameters": {
                "name": {
                  "location": "path",
                  "type": "string",
                  "required": true,
                  "pattern": "^tunedModels/[^/]+/operations/[^/]+$",
                  "description": "The name of the operation resource."
                }
              },
              "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
              "parameterOrder": [
                "name"
              ],
              "id": "generativelanguage.tunedModels.operations.get"
            },
            "cancel": {
              "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.",
              "id": "generativelanguage.tunedModels.operations.cancel",
              "httpMethod": "POST",
              "parameters": {
                "name": {
                  "description": "The name of the operation resource to be cancelled.",
                  "pattern": "^tunedModels/[^/]+/operations/[^/]+$",
                  "required": true,
                  "location": "path",
                  "type": "string"
                }
              },
              "request": {
                "$ref": "CancelOperationRequest"
              },
              "parameterOrder": [
                "name"
              ],
              "flatPath": "v1/tunedModels/{tunedModelsId}/operations/{operationsId}:cancel",
              "path": "v1/{+name}:cancel",
              "response": {
                "$ref": "Empty"
              }
            },
            "list": {
              "flatPath": "v1/tunedModels/{tunedModelsId}/operations",
              "httpMethod": "GET",
              "path": "v1/{+name}/operations",
              "response": {
                "$ref": "ListOperationsResponse"
              },
              "parameters": {
                "name": {
                  "description": "The name of the operation's parent resource.",
                  "pattern": "^tunedModels/[^/]+$",
                  "required": true,
                  "location": "path",
                  "type": "string"
                },
                "pageToken": {
                  "description": "The standard list page token.",
                  "location": "query",
                  "type": "string"
                },
                "returnPartialSuccess": {
                  "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.",
                  "location": "query",
                  "type": "boolean"
                },
                "pageSize": {
                  "description": "The standard list page size.",
                  "location": "query",
                  "type": "integer",
                  "format": "int32"
                },
                "filter": {
                  "location": "query",
                  "type": "string",
                  "description": "The standard list filter."
                }
              },
              "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.",
              "id": "generativelanguage.tunedModels.operations.list",
              "parameterOrder": [
                "name"
              ]
            }
          }
        }
      }
    },
    "generatedFiles": {
      "resources": {
        "operations": {
          "methods": {
            "get": {
              "path": "v1/{+name}",
              "response": {
                "$ref": "Operation"
              },
              "flatPath": "v1/generatedFiles/{generatedFilesId}/operations/{operationsId}",
              "httpMethod": "GET",
              "id": "generativelanguage.generatedFiles.operations.get",
              "parameterOrder": [
                "name"
              ],
              "parameters": {
                "name": {
                  "pattern": "^generatedFiles/[^/]+/operations/[^/]+$",
                  "location": "path",
                  "type": "string",
                  "required": true,
                  "description": "The name of the operation resource."
                }
              },
              "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service."
            }
          }
        }
      }
    },
    "corpora": {
      "resources": {
        "operations": {
          "methods": {
            "get": {
              "id": "generativelanguage.corpora.operations.get",
              "parameterOrder": [
                "name"
              ],
              "parameters": {
                "name": {
                  "description": "The name of the operation resource.",
                  "location": "path",
                  "type": "string",
                  "required": true,
                  "pattern": "^corpora/[^/]+/operations/[^/]+$"
                }
              },
              "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
              "path": "v1/{+name}",
              "response": {
                "$ref": "Operation"
              },
              "flatPath": "v1/corpora/{corporaId}/operations/{operationsId}",
              "httpMethod": "GET"
            }
          }
        }
      }
    },
    "batches": {
      "methods": {
        "updateGenerateContentBatch": {
          "httpMethod": "PATCH",
          "id": "generativelanguage.batches.updateGenerateContentBatch",
          "description": "Updates a batch of GenerateContent requests for batch processing.",
          "path": "v1/{+name}:updateGenerateContentBatch",
          "response": {
            "$ref": "GenerateContentBatch"
          },
          "flatPath": "v1/batches/{batchesId}:updateGenerateContentBatch",
          "parameterOrder": [
            "name"
          ],
          "parameters": {
            "name": {
              "required": true,
              "location": "path",
              "type": "string",
              "pattern": "^batches/[^/]+$",
              "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`."
            },
            "updateMask": {
              "location": "query",
              "type": "string",
              "format": "google-fieldmask",
              "description": "Optional. The list of fields to update."
            }
          },
          "request": {
            "$ref": "GenerateContentBatch"
          }
        },
        "updateEmbedContentBatch": {
          "path": "v1/{+name}:updateEmbedContentBatch",
          "response": {
            "$ref": "EmbedContentBatch"
          },
          "flatPath": "v1/batches/{batchesId}:updateEmbedContentBatch",
          "parameterOrder": [
            "name"
          ],
          "parameters": {
            "name": {
              "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`.",
              "pattern": "^batches/[^/]+$",
              "required": true,
              "location": "path",
              "type": "string"
            },
            "updateMask": {
              "description": "Optional. The list of fields to update.",
              "location": "query",
              "type": "string",
              "format": "google-fieldmask"
            }
          },
          "request": {
            "$ref": "EmbedContentBatch"
          },
          "httpMethod": "PATCH",
          "id": "generativelanguage.batches.updateEmbedContentBatch",
          "description": "Updates a batch of EmbedContent requests for batch processing."
        },
        "get": {
          "id": "generativelanguage.batches.get",
          "parameterOrder": [
            "name"
          ],
          "parameters": {
            "name": {
              "pattern": "^batches/[^/]+$",
              "location": "path",
              "type": "string",
              "required": true,
              "description": "The name of the operation resource."
            }
          },
          "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
          "path": "v1/{+name}",
          "response": {
            "$ref": "Operation"
          },
          "flatPath": "v1/batches/{batchesId}",
          "httpMethod": "GET"
        },
        "delete": {
          "id": "generativelanguage.batches.delete",
          "parameterOrder": [
            "name"
          ],
          "parameters": {
            "name": {
              "description": "The name of the operation resource to be deleted.",
              "pattern": "^batches/[^/]+$",
              "location": "path",
              "type": "string",
              "required": true
            }
          },
          "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.",
          "path": "v1/{+name}",
          "response": {
            "$ref": "Empty"
          },
          "flatPath": "v1/batches/{batchesId}",
          "httpMethod": "DELETE"
        },
        "cancel": {
          "path": "v1/{+name}:cancel",
          "response": {
            "$ref": "Empty"
          },
          "httpMethod": "POST",
          "flatPath": "v1/batches/{batchesId}:cancel",
          "parameterOrder": [
            "name"
          ],
          "id": "generativelanguage.batches.cancel",
          "parameters": {
            "name": {
              "description": "The name of the operation resource to be cancelled.",
              "required": true,
              "location": "path",
              "type": "string",
              "pattern": "^batches/[^/]+$"
            }
          },
          "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`."
        },
        "list": {
          "flatPath": "v1/batches",
          "httpMethod": "GET",
          "path": "v1/{+name}",
          "response": {
            "$ref": "ListOperationsResponse"
          },
          "parameters": {
            "filter": {
              "description": "The standard list filter.",
              "location": "query",
              "type": "string"
            },
            "pageSize": {
              "description": "The standard list page size.",
              "location": "query",
              "type": "integer",
              "format": "int32"
            },
            "name": {
              "location": "path",
              "type": "string",
              "required": true,
              "pattern": "^batches$",
              "description": "The name of the operation's parent resource."
            },
            "pageToken": {
              "location": "query",
              "type": "string",
              "description": "The standard list page token."
            },
            "returnPartialSuccess": {
              "location": "query",
              "type": "boolean",
              "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation."
            }
          },
          "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.",
          "id": "generativelanguage.batches.list",
          "parameterOrder": [
            "name"
          ]
        }
      }
    },
    "models": {
      "methods": {
        "generateContent": {
          "parameters": {
            "model": {
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "pattern": "^models/[^/]+$",
              "location": "path",
              "type": "string",
              "required": true
            }
          },
          "request": {
            "$ref": "GenerateContentRequest"
          },
          "parameterOrder": [
            "model"
          ],
          "flatPath": "v1/models/{modelsId}:generateContent",
          "path": "v1/{+model}:generateContent",
          "response": {
            "$ref": "GenerateContentResponse"
          },
          "description": "Generates a model response given an input `GenerateContentRequest`. Refer to the [text generation guide](https://ai.google.dev/gemini-api/docs/text-generation) for detailed usage information. Input capabilities differ between models, including tuned models. Refer to the [model guide](https://ai.google.dev/gemini-api/docs/models/gemini) and [tuning guide](https://ai.google.dev/gemini-api/docs/model-tuning) for details.",
          "id": "generativelanguage.models.generateContent",
          "httpMethod": "POST"
        },
        "list": {
          "id": "generativelanguage.models.list",
          "parameterOrder": [],
          "parameters": {
            "pageSize": {
              "location": "query",
              "type": "integer",
              "format": "int32",
              "description": "The maximum number of `Models` to return (per page). If unspecified, 50 models will be returned per page. This method returns at most 1000 models per page, even if you pass a larger page_size."
            },
            "pageToken": {
              "location": "query",
              "type": "string",
              "description": "A page token, received from a previous `ListModels` call. Provide the `page_token` returned by one request as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListModels` must match the call that provided the page token."
            }
          },
          "description": "Lists the [`Model`s](https://ai.google.dev/gemini-api/docs/models/gemini) available through the Gemini API.",
          "path": "v1/models",
          "response": {
            "$ref": "ListModelsResponse"
          },
          "flatPath": "v1/models",
          "httpMethod": "GET"
        },
        "embedContent": {
          "id": "generativelanguage.models.embedContent",
          "description": "Generates a text embedding vector from the input `Content` using the specified [Gemini Embedding model](https://ai.google.dev/gemini-api/docs/models/gemini#text-embedding).",
          "httpMethod": "POST",
          "parameterOrder": [
            "model"
          ],
          "parameters": {
            "model": {
              "pattern": "^models/[^/]+$",
              "required": true,
              "location": "path",
              "type": "string",
              "description": "Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`"
            }
          },
          "request": {
            "$ref": "EmbedContentRequest"
          },
          "path": "v1/{+model}:embedContent",
          "response": {
            "$ref": "EmbedContentResponse"
          },
          "flatPath": "v1/models/{modelsId}:embedContent"
        },
        "batchEmbedContents": {
          "description": "Generates multiple embedding vectors from the input `Content` which consists of a batch of strings represented as `EmbedContentRequest` objects.",
          "id": "generativelanguage.models.batchEmbedContents",
          "httpMethod": "POST",
          "parameters": {
            "model": {
              "description": "Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`",
              "pattern": "^models/[^/]+$",
              "location": "path",
              "type": "string",
              "required": true
            }
          },
          "request": {
            "$ref": "BatchEmbedContentsRequest"
          },
          "parameterOrder": [
            "model"
          ],
          "flatPath": "v1/models/{modelsId}:batchEmbedContents",
          "path": "v1/{+model}:batchEmbedContents",
          "response": {
            "$ref": "BatchEmbedContentsResponse"
          }
        },
        "countTokens": {
          "parameterOrder": [
            "model"
          ],
          "parameters": {
            "model": {
              "location": "path",
              "type": "string",
              "required": true,
              "pattern": "^models/[^/]+$",
              "description": "Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`"
            }
          },
          "request": {
            "$ref": "CountTokensRequest"
          },
          "path": "v1/{+model}:countTokens",
          "response": {
            "$ref": "CountTokensResponse"
          },
          "flatPath": "v1/models/{modelsId}:countTokens",
          "id": "generativelanguage.models.countTokens",
          "description": "Runs a model's tokenizer on input `Content` and returns the token count. Refer to the [tokens guide](https://ai.google.dev/gemini-api/docs/tokens) to learn more about tokens.",
          "httpMethod": "POST"
        },
        "asyncBatchEmbedContent": {
          "httpMethod": "POST",
          "description": "Enqueues a batch of `EmbedContent` requests for batch processing. We have a `BatchEmbedContents` handler in `GenerativeService`, but it was synchronized. So we name this one to be `Async` to avoid confusion.",
          "id": "generativelanguage.models.asyncBatchEmbedContent",
          "flatPath": "v1/models/{modelsId}:asyncBatchEmbedContent",
          "path": "v1/{+model}:asyncBatchEmbedContent",
          "response": {
            "$ref": "Operation"
          },
          "parameters": {
            "model": {
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "pattern": "^models/[^/]+$",
              "location": "path",
              "type": "string",
              "required": true
            }
          },
          "request": {
            "$ref": "AsyncBatchEmbedContentRequest"
          },
          "parameterOrder": [
            "model"
          ]
        },
        "get": {
          "parameters": {
            "name": {
              "description": "Required. The resource name of the model. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`",
              "pattern": "^models/[^/]+$",
              "location": "path",
              "type": "string",
              "required": true
            }
          },
          "description": "Gets information about a specific `Model` such as its version number, token limits, [parameters](https://ai.google.dev/gemini-api/docs/models/generative-models#model-parameters) and other metadata. Refer to the [Gemini models guide](https://ai.google.dev/gemini-api/docs/models/gemini) for detailed model information.",
          "id": "generativelanguage.models.get",
          "parameterOrder": [
            "name"
          ],
          "flatPath": "v1/models/{modelsId}",
          "httpMethod": "GET",
          "path": "v1/{+name}",
          "response": {
            "$ref": "Model"
          }
        },
        "streamGenerateContent": {
          "httpMethod": "POST",
          "id": "generativelanguage.models.streamGenerateContent",
          "description": "Generates a [streamed response](https://ai.google.dev/gemini-api/docs/text-generation?lang=python#generate-a-text-stream) from the model given an input `GenerateContentRequest`.",
          "path": "v1/{+model}:streamGenerateContent",
          "response": {
            "$ref": "GenerateContentResponse"
          },
          "flatPath": "v1/models/{modelsId}:streamGenerateContent",
          "parameterOrder": [
            "model"
          ],
          "parameters": {
            "model": {
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "required": true,
              "location": "path",
              "type": "string",
              "pattern": "^models/[^/]+$"
            }
          },
          "request": {
            "$ref": "GenerateContentRequest"
          }
        },
        "batchGenerateContent": {
          "path": "v1/{+model}:batchGenerateContent",
          "response": {
            "$ref": "Operation"
          },
          "flatPath": "v1/models/{modelsId}:batchGenerateContent",
          "parameterOrder": [
            "model"
          ],
          "parameters": {
            "model": {
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "pattern": "^models/[^/]+$",
              "location": "path",
              "type": "string",
              "required": true
            }
          },
          "request": {
            "$ref": "BatchGenerateContentRequest"
          },
          "httpMethod": "POST",
          "id": "generativelanguage.models.batchGenerateContent",
          "description": "Enqueues a batch of `GenerateContent` requests for batch processing."
        }
      },
      "resources": {
        "operations": {
          "methods": {
            "list": {
              "parameters": {
                "filter": {
                  "location": "query",
                  "type": "string",
                  "description": "The standard list filter."
                },
                "pageSize": {
                  "location": "query",
                  "type": "integer",
                  "format": "int32",
                  "description": "The standard list page size."
                },
                "name": {
                  "description": "The name of the operation's parent resource.",
                  "required": true,
                  "location": "path",
                  "type": "string",
                  "pattern": "^models/[^/]+$"
                },
                "pageToken": {
                  "description": "The standard list page token.",
                  "location": "query",
                  "type": "string"
                },
                "returnPartialSuccess": {
                  "location": "query",
                  "type": "boolean",
                  "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `\"projects/example/locations/-\"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation."
                }
              },
              "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.",
              "id": "generativelanguage.models.operations.list",
              "parameterOrder": [
                "name"
              ],
              "flatPath": "v1/models/{modelsId}/operations",
              "httpMethod": "GET",
              "path": "v1/{+name}/operations",
              "response": {
                "$ref": "ListOperationsResponse"
              }
            },
            "get": {
              "parameters": {
                "name": {
                  "description": "The name of the operation resource.",
                  "required": true,
                  "location": "path",
                  "type": "string",
                  "pattern": "^models/[^/]+/operations/[^/]+$"
                }
              },
              "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
              "parameterOrder": [
                "name"
              ],
              "id": "generativelanguage.models.operations.get",
              "httpMethod": "GET",
              "flatPath": "v1/models/{modelsId}/operations/{operationsId}",
              "path": "v1/{+name}",
              "response": {
                "$ref": "Operation"
              }
            }
          }
        }
      }
    }
  },
  "protocol": "rest",
  "ownerDomain": "google.com",
  "fullyEncodeReservedExpansion": true,
  "parameters": {
    "fields": {
      "type": "string",
      "location": "query",
      "description": "Selector specifying which fields to include in a partial response."
    },
    "quotaUser": {
      "type": "string",
      "location": "query",
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters."
    },
    "upload_protocol": {
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "type": "string",
      "location": "query"
    },
    "prettyPrint": {
      "type": "boolean",
      "location": "query",
      "default": "true",
      "description": "Returns response with indentations and line breaks."
    },
    "$.xgafv": {
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "type": "string",
      "location": "query",
      "enum": [
        "1",
        "2"
      ],
      "description": "V1 error format."
    },
    "key": {
      "type": "string",
      "location": "query",
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token."
    },
    "oauth_token": {
      "description": "OAuth 2.0 token for the current user.",
      "type": "string",
      "location": "query"
    },
    "alt": {
      "description": "Data format for response.",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "type": "string",
      "location": "query",
      "default": "json",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ]
    },
    "callback": {
      "type": "string",
      "location": "query",
      "description": "JSONP"
    },
    "uploadType": {
      "type": "string",
      "location": "query",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")."
    },
    "access_token": {
      "type": "string",
      "location": "query",
      "description": "OAuth access token."
    }
  },
  "documentationLink": "https://developers.generativeai.google/api",
  "baseUrl": "https://generativelanguage.googleapis.com/",
  "version_module": true,
  "revision": "20260720",
  "name": "generativelanguage",
  "title": "Gemini API"
}
