{
  "canonicalName": "Generative Language",
  "schemas": {
    "ThinkingConfig": {
      "type": "object",
      "id": "ThinkingConfig",
      "description": "Config for thinking features.",
      "properties": {
        "includeThoughts": {
          "description": "Indicates whether to include thoughts in the response. If true, thoughts are returned only when available.",
          "type": "boolean"
        },
        "thinkingLevel": {
          "description": "Optional. Controls the maximum depth of the model's internal reasoning process before it produces a response. If not specified, the default is HIGH. Recommended for Gemini 3 or later models. Use with earlier models results in an error.",
          "enum": [
            "THINKING_LEVEL_UNSPECIFIED",
            "MINIMAL",
            "LOW",
            "MEDIUM",
            "HIGH"
          ],
          "type": "string",
          "enumDescriptions": [
            "Default value.",
            "Little to no thinking.",
            "Low thinking level.",
            "Medium thinking level.",
            "High thinking level."
          ]
        },
        "thinkingBudget": {
          "type": "integer",
          "description": "The number of thoughts tokens that the model should generate.",
          "format": "int32"
        }
      }
    },
    "Model": {
      "description": "Information about a Generative Language Model.",
      "properties": {
        "temperature": {
          "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.",
          "format": "float",
          "type": "number"
        },
        "supportedGenerationMethods": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The model's supported generation methods. The corresponding API method names are defined as Pascal case strings, such as `generateMessage` and `generateContent`."
        },
        "maxTemperature": {
          "type": "number",
          "description": "The maximum temperature this model can use.",
          "format": "float"
        },
        "outputTokenLimit": {
          "description": "Maximum number of output tokens available for this model.",
          "format": "int32",
          "type": "integer"
        },
        "topK": {
          "format": "int32",
          "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"
        },
        "version": {
          "type": "string",
          "description": "Required. The version number of the model. This represents the major version (`1.0` or `1.5`)"
        },
        "name": {
          "type": "string",
          "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`"
        },
        "displayName": {
          "type": "string",
          "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."
        },
        "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.",
          "format": "float",
          "type": "number"
        },
        "thinking": {
          "type": "boolean",
          "description": "Whether the model supports thinking."
        },
        "baseModelId": {
          "type": "string",
          "description": "Required. The name of the base model, pass this to the generation request. Examples: * `gemini-1.5-flash`"
        },
        "inputTokenLimit": {
          "type": "integer",
          "description": "Maximum number of input tokens allowed for this model.",
          "format": "int32"
        },
        "description": {
          "description": "A short description of the model.",
          "type": "string"
        }
      },
      "id": "Model",
      "type": "object"
    },
    "DynamicRetrievalConfig": {
      "id": "DynamicRetrievalConfig",
      "description": "Describes the options to customize dynamic retrieval.",
      "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": {
          "format": "float",
          "description": "The threshold to be used in dynamic retrieval. If not set, a system default value is used.",
          "type": "number"
        }
      },
      "type": "object"
    },
    "TopCandidates": {
      "id": "TopCandidates",
      "description": "Candidates with top log probabilities at each decoding step.",
      "properties": {
        "candidates": {
          "type": "array",
          "items": {
            "$ref": "LogprobsResultCandidate"
          },
          "description": "Sorted by log probability in descending order."
        }
      },
      "type": "object"
    },
    "UrlMetadata": {
      "type": "object",
      "description": "Context of the a single url retrieval.",
      "properties": {
        "retrievedUrl": {
          "type": "string",
          "description": "Retrieved url by the tool."
        },
        "urlRetrievalStatus": {
          "enum": [
            "URL_RETRIEVAL_STATUS_UNSPECIFIED",
            "URL_RETRIEVAL_STATUS_SUCCESS",
            "URL_RETRIEVAL_STATUS_ERROR",
            "URL_RETRIEVAL_STATUS_PAYWALL",
            "URL_RETRIEVAL_STATUS_UNSAFE"
          ],
          "description": "Status of the url retrieval.",
          "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."
          ]
        }
      },
      "id": "UrlMetadata"
    },
    "LatLng": {
      "id": "LatLng",
      "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.",
      "properties": {
        "latitude": {
          "type": "number",
          "format": "double",
          "description": "The latitude in degrees. It must be in the range [-90.0, +90.0]."
        },
        "longitude": {
          "type": "number",
          "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].",
          "format": "double"
        }
      },
      "type": "object"
    },
    "PlaceAnswerSources": {
      "id": "PlaceAnswerSources",
      "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.",
      "properties": {
        "reviewSnippets": {
          "type": "array",
          "items": {
            "$ref": "ReviewSnippet"
          },
          "description": "Snippets of reviews that are used to generate answers about the features of a given place in Google Maps."
        }
      },
      "type": "object"
    },
    "InlinedEmbedContentRequests": {
      "description": "The requests to be processed in the batch if provided as part of the batch creation request.",
      "properties": {
        "requests": {
          "items": {
            "$ref": "InlinedEmbedContentRequest"
          },
          "type": "array",
          "description": "Required. The requests to be processed in the batch."
        }
      },
      "id": "InlinedEmbedContentRequests",
      "type": "object"
    },
    "Empty": {
      "type": "object",
      "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); }",
      "properties": {},
      "id": "Empty"
    },
    "GeneratedFile": {
      "id": "GeneratedFile",
      "description": "A file generated on behalf of a user.",
      "properties": {
        "error": {
          "description": "Error details if the GeneratedFile ends up in the STATE_FAILED state.",
          "$ref": "Status"
        },
        "name": {
          "type": "string",
          "description": "Identifier. The name of the generated file. Example: `generatedFiles/abc-123`"
        },
        "mimeType": {
          "type": "string",
          "description": "MIME type of the generatedFile."
        },
        "state": {
          "type": "string",
          "enumDescriptions": [
            "The default value. This value is used if the state is omitted.",
            "Being generated.",
            "Generated and is ready for download.",
            "Failed to generate the GeneratedFile."
          ],
          "enum": [
            "STATE_UNSPECIFIED",
            "GENERATING",
            "GENERATED",
            "FAILED"
          ],
          "readOnly": true,
          "description": "Output only. The state of the GeneratedFile."
        }
      },
      "type": "object"
    },
    "FunctionCallingConfig": {
      "type": "object",
      "id": "FunctionCallingConfig",
      "description": "Configuration for specifying function calling behavior.",
      "properties": {
        "allowedFunctionNames": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "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."
        },
        "mode": {
          "description": "Optional. Specifies the mode in which function calling should execute. If unspecified, the default value will be set to AUTO.",
          "enum": [
            "MODE_UNSPECIFIED",
            "AUTO",
            "ANY",
            "NONE",
            "VALIDATED"
          ],
          "type": "string",
          "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\"."
          ]
        }
      }
    },
    "ToolCall": {
      "type": "object",
      "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`.",
      "properties": {
        "args": {
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          },
          "type": "object",
          "description": "Optional. The tool call arguments. Example: {\"arg1\" : \"value1\", \"arg2\" : \"value2\" , ...}"
        },
        "id": {
          "description": "Optional. Unique identifier of the tool call. The server returns the tool response with the matching `id`.",
          "type": "string"
        },
        "toolType": {
          "type": "string",
          "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."
          ],
          "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."
        }
      },
      "id": "ToolCall"
    },
    "ListDocumentsResponse": {
      "id": "ListDocumentsResponse",
      "description": "Response from `ListDocuments` containing a paginated list of `Document`s. The `Document`s are sorted by ascending `document.create_time`.",
      "properties": {
        "documents": {
          "type": "array",
          "items": {
            "$ref": "Document"
          },
          "description": "The returned `Document`s."
        },
        "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"
        }
      },
      "type": "object"
    },
    "ToolResponse": {
      "type": "object",
      "id": "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`.",
      "properties": {
        "id": {
          "description": "Optional. The identifier of the tool call this response is for.",
          "type": "string"
        },
        "toolType": {
          "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`.",
          "type": "string",
          "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."
          ]
        },
        "response": {
          "description": "Optional. The tool response.",
          "additionalProperties": {
            "description": "Properties of the object.",
            "type": "any"
          },
          "type": "object"
        }
      }
    },
    "GoogleSearchRetrieval": {
      "id": "GoogleSearchRetrieval",
      "description": "Tool to retrieve public web data for grounding, powered by Google.",
      "properties": {
        "dynamicRetrievalConfig": {
          "$ref": "DynamicRetrievalConfig",
          "description": "Specifies the dynamic retrieval configuration for the given source."
        }
      },
      "type": "object"
    },
    "GroundingChunk": {
      "type": "object",
      "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.",
      "properties": {
        "web": {
          "description": "Grounding chunk from the web.",
          "$ref": "Web"
        },
        "image": {
          "$ref": "Image",
          "description": "Optional. Grounding chunk from image search."
        },
        "retrievedContext": {
          "$ref": "RetrievedContext",
          "description": "Optional. Grounding chunk from context retrieved by the file search tool."
        },
        "maps": {
          "$ref": "Maps",
          "description": "Optional. Grounding chunk from Google Maps."
        }
      },
      "id": "GroundingChunk"
    },
    "BatchEmbedContentsResponse": {
      "description": "The response to a `BatchEmbedContentsRequest`.",
      "properties": {
        "embeddings": {
          "type": "array",
          "items": {
            "$ref": "ContentEmbedding"
          },
          "readOnly": true,
          "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.",
          "readOnly": true,
          "$ref": "EmbeddingUsageMetadata"
        }
      },
      "id": "BatchEmbedContentsResponse",
      "type": "object"
    },
    "CountTextTokensResponse": {
      "id": "CountTextTokensResponse",
      "description": "A response from `CountTextTokens`. It returns the model's `token_count` for the `prompt`.",
      "properties": {
        "tokenCount": {
          "description": "The number of tokens that the `model` tokenizes the `prompt` into. Always non-negative.",
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "UrlContextMetadata": {
      "id": "UrlContextMetadata",
      "description": "Metadata related to url context retrieval tool.",
      "properties": {
        "urlMetadata": {
          "items": {
            "$ref": "UrlMetadata"
          },
          "type": "array",
          "description": "List of url context."
        }
      },
      "type": "object"
    },
    "SearchTypes": {
      "id": "SearchTypes",
      "description": "Different types of search that can be enabled on the GoogleSearch tool.",
      "properties": {
        "webSearch": {
          "description": "Optional. Enables web search. Only text results are returned.",
          "$ref": "WebSearch"
        },
        "imageSearch": {
          "$ref": "ImageSearch",
          "description": "Optional. Enables image search. Image bytes are returned."
        }
      },
      "type": "object"
    },
    "TuningExample": {
      "type": "object",
      "description": "A single example for tuning.",
      "properties": {
        "textInput": {
          "description": "Optional. Text model input.",
          "type": "string"
        },
        "output": {
          "type": "string",
          "description": "Required. The expected model output."
        }
      },
      "id": "TuningExample"
    },
    "ListPermissionsResponse": {
      "type": "object",
      "id": "ListPermissionsResponse",
      "description": "Response from `ListPermissions` containing a paginated list of permissions.",
      "properties": {
        "permissions": {
          "description": "Returned permissions.",
          "type": "array",
          "items": {
            "$ref": "Permission"
          }
        },
        "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"
        }
      }
    },
    "Content": {
      "type": "object",
      "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.",
      "properties": {
        "parts": {
          "type": "array",
          "items": {
            "$ref": "Part"
          },
          "description": "Ordered `Parts` that constitute a single message. Parts may have different MIME types."
        },
        "role": {
          "type": "string",
          "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."
        }
      },
      "id": "Content"
    },
    "PromptFeedback": {
      "type": "object",
      "description": "A set of the feedback metadata the prompt specified in `GenerateContentRequest.content`.",
      "properties": {
        "blockReason": {
          "type": "string",
          "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."
          ],
          "description": "Optional. If set, the prompt was blocked and no candidates are returned. Rephrase the prompt.",
          "enum": [
            "BLOCK_REASON_UNSPECIFIED",
            "SAFETY",
            "OTHER",
            "BLOCKLIST",
            "PROHIBITED_CONTENT",
            "IMAGE_SAFETY"
          ]
        },
        "safetyRatings": {
          "description": "Ratings for safety of the prompt. There is at most one rating per category.",
          "type": "array",
          "items": {
            "$ref": "SafetyRating"
          }
        }
      },
      "id": "PromptFeedback"
    },
    "CountTokensRequest": {
      "type": "object",
      "id": "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`.",
      "properties": {
        "generateContentRequest": {
          "$ref": "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."
        },
        "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."
        }
      }
    },
    "Interval": {
      "id": "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.",
      "properties": {
        "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.",
          "format": "google-datetime",
          "type": "string"
        },
        "endTime": {
          "description": "Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.",
          "format": "google-datetime",
          "type": "string"
        }
      },
      "type": "object"
    },
    "TuningExamples": {
      "id": "TuningExamples",
      "description": "A set of tuning examples. Can be training or validation data.",
      "properties": {
        "examples": {
          "description": "The examples. Example input can be for text or discuss, but all examples in a set must be of the same type.",
          "items": {
            "$ref": "TuningExample"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "InputEmbedContentConfig": {
      "description": "Configures the input to the batch request.",
      "properties": {
        "fileName": {
          "description": "The name of the `File` containing the input requests.",
          "type": "string"
        },
        "requests": {
          "$ref": "InlinedEmbedContentRequests",
          "description": "The requests to be processed in the batch."
        }
      },
      "id": "InputEmbedContentConfig",
      "type": "object"
    },
    "GenerationConfig": {
      "type": "object",
      "id": "GenerationConfig",
      "description": "Configuration options for model generation and outputs. Not all parameters are configurable for every model.",
      "properties": {
        "_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.",
          "type": "any"
        },
        "presencePenalty": {
          "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.",
          "type": "number"
        },
        "maxOutputTokens": {
          "type": "integer",
          "format": "int32",
          "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."
        },
        "logprobs": {
          "type": "integer",
          "format": "int32",
          "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]."
        },
        "seed": {
          "type": "integer",
          "description": "Optional. Seed used in decoding. If not set, the request uses a randomly generated seed.",
          "format": "int32"
        },
        "temperature": {
          "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].",
          "format": "float",
          "type": "number"
        },
        "responseLogprobs": {
          "type": "boolean",
          "description": "Optional. If true, export the logprobs results in response."
        },
        "imageConfig": {
          "$ref": "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."
        },
        "candidateCount": {
          "type": "integer",
          "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)",
          "format": "int32"
        },
        "stopSequences": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "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."
        },
        "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."
        },
        "speechConfig": {
          "description": "Optional. The speech generation config.",
          "$ref": "SpeechConfig"
        },
        "frequencyPenalty": {
          "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.",
          "format": "float",
          "type": "number"
        },
        "enableEnhancedCivicAnswers": {
          "type": "boolean",
          "description": "Optional. Enables enhanced civic answers. It may not be available for all models."
        },
        "responseMimeType": {
          "type": "string",
          "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."
        },
        "responseModalities": {
          "type": "array",
          "items": {
            "type": "string",
            "enumDescriptions": [
              "Default value.",
              "Indicates the model should return text.",
              "Indicates the model should return images.",
              "Indicates the model should return audio."
            ],
            "enum": [
              "MODALITY_UNSPECIFIED",
              "TEXT",
              "IMAGE",
              "AUDIO"
            ]
          },
          "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."
        },
        "responseJsonSchema": {
          "type": "any",
          "description": "Optional. An internal detail. Use `responseJsonSchema` rather than this field."
        },
        "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"
        },
        "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.",
          "format": "float",
          "type": "number"
        },
        "mediaResolution": {
          "type": "string",
          "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)."
          ],
          "description": "Optional. If specified, the media resolution specified will be used.",
          "enum": [
            "MEDIA_RESOLUTION_UNSPECIFIED",
            "MEDIA_RESOLUTION_LOW",
            "MEDIA_RESOLUTION_MEDIUM",
            "MEDIA_RESOLUTION_HIGH"
          ]
        },
        "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"
        }
      }
    },
    "TextCompletion": {
      "type": "object",
      "description": "Output text returned from a model.",
      "properties": {
        "output": {
          "type": "string",
          "description": "Output only. The generated text returned from the model.",
          "readOnly": true
        },
        "citationMetadata": {
          "$ref": "CitationMetadata",
          "description": "Output only. Citation information for model-generated `output` in this `TextCompletion`. This field may be populated with attribution information for any text included in the `output`.",
          "readOnly": true
        },
        "safetyRatings": {
          "type": "array",
          "items": {
            "$ref": "SafetyRating"
          },
          "description": "Ratings for the safety of a response. There is at most one rating per category."
        }
      },
      "id": "TextCompletion"
    },
    "GroundingAttribution": {
      "id": "GroundingAttribution",
      "description": "Attribution for a source that contributed to an answer.",
      "properties": {
        "content": {
          "description": "Grounding source content that makes up this attribution.",
          "$ref": "Content"
        },
        "sourceId": {
          "readOnly": true,
          "description": "Output only. Identifier for the source contributing to this attribution.",
          "$ref": "AttributionSourceId"
        }
      },
      "type": "object"
    },
    "TransferOwnershipResponse": {
      "type": "object",
      "id": "TransferOwnershipResponse",
      "description": "Response from `TransferOwnership`.",
      "properties": {}
    },
    "Operation": {
      "type": "object",
      "description": "This resource represents a long-running operation that is the result of a network API call.",
      "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"
        },
        "response": {
          "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`.",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object. Contains field @type with type URL."
          },
          "type": "object"
        },
        "metadata": {
          "additionalProperties": {
            "description": "Properties of the object. Contains field @type with type URL.",
            "type": "any"
          },
          "type": "object",
          "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."
        },
        "error": {
          "$ref": "Status",
          "description": "The error result of the operation in case of failure or cancellation."
        },
        "done": {
          "type": "boolean",
          "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."
        }
      },
      "id": "Operation"
    },
    "Blob": {
      "type": "object",
      "description": "Raw media bytes. Text should not be sent as raw bytes, use the 'text' field.",
      "properties": {
        "mimeType": {
          "description": "The IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see [Supported file formats](https://ai.google.dev/gemini-api/docs/prompting_with_media#supported_file_formats).",
          "type": "string"
        },
        "data": {
          "type": "string",
          "format": "byte",
          "description": "Raw bytes for media formats."
        }
      },
      "id": "Blob"
    },
    "ListCachedContentsResponse": {
      "type": "object",
      "description": "Response with CachedContents list.",
      "properties": {
        "cachedContents": {
          "description": "List of cached contents.",
          "type": "array",
          "items": {
            "$ref": "CachedContent"
          }
        },
        "nextPageToken": {
          "type": "string",
          "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages."
        }
      },
      "id": "ListCachedContentsResponse"
    },
    "EmbedContentRequest": {
      "description": "Request containing the `Content` for the model to embed.",
      "properties": {
        "taskType": {
          "description": "Optional. Optional task type for which the embeddings will be used. Not supported on earlier models (`models/embedding-001`).",
          "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."
          ]
        },
        "title": {
          "type": "string",
          "description": "Optional. 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."
        },
        "outputDimensionality": {
          "description": "Optional. 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`).",
          "format": "int32",
          "type": "integer"
        },
        "model": {
          "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}`"
        },
        "content": {
          "description": "Required. The content to embed. Only the `parts.text` fields will be counted.",
          "$ref": "Content"
        }
      },
      "id": "EmbedContentRequest",
      "type": "object"
    },
    "TunedModelSource": {
      "type": "object",
      "description": "Tuned model as a source for training a new model.",
      "properties": {
        "tunedModel": {
          "description": "Immutable. The name of the `TunedModel` to use as the starting point for training the new model. Example: `tunedModels/my-tuned-model`",
          "type": "string"
        },
        "baseModel": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. The name of the base `Model` this `TunedModel` was tuned from. Example: `models/gemini-1.5-flash-001`"
        }
      },
      "id": "TunedModelSource"
    },
    "GoogleAiGenerativelanguageV1betaGroundingSupport": {
      "type": "object",
      "id": "GoogleAiGenerativelanguageV1betaGroundingSupport",
      "description": "Grounding support.",
      "properties": {
        "renderedParts": {
          "items": {
            "type": "integer",
            "format": "int32"
          },
          "type": "array",
          "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.",
          "readOnly": true
        },
        "segment": {
          "$ref": "GoogleAiGenerativelanguageV1betaSegment",
          "description": "Segment of the content this support belongs to."
        },
        "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"
        },
        "groundingChunkIndices": {
          "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).",
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int32"
          }
        }
      }
    },
    "LogprobsResult": {
      "type": "object",
      "description": "Logprobs Result",
      "properties": {
        "topCandidates": {
          "description": "Length = total number of decoding steps.",
          "type": "array",
          "items": {
            "$ref": "TopCandidates"
          }
        },
        "logProbabilitySum": {
          "type": "number",
          "description": "Sum of log probabilities for all tokens.",
          "format": "float"
        },
        "chosenCandidates": {
          "type": "array",
          "items": {
            "$ref": "LogprobsResultCandidate"
          },
          "description": "Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates."
        }
      },
      "id": "LogprobsResult"
    },
    "GenerateAnswerRequest": {
      "description": "Request to generate a grounded answer from the `Model`.",
      "properties": {
        "inlinePassages": {
          "description": "Passages provided inline with the request.",
          "$ref": "GroundingPassages"
        },
        "contents": {
          "description": "Required. The content of the current conversation with the `Model`. For single-turn queries, this is a single question to answer. For multi-turn queries, this is a repeated field that contains conversation history and the last `Content` in the list containing the question. Note: `GenerateAnswer` only supports queries in English.",
          "type": "array",
          "items": {
            "$ref": "Content"
          }
        },
        "safetySettings": {
          "description": "Optional. A list of unique `SafetySetting` instances for blocking unsafe content. This will be enforced on the `GenerateAnswerRequest.contents` and `GenerateAnswerResponse.candidate`. 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 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.",
          "type": "array",
          "items": {
            "$ref": "SafetySetting"
          }
        },
        "answerStyle": {
          "type": "string",
          "enumDescriptions": [
            "Unspecified answer style.",
            "Succinct but abstract style.",
            "Very brief and extractive style.",
            "Verbose style including extra details. The response may be formatted as a sentence, paragraph, multiple paragraphs, or bullet points, etc."
          ],
          "description": "Required. Style in which answers should be returned.",
          "enum": [
            "ANSWER_STYLE_UNSPECIFIED",
            "ABSTRACTIVE",
            "EXTRACTIVE",
            "VERBOSE"
          ]
        },
        "semanticRetriever": {
          "$ref": "SemanticRetrieverConfig",
          "description": "Content retrieved from resources created via the Semantic Retriever API."
        },
        "temperature": {
          "format": "float",
          "description": "Optional. Controls the randomness of the output. Values can range from [0.0,1.0], inclusive. A value closer to 1.0 will produce responses that are more varied and creative, while a value closer to 0.0 will typically result in more straightforward responses from the model. A low temperature (~0.2) is usually recommended for Attributed-Question-Answering use cases.",
          "type": "number"
        }
      },
      "id": "GenerateAnswerRequest",
      "type": "object"
    },
    "ExecutableCode": {
      "type": "object",
      "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.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Optional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`."
        },
        "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": {
          "type": "string",
          "description": "Required. The code to be executed."
        }
      },
      "id": "ExecutableCode"
    },
    "InlinedRequest": {
      "description": "The request to be processed in the batch.",
      "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": {
            "description": "Properties of the object.",
            "type": "any"
          }
        }
      },
      "id": "InlinedRequest",
      "type": "object"
    },
    "DownloadFileResponse": {
      "type": "object",
      "description": "Response for `DownloadFile`.",
      "properties": {},
      "id": "DownloadFileResponse"
    },
    "TunedModel": {
      "type": "object",
      "id": "TunedModel",
      "description": "A fine-tuned model created using ModelService.CreateTunedModel.",
      "properties": {
        "baseModel": {
          "type": "string",
          "description": "Immutable. The name of the `Model` to tune. Example: `models/gemini-1.5-flash-001`"
        },
        "description": {
          "description": "Optional. A short description of this model.",
          "type": "string"
        },
        "topP": {
          "description": "Optional. For Nucleus sampling. Nucleus sampling considers the smallest set of tokens whose probability sum is at least `top_p`. This value specifies default to be the one used by the base model while creating the model.",
          "format": "float",
          "type": "number"
        },
        "displayName": {
          "type": "string",
          "description": "Optional. The name to display for this model in user interfaces. The display name must be up to 40 characters including spaces."
        },
        "tunedModelSource": {
          "description": "Optional. TunedModel to use as the starting point for training the new model.",
          "$ref": "TunedModelSource"
        },
        "createTime": {
          "type": "string",
          "description": "Output only. The timestamp when this model was created.",
          "readOnly": true,
          "format": "google-datetime"
        },
        "name": {
          "readOnly": true,
          "description": "Output only. The tuned model name. A unique name will be generated on create. Example: `tunedModels/az2mb0bpw6i` If display_name is set on create, the id portion of the name will be set by concatenating the words of the display_name with hyphens and adding a random portion for uniqueness. Example: * display_name = `Sentence Translator` * name = `tunedModels/sentence-translator-u3b7m`",
          "type": "string"
        },
        "state": {
          "readOnly": true,
          "description": "Output only. The state of the tuned model.",
          "type": "string",
          "enumDescriptions": [
            "The default value. This value is unused.",
            "The model is being created.",
            "The model is ready to be used.",
            "The model failed to be created."
          ],
          "enum": [
            "STATE_UNSPECIFIED",
            "CREATING",
            "ACTIVE",
            "FAILED"
          ]
        },
        "topK": {
          "type": "integer",
          "format": "int32",
          "description": "Optional. 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. This value specifies default to be the one used by the base model while creating the model."
        },
        "tuningTask": {
          "description": "Required. The tuning task that creates the tuned model.",
          "$ref": "TuningTask"
        },
        "readerProjectNumbers": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "int64"
          },
          "description": "Optional. List of project numbers that have read access to the tuned model."
        },
        "temperature": {
          "format": "float",
          "description": "Optional. Controls the randomness of the output. Values can range over `[0.0,1.0]`, inclusive. A value closer to `1.0` 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 the one used by the base model while creating the model.",
          "type": "number"
        },
        "updateTime": {
          "type": "string",
          "description": "Output only. The timestamp when this model was updated.",
          "readOnly": true,
          "format": "google-datetime"
        }
      }
    },
    "StringList": {
      "type": "object",
      "id": "StringList",
      "description": "User provided string values assigned to a single metadata key.",
      "properties": {
        "values": {
          "description": "The string values of the metadata to store.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      }
    },
    "VideoMetadata": {
      "type": "object",
      "properties": {
        "startOffset": {
          "type": "string",
          "format": "google-duration",
          "description": "Optional. The start offset of the video."
        },
        "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.",
          "format": "google-duration",
          "type": "string"
        }
      },
      "id": "VideoMetadata",
      "deprecated": true,
      "description": "Deprecated: Use `GenerateContentRequest.processing_options` instead. Metadata describes the input video content."
    },
    "SearchEntryPoint": {
      "description": "Google search entry point.",
      "properties": {
        "renderedContent": {
          "description": "Optional. Web content snippet that can be embedded in a web page or an app webview.",
          "type": "string"
        },
        "sdkBlob": {
          "format": "byte",
          "description": "Optional. Base64 encoded JSON representing array of tuple.",
          "type": "string"
        }
      },
      "id": "SearchEntryPoint",
      "type": "object"
    },
    "FileSearchStore": {
      "id": "FileSearchStore",
      "description": "A `FileSearchStore` is a collection of `Document`s.",
      "properties": {
        "name": {
          "readOnly": true,
          "description": "Output only. Immutable. Identifier. The `FileSearchStore` resource name. It is an ID (name excluding the \"fileSearchStores/\" prefix) that can contain up to 40 characters that are lowercase alphanumeric or dashes (-). It is output only. The unique name will be derived from `display_name` along with a 12 character random suffix. Example: `fileSearchStores/my-awesome-file-search-store-123a456b789c` If `display_name` is not provided, the name will be randomly generated.",
          "type": "string"
        },
        "displayName": {
          "description": "Optional. The human-readable display name for the `FileSearchStore`. The display name must be no more than 512 characters in length, including spaces. Example: \"Docs on Semantic Retriever\"",
          "type": "string"
        },
        "updateTime": {
          "description": "Output only. The Timestamp of when the `FileSearchStore` was last updated.",
          "readOnly": true,
          "format": "google-datetime",
          "type": "string"
        },
        "sizeBytes": {
          "description": "Output only. The size of raw bytes ingested into the `FileSearchStore`. This is the total size of all the documents in the `FileSearchStore`.",
          "readOnly": true,
          "format": "int64",
          "type": "string"
        },
        "pendingDocumentsCount": {
          "description": "Output only. The number of documents in the `FileSearchStore` that are being processed.",
          "readOnly": true,
          "format": "int64",
          "type": "string"
        },
        "createTime": {
          "description": "Output only. The Timestamp of when the `FileSearchStore` was created.",
          "readOnly": true,
          "format": "google-datetime",
          "type": "string"
        },
        "activeDocumentsCount": {
          "readOnly": true,
          "format": "int64",
          "description": "Output only. The number of documents in the `FileSearchStore` that are active and ready for retrieval.",
          "type": "string"
        },
        "failedDocumentsCount": {
          "readOnly": true,
          "format": "int64",
          "description": "Output only. The number of documents in the `FileSearchStore` that have failed processing.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "GenerateAnswerResponse": {
      "type": "object",
      "description": "Response from the model for a grounded answer.",
      "properties": {
        "answerableProbability": {
          "type": "number",
          "readOnly": true,
          "format": "float",
          "description": "Output only. The model's estimate of the probability that its answer is correct and grounded in the input passages. A low `answerable_probability` indicates that the answer might not be grounded in the sources. When `answerable_probability` is low, you may want to: * Display a message to the effect of \"We couldn’t answer that question\" to the user. * Fall back to a general-purpose LLM that answers the question from world knowledge. The threshold and nature of such fallbacks will depend on individual use cases. `0.5` is a good starting threshold."
        },
        "answer": {
          "$ref": "Candidate",
          "description": "Candidate answer from the model. Note: The model *always* attempts to provide a grounded answer, even when the answer is unlikely to be answerable from the given passages. In that case, a low-quality or ungrounded answer may be provided, along with a low `answerable_probability`."
        },
        "inputFeedback": {
          "readOnly": true,
          "description": "Output only. Feedback related to the input data used to answer the question, as opposed to the model-generated response to the question. The input data can be one or more of the following: - Question specified by the last entry in `GenerateAnswerRequest.content` - Conversation history specified by the other entries in `GenerateAnswerRequest.content` - Grounding sources (`GenerateAnswerRequest.semantic_retriever` or `GenerateAnswerRequest.inline_passages`)",
          "$ref": "InputFeedback"
        }
      },
      "id": "GenerateAnswerResponse"
    },
    "BatchEmbedTextRequest": {
      "type": "object",
      "description": "Batch request to get a text embedding from the model.",
      "properties": {
        "texts": {
          "description": "Optional. The free-form input texts that the model will turn into an embedding. The current limit is 100 texts, over which an error will be thrown.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "requests": {
          "description": "Optional. Embed requests for the batch. Only one of `texts` or `requests` can be set.",
          "items": {
            "$ref": "EmbedTextRequest"
          },
          "type": "array"
        }
      },
      "id": "BatchEmbedTextRequest"
    },
    "MultiSpeakerVoiceConfig": {
      "type": "object",
      "description": "The configuration for the multi-speaker setup.",
      "properties": {
        "speakerVoiceConfigs": {
          "type": "array",
          "items": {
            "$ref": "SpeakerVoiceConfig"
          },
          "description": "Required. All the enabled speaker voices."
        }
      },
      "id": "MultiSpeakerVoiceConfig"
    },
    "InlinedResponses": {
      "description": "The responses to the requests in the batch.",
      "properties": {
        "inlinedResponses": {
          "type": "array",
          "items": {
            "$ref": "InlinedResponse"
          },
          "readOnly": true,
          "description": "Output only. The responses to the requests in the batch."
        }
      },
      "id": "InlinedResponses",
      "type": "object"
    },
    "ListModelsResponse": {
      "type": "object",
      "description": "Response from `ListModel` containing a paginated list of Models.",
      "properties": {
        "models": {
          "description": "The returned Models.",
          "items": {
            "$ref": "Model"
          },
          "type": "array"
        },
        "nextPageToken": {
          "type": "string",
          "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."
        }
      },
      "id": "ListModelsResponse"
    },
    "CustomMetadata": {
      "type": "object",
      "description": "User provided metadata stored as key-value pairs.",
      "properties": {
        "stringValue": {
          "description": "The string value of the metadata to store.",
          "type": "string"
        },
        "stringListValue": {
          "description": "The StringList value of the metadata to store.",
          "$ref": "StringList"
        },
        "key": {
          "description": "Required. The key of the metadata to store.",
          "type": "string"
        },
        "numericValue": {
          "description": "The numeric value of the metadata to store.",
          "format": "float",
          "type": "number"
        }
      },
      "id": "CustomMetadata"
    },
    "BatchEmbedContentsRequest": {
      "description": "Batch request to get embeddings from the model for a list of prompts.",
      "properties": {
        "requests": {
          "description": "Required. Embed requests for the batch. The model in each of these requests must match the model specified `BatchEmbedContentsRequest.model`.",
          "items": {
            "$ref": "EmbedContentRequest"
          },
          "type": "array"
        }
      },
      "id": "BatchEmbedContentsRequest",
      "type": "object"
    },
    "TransferOwnershipRequest": {
      "id": "TransferOwnershipRequest",
      "description": "Request to transfer the ownership of the tuned model.",
      "properties": {
        "emailAddress": {
          "type": "string",
          "description": "Required. The email address of the user to whom the tuned model is being transferred to."
        }
      },
      "type": "object"
    },
    "Maps": {
      "type": "object",
      "description": "A grounding chunk from Google Maps. A Maps chunk corresponds to a single place.",
      "properties": {
        "placeAnswerSources": {
          "description": "Sources that provide answers about the features of a given place in Google Maps.",
          "$ref": "PlaceAnswerSources"
        },
        "title": {
          "type": "string",
          "description": "Title of the place."
        },
        "placeId": {
          "type": "string",
          "description": "The ID of the place, in `places/{place_id}` format. A user can use this ID to look up that place."
        },
        "uri": {
          "description": "URI reference of the place.",
          "type": "string"
        },
        "text": {
          "description": "Text description of the place answer.",
          "type": "string"
        }
      },
      "id": "Maps"
    },
    "Dataset": {
      "description": "Dataset for training or validation.",
      "properties": {
        "examples": {
          "$ref": "TuningExamples",
          "description": "Optional. Inline examples with simple input/output text."
        }
      },
      "id": "Dataset",
      "type": "object"
    },
    "GroundingChunkStringList": {
      "description": "A list of string values.",
      "properties": {
        "values": {
          "description": "The string values of the list.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "id": "GroundingChunkStringList",
      "type": "object"
    },
    "StreamableHttpTransport": {
      "type": "object",
      "description": "A transport that can stream HTTP requests and responses. Next ID: 6",
      "properties": {
        "timeout": {
          "type": "string",
          "description": "HTTP timeout for regular operations.",
          "format": "google-duration"
        },
        "url": {
          "type": "string",
          "description": "The full URL for the MCPServer endpoint. Example: \"https://api.example.com/mcp\""
        },
        "headers": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "description": "Optional: Fields for authentication headers, timeouts, etc., if needed."
        },
        "sseReadTimeout": {
          "description": "Timeout for SSE read operations.",
          "format": "google-duration",
          "type": "string"
        },
        "terminateOnClose": {
          "description": "Whether to close the client session when the transport closes.",
          "type": "boolean"
        }
      },
      "id": "StreamableHttpTransport"
    },
    "ImageConfig": {
      "description": "Config for image generation features.",
      "properties": {
        "aspectRatio": {
          "type": "string",
          "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."
        },
        "imageSize": {
          "type": "string",
          "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`."
        }
      },
      "id": "ImageConfig",
      "type": "object"
    },
    "LogprobsResultCandidate": {
      "id": "LogprobsResultCandidate",
      "description": "Candidate for the logprobs token and score.",
      "properties": {
        "tokenId": {
          "description": "The candidate’s token id value.",
          "format": "int32",
          "type": "integer"
        },
        "logProbability": {
          "description": "The candidate's log probability.",
          "format": "float",
          "type": "number"
        },
        "token": {
          "type": "string",
          "description": "The candidate’s token string value."
        }
      },
      "type": "object"
    },
    "EmbedContentBatchOutput": {
      "type": "object",
      "description": "The output of a batch request. This is returned in the `AsyncBatchEmbedContentResponse` or the `EmbedContentBatch.output` field.",
      "properties": {
        "responsesFile": {
          "type": "string",
          "readOnly": true,
          "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.",
          "readOnly": true,
          "$ref": "InlinedEmbedContentResponses"
        }
      },
      "id": "EmbedContentBatchOutput"
    },
    "InputFeedback": {
      "type": "object",
      "description": "Feedback related to the input data used to answer the question, as opposed to the model-generated response to the question.",
      "properties": {
        "blockReason": {
          "type": "string",
          "enumDescriptions": [
            "Default value. This value is unused.",
            "Input was blocked due to safety reasons. Inspect `safety_ratings` to understand which safety category blocked it.",
            "Input was blocked due to other reasons."
          ],
          "description": "Optional. If set, the input was blocked and no candidates are returned. Rephrase the input.",
          "enum": [
            "BLOCK_REASON_UNSPECIFIED",
            "SAFETY",
            "OTHER"
          ]
        },
        "safetyRatings": {
          "items": {
            "$ref": "SafetyRating"
          },
          "type": "array",
          "description": "Ratings for safety of the input. There is at most one rating per category."
        }
      },
      "id": "InputFeedback"
    },
    "Condition": {
      "type": "object",
      "description": "Filter condition applicable to a single key.",
      "properties": {
        "numericValue": {
          "description": "The numeric value to filter the metadata on.",
          "format": "float",
          "type": "number"
        },
        "stringValue": {
          "type": "string",
          "description": "The string value to filter the metadata on."
        },
        "operation": {
          "type": "string",
          "enumDescriptions": [
            "The default value. This value is unused.",
            "Supported by numeric.",
            "Supported by numeric.",
            "Supported by numeric & string.",
            "Supported by numeric.",
            "Supported by numeric.",
            "Supported by numeric & string.",
            "Supported by string only when `CustomMetadata` value type for the given key has a `string_list_value`.",
            "Supported by string only when `CustomMetadata` value type for the given key has a `string_list_value`."
          ],
          "description": "Required. Operator applied to the given key-value pair to trigger the condition.",
          "enum": [
            "OPERATOR_UNSPECIFIED",
            "LESS",
            "LESS_EQUAL",
            "EQUAL",
            "GREATER_EQUAL",
            "GREATER",
            "NOT_EQUAL",
            "INCLUDES",
            "EXCLUDES"
          ]
        }
      },
      "id": "Condition"
    },
    "Web": {
      "type": "object",
      "description": "Chunk from the web.",
      "properties": {
        "uri": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. URI reference of the chunk."
        },
        "title": {
          "readOnly": true,
          "description": "Output only. Title of the chunk.",
          "type": "string"
        }
      },
      "id": "Web"
    },
    "EmbedContentBatch": {
      "type": "object",
      "description": "A resource representing a batch of `EmbedContent` requests.",
      "properties": {
        "name": {
          "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`.",
          "readOnly": true,
          "type": "string"
        },
        "batchStats": {
          "$ref": "EmbedContentBatchStats",
          "readOnly": true,
          "description": "Output only. Stats about the batch."
        },
        "state": {
          "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."
          ],
          "enum": [
            "BATCH_STATE_UNSPECIFIED",
            "BATCH_STATE_PENDING",
            "BATCH_STATE_RUNNING",
            "BATCH_STATE_SUCCEEDED",
            "BATCH_STATE_FAILED",
            "BATCH_STATE_CANCELLED",
            "BATCH_STATE_EXPIRED"
          ],
          "readOnly": true,
          "description": "Output only. The state of the batch."
        },
        "priority": {
          "type": "string",
          "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.",
          "format": "int64"
        },
        "createTime": {
          "type": "string",
          "description": "Output only. The time at which the batch was created.",
          "readOnly": true,
          "format": "google-datetime"
        },
        "output": {
          "$ref": "EmbedContentBatchOutput",
          "readOnly": true,
          "description": "Output only. The output of the batch request."
        },
        "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"
        },
        "updateTime": {
          "type": "string",
          "description": "Output only. The time at which the batch was last updated.",
          "readOnly": true,
          "format": "google-datetime"
        },
        "endTime": {
          "type": "string",
          "description": "Output only. The time at which the batch processing completed.",
          "readOnly": true,
          "format": "google-datetime"
        },
        "model": {
          "type": "string",
          "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`."
        }
      },
      "id": "EmbedContentBatch"
    },
    "RetrievalConfig": {
      "type": "object",
      "description": "Retrieval config.",
      "properties": {
        "latLng": {
          "description": "Optional. The location of the user.",
          "$ref": "LatLng"
        },
        "languageCode": {
          "type": "string",
          "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)."
        }
      },
      "id": "RetrievalConfig"
    },
    "WhiteSpaceConfig": {
      "type": "object",
      "description": "Configuration for a white space chunking algorithm [white space delimited].",
      "properties": {
        "maxOverlapTokens": {
          "type": "integer",
          "description": "Maximum number of overlapping tokens between two adjacent chunks.",
          "format": "int32"
        },
        "maxTokensPerChunk": {
          "format": "int32",
          "description": "Maximum number of tokens per chunk. Tokens are defined as words for this chunking algorithm. Note: we are defining tokens as words split by whitespace as opposed to the output of a tokenizer. The context window of the latest gemini embedding model as of 2025-04-17 is currently 8192 tokens. We assume that the average word is 5 characters. Therefore, we set the upper limit to 2**9, which is 512 words, or 2560 tokens, assuming worst case a character per token. This is a conservative estimate meant to prevent context window overflow.",
          "type": "integer"
        }
      },
      "id": "WhiteSpaceConfig"
    },
    "EmbedTextRequest": {
      "type": "object",
      "description": "Request to get a text embedding from the model.",
      "properties": {
        "model": {
          "type": "string",
          "description": "Required. The model name to use with the format model=models/{model}."
        },
        "text": {
          "description": "Optional. The free-form input text that the model will turn into an embedding.",
          "type": "string"
        }
      },
      "id": "EmbedTextRequest"
    },
    "CitationSource": {
      "type": "object",
      "id": "CitationSource",
      "description": "A citation to a source for a portion of a specific response.",
      "properties": {
        "startIndex": {
          "type": "integer",
          "description": "Optional. Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.",
          "format": "int32"
        },
        "uri": {
          "description": "Optional. URI that is attributed as a source for a portion of the text.",
          "type": "string"
        },
        "endIndex": {
          "format": "int32",
          "description": "Optional. End of the attributed segment, exclusive.",
          "type": "integer"
        },
        "license": {
          "type": "string",
          "description": "Optional. License for the GitHub project that is attributed as a source for segment. License info is required for code citations."
        }
      }
    },
    "Permission": {
      "type": "object",
      "id": "Permission",
      "description": "Permission resource grants user, group or the rest of the world access to the PaLM API resource (e.g. a tuned model, corpus). A role is a collection of permitted operations that allows users to perform specific actions on PaLM API resources. To make them available to users, groups, or service accounts, you assign roles. When you assign a role, you grant permissions that the role contains. There are three concentric roles. Each role is a superset of the previous role's permitted operations: - reader can use the resource (e.g. tuned model, corpus) for inference - writer has reader's permissions and additionally can edit and share - owner has writer's permissions and additionally can delete",
      "properties": {
        "role": {
          "type": "string",
          "enumDescriptions": [
            "The default value. This value is unused.",
            "Owner can use, update, share and delete the resource.",
            "Writer can use, update and share the resource.",
            "Reader can use the resource."
          ],
          "description": "Required. The role granted by this permission.",
          "enum": [
            "ROLE_UNSPECIFIED",
            "OWNER",
            "WRITER",
            "READER"
          ]
        },
        "name": {
          "description": "Output only. Identifier. The permission name. A unique name will be generated on create. Examples: tunedModels/{tuned_model}/permissions/{permission} corpora/{corpus}/permissions/{permission} Output only.",
          "readOnly": true,
          "type": "string"
        },
        "granteeType": {
          "description": "Optional. Immutable. The type of the grantee.",
          "enum": [
            "GRANTEE_TYPE_UNSPECIFIED",
            "USER",
            "GROUP",
            "EVERYONE"
          ],
          "type": "string",
          "enumDescriptions": [
            "The default value. This value is unused.",
            "Represents a user. When set, you must provide email_address for the user.",
            "Represents a group. When set, you must provide email_address for the group.",
            "Represents access to everyone. No extra information is required."
          ]
        },
        "emailAddress": {
          "type": "string",
          "description": "Optional. Immutable. The email address of the user of group which this permission refers. Field is not set when permission's grantee type is EVERYONE."
        }
      }
    },
    "FileData": {
      "id": "FileData",
      "description": "URI based data.",
      "properties": {
        "mimeType": {
          "description": "Optional. The IANA standard MIME type of the source data.",
          "type": "string"
        },
        "fileUri": {
          "description": "Required. URI.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "CustomLongRunningOperation": {
      "properties": {
        "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"
        },
        "error": {
          "$ref": "Status",
          "description": "The error result of the operation in case of failure or cancellation."
        },
        "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."
        },
        "name": {
          "type": "string",
          "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}`."
        },
        "response": {
          "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`.",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object. Contains field @type with type URL."
          },
          "type": "object"
        }
      },
      "id": "CustomLongRunningOperation",
      "type": "object"
    },
    "ToolConfig": {
      "id": "ToolConfig",
      "description": "The Tool configuration containing parameters for specifying `Tool` use in the request.",
      "properties": {
        "includeServerSideToolInvocations": {
          "type": "boolean",
          "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."
        },
        "functionCallingConfig": {
          "$ref": "FunctionCallingConfig",
          "description": "Optional. Function calling config."
        },
        "retrievalConfig": {
          "$ref": "RetrievalConfig",
          "description": "Optional. Retrieval config."
        }
      },
      "type": "object"
    },
    "GoogleMaps": {
      "type": "object",
      "id": "GoogleMaps",
      "description": "The GoogleMaps Tool that provides geospatial context for the user's query.",
      "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"
        }
      }
    },
    "TuningTask": {
      "type": "object",
      "description": "Tuning tasks that create tuned models.",
      "properties": {
        "trainingData": {
          "$ref": "Dataset",
          "description": "Required. Input only. Immutable. The model training data."
        },
        "startTime": {
          "type": "string",
          "readOnly": true,
          "format": "google-datetime",
          "description": "Output only. The timestamp when tuning this model started."
        },
        "completeTime": {
          "readOnly": true,
          "format": "google-datetime",
          "description": "Output only. The timestamp when tuning this model completed.",
          "type": "string"
        },
        "hyperparameters": {
          "description": "Immutable. Hyperparameters controlling the tuning process. If not provided, default values will be used.",
          "$ref": "Hyperparameters"
        },
        "snapshots": {
          "type": "array",
          "items": {
            "$ref": "TuningSnapshot"
          },
          "readOnly": true,
          "description": "Output only. Metrics collected during tuning."
        }
      },
      "id": "TuningTask"
    },
    "RetrievedContext": {
      "description": "Chunk from context retrieved by the file search tool.",
      "properties": {
        "uri": {
          "description": "Optional. URI reference of the semantic retrieval document.",
          "type": "string"
        },
        "text": {
          "type": "string",
          "description": "Optional. Text of the chunk."
        },
        "title": {
          "type": "string",
          "description": "Optional. Title of the document."
        },
        "fileSearchStore": {
          "description": "Optional. Name of the `FileSearchStore` containing the document. Example: `fileSearchStores/123`",
          "type": "string"
        },
        "customMetadata": {
          "items": {
            "$ref": "GroundingChunkCustomMetadata"
          },
          "type": "array",
          "description": "Optional. User-provided metadata about the retrieved context."
        },
        "pageNumber": {
          "type": "integer",
          "description": "Optional. Page number of the retrieved context, if applicable.",
          "format": "int32"
        }
      },
      "id": "RetrievedContext",
      "type": "object"
    },
    "MessagePrompt": {
      "description": "All of the structured input text passed to the model as a prompt. A `MessagePrompt` contains a structured set of fields that provide context for the conversation, examples of user input/model output message pairs that prime the model to respond in different ways, and the conversation history or list of messages representing the alternating turns of the conversation between the user and the model.",
      "properties": {
        "examples": {
          "description": "Optional. Examples of what the model should generate. This includes both user input and the response that the model should emulate. These `examples` are treated identically to conversation messages except that they take precedence over the history in `messages`: If the total input size exceeds the model's `input_token_limit` the input will be truncated. Items will be dropped from `messages` before `examples`.",
          "items": {
            "$ref": "Example"
          },
          "type": "array"
        },
        "messages": {
          "type": "array",
          "items": {
            "$ref": "Message"
          },
          "description": "Required. A snapshot of the recent conversation history sorted chronologically. Turns alternate between two authors. If the total input size exceeds the model's `input_token_limit` the input will be truncated: The oldest items will be dropped from `messages`."
        },
        "context": {
          "type": "string",
          "description": "Optional. Text that should be provided to the model first to ground the response. If not empty, this `context` will be given to the model first before the `examples` and `messages`. When using a `context` be sure to provide it with every request to maintain continuity. This field can be a description of your prompt to the model to help provide context and guide the responses. Examples: \"Translate the phrase from English to French.\" or \"Given a statement, classify the sentiment as happy, sad or neutral.\" Anything included in this field will take precedence over message history if the total input size exceeds the model's `input_token_limit` and the input request is truncated."
        }
      },
      "id": "MessagePrompt",
      "type": "object"
    },
    "CodeExecution": {
      "type": "object",
      "id": "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.",
      "properties": {}
    },
    "PredictLongRunningRequest": {
      "type": "object",
      "description": "Request message for [PredictionService.PredictLongRunning].",
      "properties": {
        "instances": {
          "type": "array",
          "items": {
            "type": "any"
          },
          "description": "Required. The instances that are the input to the prediction call."
        },
        "parameters": {
          "type": "any",
          "description": "Optional. The parameters that govern the prediction call."
        }
      },
      "id": "PredictLongRunningRequest"
    },
    "VideoFileMetadata": {
      "id": "VideoFileMetadata",
      "description": "Metadata for a video `File`.",
      "properties": {
        "videoDuration": {
          "type": "string",
          "description": "Duration of the video.",
          "format": "google-duration"
        }
      },
      "type": "object"
    },
    "BatchEmbedTextResponse": {
      "id": "BatchEmbedTextResponse",
      "description": "The response to a EmbedTextRequest.",
      "properties": {
        "embeddings": {
          "readOnly": true,
          "description": "Output only. The embeddings generated from the input text.",
          "type": "array",
          "items": {
            "$ref": "Embedding"
          }
        }
      },
      "type": "object"
    },
    "ContentFilter": {
      "type": "object",
      "description": "Content filtering metadata associated with processing a single request. ContentFilter contains a reason and an optional supporting string. The reason may be unspecified.",
      "properties": {
        "reason": {
          "type": "string",
          "enumDescriptions": [
            "A blocked reason was not specified.",
            "Content was blocked by safety settings.",
            "Content was blocked, but the reason is uncategorized."
          ],
          "enum": [
            "BLOCKED_REASON_UNSPECIFIED",
            "SAFETY",
            "OTHER"
          ],
          "description": "The reason content was blocked during request processing."
        },
        "message": {
          "description": "A string that describes the filtering behavior in more detail.",
          "type": "string"
        }
      },
      "id": "ContentFilter"
    },
    "GroundingMetadata": {
      "type": "object",
      "id": "GroundingMetadata",
      "description": "Metadata returned to client when grounding is enabled.",
      "properties": {
        "searchEntryPoint": {
          "$ref": "SearchEntryPoint",
          "description": "Optional. Google search entry for the following-up web searches."
        },
        "retrievalMetadata": {
          "$ref": "RetrievalMetadata",
          "description": "Metadata related to retrieval in the grounding flow."
        },
        "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"
        },
        "groundingSupports": {
          "type": "array",
          "items": {
            "$ref": "GoogleAiGenerativelanguageV1betaGroundingSupport"
          },
          "description": "List of grounding support."
        },
        "webSearchQueries": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "Web search queries for the following-up web search."
        },
        "imageSearchQueries": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Image search queries used for grounding."
        },
        "groundingChunks": {
          "items": {
            "$ref": "GroundingChunk"
          },
          "type": "array",
          "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."
        }
      }
    },
    "PredictRequest": {
      "description": "Request message for PredictionService.Predict.",
      "properties": {
        "instances": {
          "type": "array",
          "items": {
            "type": "any"
          },
          "description": "Required. The instances that are the input to the prediction call."
        },
        "parameters": {
          "description": "Optional. The parameters that govern the prediction call.",
          "type": "any"
        }
      },
      "id": "PredictRequest",
      "type": "object"
    },
    "InlinedResponse": {
      "id": "InlinedResponse",
      "description": "The response to a single request in the batch.",
      "properties": {
        "response": {
          "$ref": "GenerateContentResponse",
          "readOnly": true,
          "description": "Output only. The response to the request."
        },
        "error": {
          "description": "Output only. The error encountered while processing the request.",
          "readOnly": true,
          "$ref": "Status"
        },
        "metadata": {
          "additionalProperties": {
            "description": "Properties of the object.",
            "type": "any"
          },
          "type": "object",
          "description": "Output only. The metadata associated with the request.",
          "readOnly": true
        }
      },
      "type": "object"
    },
    "ImportFileRequest": {
      "type": "object",
      "id": "ImportFileRequest",
      "description": "Request for `ImportFile` to import a File API file with a `FileSearchStore`.",
      "properties": {
        "fileName": {
          "description": "Required. The name of the `File` to import. Example: `files/abc-123`",
          "type": "string"
        },
        "chunkingConfig": {
          "$ref": "ChunkingConfig",
          "description": "Optional. Config for telling the service how to chunk the file. If not provided, the service will use default parameters."
        },
        "customMetadata": {
          "description": "Custom metadata to be associated with the file.",
          "items": {
            "$ref": "CustomMetadata"
          },
          "type": "array"
        }
      }
    },
    "FunctionResponse": {
      "type": "object",
      "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.",
      "properties": {
        "parts": {
          "items": {
            "$ref": "FunctionResponsePart"
          },
          "type": "array",
          "description": "Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types."
        },
        "willContinue": {
          "type": "boolean",
          "description": "Optional. Signals that function call continues, and more responses will be returned, turning the function call into a generator. Is only applicable to NON_BLOCKING function calls, is ignored otherwise. If set to false, future responses will not be considered. It is allowed to return empty `response` with `will_continue=False` to signal that the function call is finished. This may still trigger the model generation. To avoid triggering the generation and finish the function call, additionally set `scheduling` to `SILENT`."
        },
        "scheduling": {
          "enum": [
            "SCHEDULING_UNSPECIFIED",
            "SILENT",
            "WHEN_IDLE",
            "INTERRUPT"
          ],
          "description": "Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.",
          "type": "string",
          "enumDescriptions": [
            "This value is unused.",
            "Only add the result to the conversation context, do not interrupt or trigger generation.",
            "Add the result to the conversation context, and prompt to generate output without interrupting ongoing generation.",
            "Add the result to the conversation context, interrupt ongoing generation and prompt to generate output."
          ]
        },
        "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"
        },
        "response": {
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          },
          "type": "object",
          "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."
        },
        "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"
        }
      },
      "id": "FunctionResponse"
    },
    "McpServer": {
      "type": "object",
      "description": "A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 6",
      "properties": {
        "streamableHttpTransport": {
          "$ref": "StreamableHttpTransport",
          "description": "A transport that can stream HTTP requests and responses."
        },
        "name": {
          "type": "string",
          "description": "The name of the MCPServer."
        }
      },
      "id": "McpServer"
    },
    "InputConfig": {
      "id": "InputConfig",
      "description": "Configures the input to the batch request.",
      "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": "InlinedRequests"
        }
      },
      "type": "object"
    },
    "File": {
      "type": "object",
      "id": "File",
      "description": "A file uploaded to the API. Next ID: 15",
      "properties": {
        "downloadUri": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. The download uri of the `File`."
        },
        "displayName": {
          "description": "Optional. The human-readable display name for the `File`. The display name must be no more than 512 characters in length, including spaces. Example: \"Welcome Image\"",
          "type": "string"
        },
        "error": {
          "readOnly": true,
          "description": "Output only. Error status if File processing failed.",
          "$ref": "Status"
        },
        "uri": {
          "description": "Output only. The uri of the `File`.",
          "readOnly": true,
          "type": "string"
        },
        "source": {
          "enum": [
            "SOURCE_UNSPECIFIED",
            "UPLOADED",
            "GENERATED",
            "REGISTERED"
          ],
          "description": "Source of the File.",
          "type": "string",
          "enumDescriptions": [
            "Used if source is not specified.",
            "Indicates the file is uploaded by the user.",
            "Indicates the file is generated by Google.",
            "Indicates the file is a registered, i.e. a Google Cloud Storage file."
          ]
        },
        "sizeBytes": {
          "description": "Output only. Size of the file in bytes.",
          "readOnly": true,
          "format": "int64",
          "type": "string"
        },
        "updateTime": {
          "description": "Output only. The timestamp of when the `File` was last updated.",
          "readOnly": true,
          "format": "google-datetime",
          "type": "string"
        },
        "mimeType": {
          "description": "Output only. MIME type of the file.",
          "readOnly": true,
          "type": "string"
        },
        "expirationTime": {
          "description": "Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire.",
          "readOnly": true,
          "format": "google-datetime",
          "type": "string"
        },
        "sha256Hash": {
          "readOnly": true,
          "format": "byte",
          "description": "Output only. SHA-256 hash of the uploaded bytes.",
          "type": "string"
        },
        "videoMetadata": {
          "readOnly": true,
          "description": "Output only. Metadata for a video.",
          "$ref": "VideoFileMetadata"
        },
        "name": {
          "type": "string",
          "description": "Immutable. Identifier. The `File` resource name. The ID (name excluding the \"files/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: `files/123-456`"
        },
        "state": {
          "enum": [
            "STATE_UNSPECIFIED",
            "PROCESSING",
            "ACTIVE",
            "FAILED"
          ],
          "type": "string",
          "enumDescriptions": [
            "The default value. This value is used if the state is omitted.",
            "File is being processed and cannot be used for inference yet.",
            "File is processed and available for inference.",
            "File failed processing."
          ],
          "description": "Output only. Processing state of the File.",
          "readOnly": true
        },
        "createTime": {
          "type": "string",
          "description": "Output only. The timestamp of when the `File` was created.",
          "readOnly": true,
          "format": "google-datetime"
        }
      }
    },
    "GenerateContentBatch": {
      "id": "GenerateContentBatch",
      "description": "A resource representing a batch of `GenerateContent` requests.",
      "properties": {
        "name": {
          "readOnly": true,
          "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`.",
          "type": "string"
        },
        "batchStats": {
          "description": "Output only. Stats about the batch.",
          "readOnly": true,
          "$ref": "BatchStats"
        },
        "state": {
          "description": "Output only. The state of the batch.",
          "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."
          ],
          "enum": [
            "BATCH_STATE_UNSPECIFIED",
            "BATCH_STATE_PENDING",
            "BATCH_STATE_RUNNING",
            "BATCH_STATE_SUCCEEDED",
            "BATCH_STATE_FAILED",
            "BATCH_STATE_CANCELLED",
            "BATCH_STATE_EXPIRED"
          ]
        },
        "priority": {
          "type": "string",
          "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.",
          "format": "int64"
        },
        "createTime": {
          "type": "string",
          "readOnly": true,
          "format": "google-datetime",
          "description": "Output only. The time at which the batch was created."
        },
        "output": {
          "$ref": "GenerateContentBatchOutput",
          "readOnly": true,
          "description": "Output only. The output of the batch request."
        },
        "inputConfig": {
          "$ref": "InputConfig",
          "description": "Required. Input configuration of the instances on which batch processing are performed."
        },
        "displayName": {
          "type": "string",
          "description": "Required. The user-defined name of this batch."
        },
        "updateTime": {
          "type": "string",
          "readOnly": true,
          "format": "google-datetime",
          "description": "Output only. The time at which the batch was last updated."
        },
        "endTime": {
          "type": "string",
          "readOnly": true,
          "format": "google-datetime",
          "description": "Output only. The time at which the batch processing completed."
        },
        "model": {
          "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "CountMessageTokensRequest": {
      "type": "object",
      "id": "CountMessageTokensRequest",
      "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`.",
      "properties": {
        "prompt": {
          "description": "Required. The prompt, whose token count is to be returned.",
          "$ref": "MessagePrompt"
        }
      }
    },
    "FunctionResponsePart": {
      "type": "object",
      "id": "FunctionResponsePart",
      "description": "A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` 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.",
      "properties": {
        "inlineData": {
          "description": "Inline media bytes.",
          "$ref": "FunctionResponseBlob"
        }
      }
    },
    "Tool": {
      "type": "object",
      "id": "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",
      "properties": {
        "googleSearch": {
          "$ref": "GoogleSearch",
          "description": "Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google."
        },
        "codeExecution": {
          "description": "Optional. Enables the model to execute code as part of generation.",
          "$ref": "CodeExecution"
        },
        "mcpServers": {
          "description": "Optional. MCP Servers to connect to.",
          "items": {
            "$ref": "McpServer"
          },
          "type": "array"
        },
        "googleMaps": {
          "$ref": "GoogleMaps",
          "description": "Optional. Tool that allows grounding the model's response with geospatial context related to the user's query."
        },
        "googleSearchRetrieval": {
          "description": "Optional. Retrieval tool that is powered by Google search.",
          "$ref": "GoogleSearchRetrieval"
        },
        "computerUse": {
          "$ref": "ComputerUse",
          "description": "Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations."
        },
        "urlContext": {
          "description": "Optional. Tool to support URL context retrieval.",
          "$ref": "UrlContext"
        },
        "functionDeclarations": {
          "type": "array",
          "items": {
            "$ref": "FunctionDeclaration"
          },
          "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."
        },
        "fileSearch": {
          "description": "Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora.",
          "$ref": "FileSearch"
        }
      }
    },
    "InlinedEmbedContentResponses": {
      "description": "The responses to the requests in the batch.",
      "properties": {
        "inlinedResponses": {
          "description": "Output only. The responses to the requests in the batch.",
          "readOnly": true,
          "items": {
            "$ref": "InlinedEmbedContentResponse"
          },
          "type": "array"
        }
      },
      "id": "InlinedEmbedContentResponses",
      "type": "object"
    },
    "GroundingPassageId": {
      "type": "object",
      "description": "Identifier for a part within a `GroundingPassage`.",
      "properties": {
        "partIndex": {
          "type": "integer",
          "description": "Output only. Index of the part within the `GenerateAnswerRequest`'s `GroundingPassage.content`.",
          "readOnly": true,
          "format": "int32"
        },
        "passageId": {
          "description": "Output only. ID of the passage matching the `GenerateAnswerRequest`'s `GroundingPassage.id`.",
          "readOnly": true,
          "type": "string"
        }
      },
      "id": "GroundingPassageId"
    },
    "EmbedTextResponse": {
      "id": "EmbedTextResponse",
      "description": "The response to a EmbedTextRequest.",
      "properties": {
        "embedding": {
          "description": "Output only. The embedding generated from the input text.",
          "readOnly": true,
          "$ref": "Embedding"
        }
      },
      "type": "object"
    },
    "InlinedRequests": {
      "type": "object",
      "description": "The requests to be processed in the batch if provided as part of the batch creation request.",
      "properties": {
        "requests": {
          "type": "array",
          "items": {
            "$ref": "InlinedRequest"
          },
          "description": "Required. The requests to be processed in the batch."
        }
      },
      "id": "InlinedRequests"
    },
    "InlinedEmbedContentResponse": {
      "type": "object",
      "description": "The response to a single request in the batch.",
      "properties": {
        "error": {
          "$ref": "Status",
          "description": "Output only. The error encountered while processing the request.",
          "readOnly": true
        },
        "metadata": {
          "additionalProperties": {
            "description": "Properties of the object.",
            "type": "any"
          },
          "type": "object",
          "description": "Output only. The metadata associated with the request.",
          "readOnly": true
        },
        "response": {
          "description": "Output only. The response to the request.",
          "readOnly": true,
          "$ref": "EmbedContentResponse"
        }
      },
      "id": "InlinedEmbedContentResponse"
    },
    "ListFileSearchStoresResponse": {
      "description": "Response from `ListFileSearchStores` containing a paginated list of `FileSearchStores`. The results are sorted by ascending `file_search_store.create_time`.",
      "properties": {
        "fileSearchStores": {
          "description": "The returned rag_stores.",
          "items": {
            "$ref": "FileSearchStore"
          },
          "type": "array"
        },
        "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"
        }
      },
      "id": "ListFileSearchStoresResponse",
      "type": "object"
    },
    "CountMessageTokensResponse": {
      "description": "A response from `CountMessageTokens`. It returns the model's `token_count` for the `prompt`.",
      "properties": {
        "tokenCount": {
          "description": "The number of tokens that the `model` tokenizes the `prompt` into. Always non-negative.",
          "format": "int32",
          "type": "integer"
        }
      },
      "id": "CountMessageTokensResponse",
      "type": "object"
    },
    "ListGeneratedFilesResponse": {
      "id": "ListGeneratedFilesResponse",
      "description": "Response for `ListGeneratedFiles`.",
      "properties": {
        "generatedFiles": {
          "type": "array",
          "items": {
            "$ref": "GeneratedFile"
          },
          "description": "The list of `GeneratedFile`s."
        },
        "nextPageToken": {
          "description": "A token that can be sent as a `page_token` into a subsequent `ListGeneratedFiles` call.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "Hyperparameters": {
      "id": "Hyperparameters",
      "description": "Hyperparameters controlling the tuning process. Read more at https://ai.google.dev/docs/model_tuning_guidance",
      "properties": {
        "batchSize": {
          "type": "integer",
          "format": "int32",
          "description": "Immutable. The batch size hyperparameter for tuning. If not set, a default of 4 or 16 will be used based on the number of training examples."
        },
        "learningRate": {
          "format": "float",
          "description": "Optional. Immutable. The learning rate hyperparameter for tuning. If not set, a default of 0.001 or 0.0002 will be calculated based on the number of training examples.",
          "type": "number"
        },
        "learningRateMultiplier": {
          "description": "Optional. Immutable. The learning rate multiplier is used to calculate a final learning_rate based on the default (recommended) value. Actual learning rate := learning_rate_multiplier * default learning rate Default learning rate is dependent on base model and dataset size. If not set, a default of 1.0 will be used.",
          "format": "float",
          "type": "number"
        },
        "epochCount": {
          "type": "integer",
          "format": "int32",
          "description": "Immutable. The number of training epochs. An epoch is one pass through the training data. If not set, a default of 5 will be used."
        }
      },
      "type": "object"
    },
    "RegisterFilesResponse": {
      "description": "Response for `RegisterFiles`.",
      "properties": {
        "files": {
          "type": "array",
          "items": {
            "$ref": "File"
          },
          "description": "The registered files to be used when calling GenerateContent."
        }
      },
      "id": "RegisterFilesResponse",
      "type": "object"
    },
    "UrlContext": {
      "type": "object",
      "description": "Tool to support URL context retrieval.",
      "properties": {},
      "id": "UrlContext"
    },
    "CachedContent": {
      "type": "object",
      "id": "CachedContent",
      "description": "Content that has been preprocessed and can be used in subsequent request to GenerativeService. Cached content can be only used with model it was created for.",
      "properties": {
        "usageMetadata": {
          "readOnly": true,
          "description": "Output only. Metadata on the usage of the cached content.",
          "$ref": "CachedContentUsageMetadata"
        },
        "name": {
          "type": "string",
          "description": "Output only. Identifier. The resource name referring to the cached content. Format: `cachedContents/{id}`",
          "readOnly": true
        },
        "createTime": {
          "type": "string",
          "description": "Output only. Creation time of the cache entry.",
          "readOnly": true,
          "format": "google-datetime"
        },
        "expireTime": {
          "format": "google-datetime",
          "description": "Timestamp in UTC of when this resource is considered expired. This is *always* provided on output, regardless of what was sent on input.",
          "type": "string"
        },
        "contents": {
          "description": "Optional. Input only. Immutable. The content to cache.",
          "items": {
            "$ref": "Content"
          },
          "type": "array"
        },
        "systemInstruction": {
          "description": "Optional. Input only. Immutable. Developer set system instruction. Currently text only.",
          "$ref": "Content"
        },
        "tools": {
          "description": "Optional. Input only. Immutable. A list of `Tools` the model may use to generate the next response",
          "type": "array",
          "items": {
            "$ref": "Tool"
          }
        },
        "ttl": {
          "type": "string",
          "description": "Input only. New TTL for this resource, input only.",
          "format": "google-duration"
        },
        "displayName": {
          "type": "string",
          "description": "Optional. Immutable. The user-generated meaningful display name of the cached content. Maximum 128 Unicode characters."
        },
        "updateTime": {
          "readOnly": true,
          "format": "google-datetime",
          "description": "Output only. When the cache entry was last updated in UTC time.",
          "type": "string"
        },
        "model": {
          "type": "string",
          "description": "Required. Immutable. The name of the `Model` to use for cached content Format: `models/{model}`"
        },
        "toolConfig": {
          "description": "Optional. Input only. Immutable. Tool config. This config is shared for all tools.",
          "$ref": "ToolConfig"
        }
      }
    },
    "FunctionCall": {
      "type": "object",
      "id": "FunctionCall",
      "description": "A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values.",
      "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"
        },
        "name": {
          "type": "string",
          "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."
        },
        "args": {
          "description": "Optional. The function parameters and values in JSON object format.",
          "type": "object",
          "additionalProperties": {
            "description": "Properties of the object.",
            "type": "any"
          }
        }
      }
    },
    "ComputerUse": {
      "type": "object",
      "id": "ComputerUse",
      "description": "Computer Use tool type.",
      "properties": {
        "environment": {
          "description": "Required. The environment being operated.",
          "enum": [
            "ENVIRONMENT_UNSPECIFIED",
            "ENVIRONMENT_BROWSER"
          ],
          "type": "string",
          "enumDescriptions": [
            "Defaults to browser.",
            "Operates in a web browser."
          ]
        },
        "excludedPredefinedFunctions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Optional. By default, predefined functions are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions."
        }
      }
    },
    "SpeakerVoiceConfig": {
      "type": "object",
      "description": "The configuration for a single speaker in a multi speaker setup.",
      "properties": {
        "speaker": {
          "type": "string",
          "description": "Required. The name of the speaker to use. Should be the same as in the prompt."
        },
        "voiceConfig": {
          "$ref": "VoiceConfig",
          "description": "Required. The configuration for the voice to use."
        }
      },
      "id": "SpeakerVoiceConfig"
    },
    "ListFilesResponse": {
      "type": "object",
      "id": "ListFilesResponse",
      "description": "Response for `ListFiles`.",
      "properties": {
        "files": {
          "items": {
            "$ref": "File"
          },
          "type": "array",
          "description": "The list of `File`s."
        },
        "nextPageToken": {
          "description": "A token that can be sent as a `page_token` into a subsequent `ListFiles` call.",
          "type": "string"
        }
      }
    },
    "SpeechConfig": {
      "id": "SpeechConfig",
      "description": "Config for speech generation and transcription.",
      "properties": {
        "multiSpeakerVoiceConfig": {
          "description": "Optional. The configuration for the multi-speaker setup. It is mutually exclusive with the voice_config field.",
          "$ref": "MultiSpeakerVoiceConfig"
        },
        "languageCode": {
          "type": "string",
          "description": "Optional. The IETF [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language code that the user configured the app to use. Used for speech recognition and synthesis. Valid values are: `de-DE`, `en-AU`, `en-GB`, `en-IN`, `en-US`, `es-US`, `fr-FR`, `hi-IN`, `pt-BR`, `ar-XA`, `es-ES`, `fr-CA`, `id-ID`, `it-IT`, `ja-JP`, `tr-TR`, `vi-VN`, `bn-IN`, `gu-IN`, `kn-IN`, `ml-IN`, `mr-IN`, `ta-IN`, `te-IN`, `nl-NL`, `ko-KR`, `cmn-CN`, `pl-PL`, `ru-RU`, and `th-TH`."
        },
        "voiceConfig": {
          "description": "The configuration in case of single-voice output.",
          "$ref": "VoiceConfig"
        }
      },
      "type": "object"
    },
    "GroundingPassage": {
      "id": "GroundingPassage",
      "description": "Passage included inline with a grounding configuration.",
      "properties": {
        "content": {
          "description": "Content of the passage.",
          "$ref": "Content"
        },
        "id": {
          "description": "Identifier for the passage for attributing this passage in grounded answers.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "SemanticRetrieverConfig": {
      "type": "object",
      "description": "Configuration for retrieving grounding content from a `Corpus` or `Document` created using the Semantic Retriever API.",
      "properties": {
        "query": {
          "$ref": "Content",
          "description": "Required. Query to use for matching `Chunk`s in the given resource by similarity."
        },
        "maxChunksCount": {
          "type": "integer",
          "description": "Optional. Maximum number of relevant `Chunk`s to retrieve.",
          "format": "int32"
        },
        "minimumRelevanceScore": {
          "description": "Optional. Minimum relevance score for retrieved relevant `Chunk`s.",
          "format": "float",
          "type": "number"
        },
        "metadataFilters": {
          "type": "array",
          "items": {
            "$ref": "MetadataFilter"
          },
          "description": "Optional. Filters for selecting `Document`s and/or `Chunk`s from the resource."
        },
        "source": {
          "description": "Required. Name of the resource for retrieval. Example: `corpora/123` or `corpora/123/documents/abc`.",
          "type": "string"
        }
      },
      "id": "SemanticRetrieverConfig"
    },
    "GenerateMessageRequest": {
      "type": "object",
      "description": "Request to generate a message response from the model.",
      "properties": {
        "candidateCount": {
          "description": "Optional. The number of generated response messages to return. This value must be between `[1, 8]`, inclusive. If unset, this will default to `1`.",
          "format": "int32",
          "type": "integer"
        },
        "topK": {
          "type": "integer",
          "format": "int32",
          "description": "Optional. The maximum number of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Top-k sampling considers the set of `top_k` most probable tokens."
        },
        "topP": {
          "description": "Optional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Nucleus sampling considers the smallest set of tokens whose probability sum is at least `top_p`.",
          "format": "float",
          "type": "number"
        },
        "prompt": {
          "description": "Required. The structured textual input given to the model as a prompt. Given a prompt, the model will return what it predicts is the next message in the discussion.",
          "$ref": "MessagePrompt"
        },
        "temperature": {
          "format": "float",
          "description": "Optional. Controls the randomness of the output. Values can range over `[0.0,1.0]`, inclusive. A value closer to `1.0` will produce responses that are more varied, while a value closer to `0.0` will typically result in less surprising responses from the model.",
          "type": "number"
        }
      },
      "id": "GenerateMessageRequest"
    },
    "ListCorporaResponse": {
      "id": "ListCorporaResponse",
      "description": "Response from `ListCorpora` containing a paginated list of `Corpora`. The results are sorted by ascending `corpus.create_time`.",
      "properties": {
        "corpora": {
          "description": "The returned corpora.",
          "type": "array",
          "items": {
            "$ref": "Corpus"
          }
        },
        "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"
        }
      },
      "type": "object"
    },
    "WebSearch": {
      "description": "Standard web search for grounding and related configurations.",
      "properties": {},
      "id": "WebSearch",
      "type": "object"
    },
    "GenerateContentBatchOutput": {
      "type": "object",
      "description": "The output of a batch request. This is returned in the `BatchGenerateContentResponse` or the `GenerateContentBatch.output` field.",
      "properties": {
        "inlinedResponses": {
          "$ref": "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."
        },
        "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"
        }
      },
      "id": "GenerateContentBatchOutput"
    },
    "ListOperationsResponse": {
      "id": "ListOperationsResponse",
      "description": "The response message for Operations.ListOperations.",
      "properties": {
        "operations": {
          "items": {
            "$ref": "Operation"
          },
          "type": "array",
          "description": "A list of operations that matches the specified filter in the request."
        },
        "nextPageToken": {
          "description": "The standard List next-page token.",
          "type": "string"
        },
        "unreachable": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "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": "object"
    },
    "ImageSearch": {
      "id": "ImageSearch",
      "description": "Image search for grounding and related configurations.",
      "properties": {},
      "type": "object"
    },
    "EmbedContentBatchStats": {
      "type": "object",
      "id": "EmbedContentBatchStats",
      "description": "Stats about the batch.",
      "properties": {
        "requestCount": {
          "type": "string",
          "description": "Output only. The number of requests in the batch.",
          "readOnly": true,
          "format": "int64"
        },
        "successfulRequestCount": {
          "description": "Output only. The number of requests that were successfully processed.",
          "readOnly": true,
          "format": "int64",
          "type": "string"
        },
        "failedRequestCount": {
          "type": "string",
          "description": "Output only. The number of requests that failed to be processed.",
          "readOnly": true,
          "format": "int64"
        },
        "pendingRequestCount": {
          "type": "string",
          "readOnly": true,
          "format": "int64",
          "description": "Output only. The number of requests that are still pending processing."
        }
      }
    },
    "TuningSnapshot": {
      "description": "Record for a single tuning step.",
      "properties": {
        "epoch": {
          "type": "integer",
          "readOnly": true,
          "format": "int32",
          "description": "Output only. The epoch this step was part of."
        },
        "step": {
          "readOnly": true,
          "format": "int32",
          "description": "Output only. The tuning step.",
          "type": "integer"
        },
        "meanLoss": {
          "readOnly": true,
          "format": "float",
          "description": "Output only. The mean loss of the training examples for this step.",
          "type": "number"
        },
        "computeTime": {
          "type": "string",
          "readOnly": true,
          "format": "google-datetime",
          "description": "Output only. The timestamp when this metric was computed."
        }
      },
      "id": "TuningSnapshot",
      "type": "object"
    },
    "TextPrompt": {
      "description": "Text given to the model as a prompt. The Model will use this TextPrompt to Generate a text completion.",
      "properties": {
        "text": {
          "type": "string",
          "description": "Required. The prompt text."
        }
      },
      "id": "TextPrompt",
      "type": "object"
    },
    "EmbedContentResponse": {
      "id": "EmbedContentResponse",
      "description": "The response to an `EmbedContentRequest`.",
      "properties": {
        "embedding": {
          "$ref": "ContentEmbedding",
          "description": "Output only. The embedding generated from the input content.",
          "readOnly": true
        },
        "usageMetadata": {
          "$ref": "EmbeddingUsageMetadata",
          "readOnly": true,
          "description": "Output only. The usage metadata for the request."
        }
      },
      "type": "object"
    },
    "GenerateTextResponse": {
      "description": "The response from the model, including candidate completions.",
      "properties": {
        "filters": {
          "description": "A set of content filtering metadata for the prompt and response text. This indicates which `SafetyCategory`(s) blocked a candidate from this response, the lowest `HarmProbability` that triggered a block, and the HarmThreshold setting for that category. This indicates the smallest change to the `SafetySettings` that would be necessary to unblock at least 1 response. The blocking is configured by the `SafetySettings` in the request (or the default `SafetySettings` of the API).",
          "items": {
            "$ref": "ContentFilter"
          },
          "type": "array"
        },
        "candidates": {
          "type": "array",
          "items": {
            "$ref": "TextCompletion"
          },
          "description": "Candidate responses from the model."
        },
        "safetyFeedback": {
          "type": "array",
          "items": {
            "$ref": "SafetyFeedback"
          },
          "description": "Returns any safety feedback related to content filtering."
        }
      },
      "id": "GenerateTextResponse",
      "type": "object"
    },
    "SafetyRating": {
      "type": "object",
      "id": "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.",
      "properties": {
        "probability": {
          "enum": [
            "HARM_PROBABILITY_UNSPECIFIED",
            "NEGLIGIBLE",
            "LOW",
            "MEDIUM",
            "HIGH"
          ],
          "description": "Required. The probability of harm for this content.",
          "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."
          ]
        },
        "blocked": {
          "description": "Was this content blocked because of this rating?",
          "type": "boolean"
        },
        "category": {
          "description": "Required. The category for this rating.",
          "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."
          ],
          "enumDeprecated": [
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            true
          ],
          "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"
          ]
        }
      }
    },
    "ChunkingConfig": {
      "type": "object",
      "id": "ChunkingConfig",
      "description": "Parameters for telling the service how to chunk the file. inspired by google3/cloud/ai/platform/extension/lib/retrieval/config/chunker_config.proto",
      "properties": {
        "whiteSpaceConfig": {
          "description": "White space chunking configuration.",
          "$ref": "WhiteSpaceConfig"
        }
      }
    },
    "GoogleAiGenerativelanguageV1betaSegment": {
      "description": "Segment of the content.",
      "properties": {
        "partIndex": {
          "description": "The index of a Part object within its parent Content object.",
          "format": "int32",
          "type": "integer"
        },
        "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."
        },
        "text": {
          "description": "The text corresponding to the segment from the response.",
          "type": "string"
        },
        "startIndex": {
          "type": "integer",
          "description": "Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero.",
          "format": "int32"
        }
      },
      "id": "GoogleAiGenerativelanguageV1betaSegment",
      "type": "object"
    },
    "CreateFileResponse": {
      "id": "CreateFileResponse",
      "description": "Response for `CreateFile`.",
      "properties": {
        "file": {
          "description": "Metadata for the created file.",
          "$ref": "File"
        }
      },
      "type": "object"
    },
    "SafetySetting": {
      "id": "SafetySetting",
      "description": "Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked.",
      "properties": {
        "category": {
          "description": "Required. The category for this setting.",
          "enumDeprecated": [
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            true
          ],
          "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"
          ],
          "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."
          ]
        },
        "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."
          ]
        }
      },
      "type": "object"
    },
    "VoiceConfig": {
      "id": "VoiceConfig",
      "description": "The configuration for the voice to use.",
      "properties": {
        "prebuiltVoiceConfig": {
          "description": "The configuration for the prebuilt voice to use.",
          "$ref": "PrebuiltVoiceConfig"
        }
      },
      "type": "object"
    },
    "PrebuiltVoiceConfig": {
      "description": "The configuration for the prebuilt speaker to use.",
      "properties": {
        "voiceName": {
          "type": "string",
          "description": "The name of the preset voice to use."
        }
      },
      "id": "PrebuiltVoiceConfig",
      "type": "object"
    },
    "Embedding": {
      "type": "object",
      "description": "A list of floats representing the embedding.",
      "properties": {
        "value": {
          "description": "The embedding values.",
          "type": "array",
          "items": {
            "type": "number",
            "format": "float"
          }
        }
      },
      "id": "Embedding"
    },
    "FileSearch": {
      "description": "The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API.",
      "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": {
          "type": "integer",
          "format": "int32",
          "description": "Optional. The number of semantic retrieval chunks to retrieve."
        },
        "metadataFilter": {
          "type": "string",
          "description": "Optional. Metadata filter to apply to the semantic retrieval documents and chunks."
        }
      },
      "id": "FileSearch",
      "type": "object"
    },
    "AttributionSourceId": {
      "id": "AttributionSourceId",
      "description": "Identifier for the source contributing to this attribution.",
      "properties": {
        "groundingPassage": {
          "description": "Identifier for an inline passage.",
          "$ref": "GroundingPassageId"
        },
        "semanticRetrieverChunk": {
          "$ref": "SemanticRetrieverChunk",
          "description": "Identifier for a `Chunk` fetched via Semantic Retriever."
        }
      },
      "type": "object"
    },
    "UsageMetadata": {
      "type": "object",
      "id": "UsageMetadata",
      "description": "Metadata on the generation request's token usage.",
      "properties": {
        "totalTokenCount": {
          "description": "Total token count for the generation request (prompt + response candidates).",
          "format": "int32",
          "type": "integer"
        },
        "candidatesTokenCount": {
          "format": "int32",
          "description": "Total number of tokens across all the generated response candidates.",
          "type": "integer"
        },
        "promptTokenCount": {
          "type": "integer",
          "format": "int32",
          "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."
        },
        "toolUsePromptTokenCount": {
          "readOnly": true,
          "format": "int32",
          "description": "Output only. Number of tokens present in tool-use prompt(s).",
          "type": "integer"
        },
        "toolUsePromptTokensDetails": {
          "readOnly": true,
          "description": "Output only. List of modalities that were processed for tool-use request inputs.",
          "type": "array",
          "items": {
            "$ref": "ModalityTokenCount"
          }
        },
        "candidatesTokensDetails": {
          "items": {
            "$ref": "ModalityTokenCount"
          },
          "type": "array",
          "description": "Output only. List of modalities that were returned in the response.",
          "readOnly": true
        },
        "promptTokensDetails": {
          "type": "array",
          "items": {
            "$ref": "ModalityTokenCount"
          },
          "readOnly": true,
          "description": "Output only. List of modalities that were processed in the request input."
        },
        "cacheTokensDetails": {
          "type": "array",
          "items": {
            "$ref": "ModalityTokenCount"
          },
          "readOnly": true,
          "description": "Output only. List of modalities of the cached content in the request input."
        },
        "cachedContentTokenCount": {
          "type": "integer",
          "description": "Number of tokens in the cached part of the prompt (the cached content)",
          "format": "int32"
        },
        "thoughtsTokenCount": {
          "description": "Output only. Number of tokens of thoughts for thinking models.",
          "readOnly": true,
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "MetadataFilter": {
      "type": "object",
      "description": "User provided filter to limit retrieval based on `Chunk` or `Document` level metadata values. Example (genre = drama OR genre = action): key = \"document.custom_metadata.genre\" conditions = [{string_value = \"drama\", operation = EQUAL}, {string_value = \"action\", operation = EQUAL}]",
      "properties": {
        "key": {
          "description": "Required. The key of the metadata to filter on.",
          "type": "string"
        },
        "conditions": {
          "items": {
            "$ref": "Condition"
          },
          "type": "array",
          "description": "Required. The `Condition`s for the given key that will trigger this filter. Multiple `Condition`s are joined by logical ORs."
        }
      },
      "id": "MetadataFilter"
    },
    "Message": {
      "description": "The base unit of structured text. A `Message` includes an `author` and the `content` of the `Message`. The `author` is used to tag messages when they are fed to the model as text.",
      "properties": {
        "author": {
          "type": "string",
          "description": "Optional. The author of this Message. This serves as a key for tagging the content of this Message when it is fed to the model as text. The author can be any alphanumeric string."
        },
        "citationMetadata": {
          "$ref": "CitationMetadata",
          "description": "Output only. Citation information for model-generated `content` in this `Message`. If this `Message` was generated as output from the model, this field may be populated with attribution information for any text included in the `content`. This field is used only on output.",
          "readOnly": true
        },
        "content": {
          "description": "Required. The text content of the structured `Message`.",
          "type": "string"
        }
      },
      "id": "Message",
      "type": "object"
    },
    "PredictResponse": {
      "type": "object",
      "id": "PredictResponse",
      "description": "Response message for [PredictionService.Predict].",
      "properties": {
        "predictions": {
          "items": {
            "type": "any"
          },
          "type": "array",
          "description": "The outputs of the prediction call."
        }
      }
    },
    "RetrievalMetadata": {
      "type": "object",
      "description": "Metadata related to retrieval in the grounding flow.",
      "properties": {
        "googleSearchDynamicRetrievalScore": {
          "type": "number",
          "format": "float",
          "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."
        }
      },
      "id": "RetrievalMetadata"
    },
    "CachedContentUsageMetadata": {
      "description": "Metadata on the usage of the cached content.",
      "properties": {
        "totalTokenCount": {
          "format": "int32",
          "description": "Total number of tokens that the cached content consumes.",
          "type": "integer"
        }
      },
      "id": "CachedContentUsageMetadata",
      "type": "object"
    },
    "EmbeddingUsageMetadata": {
      "type": "object",
      "description": "Metadata on the usage of the embedding request.",
      "properties": {
        "promptTokenCount": {
          "type": "integer",
          "readOnly": true,
          "format": "int32",
          "description": "Output only. Number of tokens in the prompt."
        },
        "promptTokenDetails": {
          "readOnly": true,
          "description": "Output only. List of modalities that were processed in the request input.",
          "type": "array",
          "items": {
            "$ref": "ModalityTokenCount"
          }
        }
      },
      "id": "EmbeddingUsageMetadata"
    },
    "GenerateContentResponse": {
      "id": "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`.",
      "properties": {
        "modelVersion": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. The model version used to generate the response."
        },
        "candidates": {
          "type": "array",
          "items": {
            "$ref": "Candidate"
          },
          "description": "Candidate responses from the model."
        },
        "modelStatus": {
          "$ref": "ModelStatus",
          "readOnly": true,
          "description": "Output only. The current model status of this model."
        },
        "promptFeedback": {
          "$ref": "PromptFeedback",
          "description": "Returns the prompt's feedback related to the content filters."
        },
        "usageMetadata": {
          "$ref": "UsageMetadata",
          "readOnly": true,
          "description": "Output only. Metadata on the generation requests' token usage."
        },
        "responseId": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. response_id is used to identify each response."
        }
      },
      "type": "object"
    },
    "CountTokensResponse": {
      "type": "object",
      "id": "CountTokensResponse",
      "description": "A response from `CountTokens`. It returns the model's `token_count` for the `prompt`.",
      "properties": {
        "cacheTokensDetails": {
          "items": {
            "$ref": "ModalityTokenCount"
          },
          "type": "array",
          "description": "Output only. List of modalities that were processed in the cached content.",
          "readOnly": true
        },
        "promptTokensDetails": {
          "items": {
            "$ref": "ModalityTokenCount"
          },
          "type": "array",
          "description": "Output only. List of modalities that were processed in the request input.",
          "readOnly": true
        },
        "totalTokens": {
          "description": "The number of tokens that the `Model` tokenizes the `prompt` into. Always non-negative.",
          "format": "int32",
          "type": "integer"
        },
        "cachedContentTokenCount": {
          "format": "int32",
          "description": "Number of tokens in the cached part of the prompt (the cached content).",
          "type": "integer"
        }
      }
    },
    "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.",
      "properties": {
        "retirementTime": {
          "type": "string",
          "format": "google-datetime",
          "description": "The time at which the model will be retired."
        },
        "modelStage": {
          "description": "The stage of the underlying model.",
          "type": "string",
          "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."
          ],
          "enumDeprecated": [
            false,
            true,
            false,
            false,
            false,
            false,
            true,
            false
          ],
          "enum": [
            "MODEL_STAGE_UNSPECIFIED",
            "UNSTABLE_EXPERIMENTAL",
            "EXPERIMENTAL",
            "PREVIEW",
            "STABLE",
            "LEGACY",
            "DEPRECATED",
            "RETIRED"
          ]
        },
        "message": {
          "description": "A message explaining the model status.",
          "type": "string"
        }
      },
      "id": "ModelStatus",
      "type": "object"
    },
    "ContentEmbedding": {
      "description": "A list of floats representing an embedding.",
      "properties": {
        "values": {
          "description": "The embedding values. This is for 3P users only and will not be populated for 1P calls.",
          "type": "array",
          "items": {
            "type": "number",
            "format": "float"
          }
        },
        "shape": {
          "description": "This field stores the soft tokens tensor frame shape (e.g. [1, 1, 256, 2048]).",
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "id": "ContentEmbedding",
      "type": "object"
    },
    "CodeExecutionResult": {
      "type": "object",
      "description": "Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id."
        },
        "output": {
          "type": "string",
          "description": "Optional. Contains stdout when code execution is successful, stderr or other description otherwise."
        },
        "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."
          ]
        }
      },
      "id": "CodeExecutionResult"
    },
    "Document": {
      "type": "object",
      "id": "Document",
      "description": "A `Document` is a collection of `Chunk`s.",
      "properties": {
        "displayName": {
          "description": "Optional. The human-readable display name for the `Document`. The display name must be no more than 512 characters in length, including spaces. Example: \"Semantic Retriever Documentation\"",
          "type": "string"
        },
        "updateTime": {
          "description": "Output only. The Timestamp of when the `Document` was last updated.",
          "readOnly": true,
          "format": "google-datetime",
          "type": "string"
        },
        "sizeBytes": {
          "description": "Output only. The size of raw bytes ingested into the Document.",
          "readOnly": true,
          "format": "int64",
          "type": "string"
        },
        "name": {
          "description": "Immutable. Identifier. The `Document` resource name. The ID (name excluding the \"fileSearchStores/*/documents/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be derived from `display_name` along with a 12 character random suffix. Example: `fileSearchStores/{file_search_store_id}/documents/my-awesome-doc-123a456b789c`",
          "type": "string"
        },
        "customMetadata": {
          "type": "array",
          "items": {
            "$ref": "CustomMetadata"
          },
          "description": "Optional. User provided custom metadata stored as key-value pairs used for querying. A `Document` can have a maximum of 20 `CustomMetadata`."
        },
        "state": {
          "readOnly": true,
          "description": "Output only. Current state of the `Document`.",
          "enum": [
            "STATE_UNSPECIFIED",
            "STATE_PENDING",
            "STATE_ACTIVE",
            "STATE_FAILED"
          ],
          "type": "string",
          "enumDescriptions": [
            "The default value. This value is used if the state is omitted.",
            "Some `Chunks` of the `Document` are being processed (embedding and vector storage).",
            "All `Chunks` of the `Document` is processed and available for querying.",
            "Some `Chunks` of the `Document` failed processing."
          ]
        },
        "mimeType": {
          "description": "Output only. The mime type of the Document.",
          "readOnly": true,
          "type": "string"
        },
        "createTime": {
          "readOnly": true,
          "format": "google-datetime",
          "description": "Output only. The Timestamp of when the `Document` was created.",
          "type": "string"
        }
      }
    },
    "Status": {
      "type": "object",
      "id": "Status",
      "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).",
      "properties": {
        "code": {
          "type": "integer",
          "description": "The status code, which should be an enum value of google.rpc.Code.",
          "format": "int32"
        },
        "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": {
            "additionalProperties": {
              "type": "any",
              "description": "Properties of the object. Contains field @type with type URL."
            },
            "type": "object"
          }
        },
        "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"
        }
      }
    },
    "GoogleSearch": {
      "type": "object",
      "id": "GoogleSearch",
      "description": "GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.",
      "properties": {
        "timeRangeFilter": {
          "$ref": "Interval",
          "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)."
        },
        "searchTypes": {
          "description": "Optional. The set of search types to enable. If not set, web search is enabled by default.",
          "$ref": "SearchTypes"
        }
      }
    },
    "BatchGenerateContentRequest": {
      "type": "object",
      "description": "Request for a `BatchGenerateContent` operation.",
      "properties": {
        "batch": {
          "description": "Required. The batch to create.",
          "$ref": "GenerateContentBatch"
        }
      },
      "id": "BatchGenerateContentRequest"
    },
    "BatchStats": {
      "description": "Stats about the batch.",
      "properties": {
        "requestCount": {
          "type": "string",
          "readOnly": true,
          "format": "int64",
          "description": "Output only. The number of requests in the batch."
        },
        "successfulRequestCount": {
          "readOnly": true,
          "format": "int64",
          "description": "Output only. The number of requests that were successfully processed.",
          "type": "string"
        },
        "failedRequestCount": {
          "type": "string",
          "description": "Output only. The number of requests that failed to be processed.",
          "readOnly": true,
          "format": "int64"
        },
        "pendingRequestCount": {
          "type": "string",
          "description": "Output only. The number of requests that are still pending processing.",
          "readOnly": true,
          "format": "int64"
        }
      },
      "id": "BatchStats",
      "type": "object"
    },
    "GroundingChunkCustomMetadata": {
      "description": "User provided metadata about the GroundingFact.",
      "properties": {
        "stringValue": {
          "type": "string",
          "description": "Optional. The string value of the metadata."
        },
        "numericValue": {
          "type": "number",
          "format": "float",
          "description": "Optional. The numeric value of the metadata. The expected range for this value depends on the specific `key` used."
        },
        "stringListValue": {
          "$ref": "GroundingChunkStringList",
          "description": "Optional. A list of string values for the metadata."
        },
        "key": {
          "description": "The key of the metadata.",
          "type": "string"
        }
      },
      "id": "GroundingChunkCustomMetadata",
      "type": "object"
    },
    "Corpus": {
      "type": "object",
      "id": "Corpus",
      "description": "A `Corpus` is a collection of `Document`s. A project can create up to 10 corpora.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Output only. Immutable. Identifier. The `Corpus` resource name. The ID (name excluding the \"corpora/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be derived from `display_name` along with a 12 character random suffix. Example: `corpora/my-awesome-corpora-123a456b789c`",
          "readOnly": true
        },
        "displayName": {
          "type": "string",
          "description": "Optional. The human-readable display name for the `Corpus`. The display name must be no more than 512 characters in length, including spaces. Example: \"Docs on Semantic Retriever\""
        },
        "createTime": {
          "description": "Output only. The Timestamp of when the `Corpus` was created.",
          "readOnly": true,
          "format": "google-datetime",
          "type": "string"
        },
        "updateTime": {
          "type": "string",
          "readOnly": true,
          "format": "google-datetime",
          "description": "Output only. The Timestamp of when the `Corpus` was last updated."
        }
      }
    },
    "CountTextTokensRequest": {
      "type": "object",
      "id": "CountTextTokensRequest",
      "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`.",
      "properties": {
        "prompt": {
          "description": "Required. The free-form input text given to the model as a prompt.",
          "$ref": "TextPrompt"
        }
      }
    },
    "AsyncBatchEmbedContentRequest": {
      "id": "AsyncBatchEmbedContentRequest",
      "description": "Request for an `AsyncBatchEmbedContent` operation.",
      "properties": {
        "batch": {
          "description": "Required. The batch to create.",
          "$ref": "EmbedContentBatch"
        }
      },
      "type": "object"
    },
    "SemanticRetrieverChunk": {
      "description": "Identifier for a `Chunk` retrieved via Semantic Retriever specified in the `GenerateAnswerRequest` using `SemanticRetrieverConfig`.",
      "properties": {
        "source": {
          "type": "string",
          "description": "Output only. Name of the source matching the request's `SemanticRetrieverConfig.source`. Example: `corpora/123` or `corpora/123/documents/abc`",
          "readOnly": true
        },
        "chunk": {
          "type": "string",
          "description": "Output only. Name of the `Chunk` containing the attributed text. Example: `corpora/123/documents/abc/chunks/xyz`",
          "readOnly": true
        }
      },
      "id": "SemanticRetrieverChunk",
      "type": "object"
    },
    "FunctionDeclaration": {
      "type": "object",
      "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.",
      "properties": {
        "responseJsonSchema": {
          "description": "Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.",
          "type": "any"
        },
        "name": {
          "type": "string",
          "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."
        },
        "parametersJsonSchema": {
          "description": "Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { \"type\": \"object\", \"properties\": { \"name\": { \"type\": \"string\" }, \"age\": { \"type\": \"integer\" } }, \"additionalProperties\": false, \"required\": [\"name\", \"age\"], \"propertyOrdering\": [\"name\", \"age\"] } ``` This field is mutually exclusive with `parameters`.",
          "type": "any"
        },
        "description": {
          "type": "string",
          "description": "Required. A brief description of the function."
        },
        "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"
        },
        "response": {
          "$ref": "Schema",
          "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."
        },
        "behavior": {
          "type": "string",
          "enumDescriptions": [
            "This value is unused.",
            "If set, the system will wait to receive the function response before continuing the conversation.",
            "If set, the system will not wait to receive the function response. Instead, it will attempt to handle function responses as they become available while maintaining the conversation between the user and the model."
          ],
          "enum": [
            "UNSPECIFIED",
            "BLOCKING",
            "NON_BLOCKING"
          ],
          "description": "Optional. Specifies the function Behavior. Currently only supported by the BidiGenerateContent method."
        }
      },
      "id": "FunctionDeclaration"
    },
    "FunctionResponseBlob": {
      "type": "object",
      "id": "FunctionResponseBlob",
      "description": "Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field.",
      "properties": {
        "data": {
          "format": "byte",
          "description": "Raw bytes for media formats.",
          "type": "string"
        },
        "mimeType": {
          "type": "string",
          "description": "The IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see [Supported file formats](https://ai.google.dev/gemini-api/docs/prompting_with_media#supported_file_formats)."
        }
      }
    },
    "Image": {
      "type": "object",
      "description": "Chunk from image search.",
      "properties": {
        "imageUri": {
          "type": "string",
          "description": "The image asset URL."
        },
        "title": {
          "description": "The title of the web page that the image is from.",
          "type": "string"
        },
        "sourceUri": {
          "type": "string",
          "description": "The web page URI for attribution."
        },
        "domain": {
          "description": "The root domain of the web page that the image is from, e.g. \"example.com\".",
          "type": "string"
        }
      },
      "id": "Image"
    },
    "CreateFileRequest": {
      "type": "object",
      "description": "Request for `CreateFile`.",
      "properties": {
        "file": {
          "$ref": "File",
          "description": "Optional. Metadata for the file to create."
        }
      },
      "id": "CreateFileRequest"
    },
    "GenerateContentRequest": {
      "description": "Request to generate a completion from the model.",
      "properties": {
        "generationConfig": {
          "description": "Optional. Configuration options for model generation and outputs.",
          "$ref": "GenerationConfig"
        },
        "store": {
          "type": "boolean",
          "description": "Optional. Configures the logging behavior for a given request. If set, it takes precedence over the project-level logging config."
        },
        "contents": {
          "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.",
          "items": {
            "$ref": "Content"
          },
          "type": "array"
        },
        "systemInstruction": {
          "description": "Optional. Developer set [system instruction(s)](https://ai.google.dev/gemini-api/docs/system-instructions). Currently, text only.",
          "$ref": "Content"
        },
        "tools": {
          "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.",
          "items": {
            "$ref": "Tool"
          },
          "type": "array"
        },
        "cachedContent": {
          "type": "string",
          "description": "Optional. The name of the content [cached](https://ai.google.dev/gemini-api/docs/caching) to use as context to serve the prediction. Format: `cachedContents/{cachedContent}`"
        },
        "model": {
          "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
          "type": "string"
        },
        "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": {
          "enum": [
            "unspecified",
            "standard",
            "flex",
            "priority"
          ],
          "description": "Optional. The service tier of the request.",
          "type": "string",
          "enumDescriptions": [
            "Default service tier, which is standard.",
            "Standard service tier.",
            "Flex service tier.",
            "Priority service tier."
          ]
        },
        "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 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"
        }
      },
      "id": "GenerateContentRequest",
      "type": "object"
    },
    "InlinedEmbedContentRequest": {
      "type": "object",
      "description": "The request to be processed in the batch.",
      "properties": {
        "request": {
          "$ref": "EmbedContentRequest",
          "description": "Required. The request to be processed in the batch."
        },
        "metadata": {
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          },
          "type": "object",
          "description": "Optional. The metadata to be associated with the request."
        }
      },
      "id": "InlinedEmbedContentRequest"
    },
    "Candidate": {
      "type": "object",
      "description": "A response candidate generated from the model.",
      "properties": {
        "finishReason": {
          "readOnly": true,
          "description": "Optional. Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating tokens.",
          "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"
          ],
          "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."
          ]
        },
        "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.",
          "readOnly": true,
          "$ref": "CitationMetadata"
        },
        "avgLogprobs": {
          "description": "Output only. Average log probability score of the candidate.",
          "readOnly": true,
          "format": "double",
          "type": "number"
        },
        "safetyRatings": {
          "items": {
            "$ref": "SafetyRating"
          },
          "type": "array",
          "description": "List of ratings for the safety of a response candidate. There is at most one rating per category."
        },
        "index": {
          "readOnly": true,
          "format": "int32",
          "description": "Output only. Index of the candidate in the list of response candidates.",
          "type": "integer"
        },
        "tokenCount": {
          "type": "integer",
          "readOnly": true,
          "format": "int32",
          "description": "Output only. Token count for this candidate."
        },
        "urlContextMetadata": {
          "description": "Output only. Metadata related to url context retrieval tool.",
          "readOnly": true,
          "$ref": "UrlContextMetadata"
        },
        "groundingMetadata": {
          "$ref": "GroundingMetadata",
          "description": "Output only. Grounding metadata for the candidate. This field is populated for `GenerateContent` calls.",
          "readOnly": true
        },
        "content": {
          "readOnly": true,
          "description": "Output only. Generated content returned from the model.",
          "$ref": "Content"
        },
        "finishMessage": {
          "readOnly": true,
          "description": "Optional. Output only. Details the reason why the model stopped generating tokens. This is populated only when `finish_reason` is set.",
          "type": "string"
        },
        "groundingAttributions": {
          "readOnly": true,
          "description": "Output only. Attribution information for sources that contributed to a grounded answer. This field is populated for `GenerateAnswer` calls.",
          "type": "array",
          "items": {
            "$ref": "GroundingAttribution"
          }
        },
        "logprobsResult": {
          "$ref": "LogprobsResult",
          "readOnly": true,
          "description": "Output only. Log-likelihood scores for the response tokens and top tokens"
        }
      },
      "id": "Candidate"
    },
    "Schema": {
      "id": "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).",
      "properties": {
        "maxLength": {
          "format": "int64",
          "description": "Optional. Maximum length of the Type.STRING",
          "type": "string"
        },
        "anyOf": {
          "items": {
            "$ref": "Schema"
          },
          "type": "array",
          "description": "Optional. The value should be validated against any (one or more) of the subschemas in the list."
        },
        "type": {
          "type": "string",
          "enumDescriptions": [
            "Not specified, should not be used.",
            "String type.",
            "Number type.",
            "Integer type.",
            "Boolean type.",
            "Array type.",
            "Object type.",
            "Null type."
          ],
          "description": "Required. Data type.",
          "enum": [
            "TYPE_UNSPECIFIED",
            "STRING",
            "NUMBER",
            "INTEGER",
            "BOOLEAN",
            "ARRAY",
            "OBJECT",
            "NULL"
          ]
        },
        "maxProperties": {
          "description": "Optional. Maximum number of the properties for Type.OBJECT.",
          "format": "int64",
          "type": "string"
        },
        "minLength": {
          "type": "string",
          "format": "int64",
          "description": "Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING"
        },
        "minProperties": {
          "type": "string",
          "format": "int64",
          "description": "Optional. Minimum number of the properties for Type.OBJECT."
        },
        "maxItems": {
          "format": "int64",
          "description": "Optional. Maximum number of the elements for Type.ARRAY.",
          "type": "string"
        },
        "default": {
          "type": "any",
          "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."
        },
        "properties": {
          "description": "Optional. Properties of Type.OBJECT.",
          "additionalProperties": {
            "$ref": "Schema"
          },
          "type": "object"
        },
        "example": {
          "description": "Optional. Example of the object. Will only populated when the object is the root.",
          "type": "any"
        },
        "format": {
          "type": "string",
          "description": "Optional. The format of the data. Any value is allowed, but most do not trigger any special functionality."
        },
        "minItems": {
          "format": "int64",
          "description": "Optional. Minimum number of the elements for Type.ARRAY.",
          "type": "string"
        },
        "nullable": {
          "type": "boolean",
          "description": "Optional. Indicates if the value may be null."
        },
        "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\"]}",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "items": {
          "$ref": "Schema",
          "description": "Optional. Schema of the elements of Type.ARRAY."
        },
        "pattern": {
          "description": "Optional. Pattern of the Type.STRING to restrict a string to a regular expression.",
          "type": "string"
        },
        "description": {
          "type": "string",
          "description": "Optional. A brief description of the parameter. This could contain examples of use. Parameter description may be formatted as Markdown."
        },
        "minimum": {
          "type": "number",
          "description": "Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER",
          "format": "double"
        },
        "maximum": {
          "description": "Optional. Maximum value of the Type.INTEGER and Type.NUMBER",
          "format": "double",
          "type": "number"
        },
        "propertyOrdering": {
          "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.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "title": {
          "type": "string",
          "description": "Optional. The title of the schema."
        },
        "required": {
          "description": "Optional. Required properties of Type.OBJECT.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "type": "object"
    },
    "GenerateMessageResponse": {
      "id": "GenerateMessageResponse",
      "description": "The response from the model. This includes candidate messages and conversation history in the form of chronologically-ordered messages.",
      "properties": {
        "messages": {
          "type": "array",
          "items": {
            "$ref": "Message"
          },
          "description": "The conversation history used by the model."
        },
        "filters": {
          "items": {
            "$ref": "ContentFilter"
          },
          "type": "array",
          "description": "A set of content filtering metadata for the prompt and response text. This indicates which `SafetyCategory`(s) blocked a candidate from this response, the lowest `HarmProbability` that triggered a block, and the HarmThreshold setting for that category."
        },
        "candidates": {
          "items": {
            "$ref": "Message"
          },
          "type": "array",
          "description": "Candidate response messages from the model."
        }
      },
      "type": "object"
    },
    "ListTunedModelsResponse": {
      "type": "object",
      "description": "Response from `ListTunedModels` containing a paginated list of Models.",
      "properties": {
        "tunedModels": {
          "type": "array",
          "items": {
            "$ref": "TunedModel"
          },
          "description": "The returned Models."
        },
        "nextPageToken": {
          "type": "string",
          "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."
        }
      },
      "id": "ListTunedModelsResponse"
    },
    "SafetyFeedback": {
      "description": "Safety feedback for an entire request. This field is populated if content in the input and/or response is blocked due to safety settings. SafetyFeedback may not exist for every HarmCategory. Each SafetyFeedback will return the safety settings used by the request as well as the lowest HarmProbability that should be allowed in order to return a result.",
      "properties": {
        "rating": {
          "$ref": "SafetyRating",
          "description": "Safety rating evaluated from content."
        },
        "setting": {
          "$ref": "SafetySetting",
          "description": "Safety settings applied to the request."
        }
      },
      "id": "SafetyFeedback",
      "type": "object"
    },
    "GroundingPassages": {
      "id": "GroundingPassages",
      "description": "A repeated list of passages.",
      "properties": {
        "passages": {
          "description": "List of passages.",
          "items": {
            "$ref": "GroundingPassage"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "Example": {
      "description": "An input/output example used to instruct the Model. It demonstrates how the model should respond or format its response.",
      "properties": {
        "input": {
          "description": "Required. An example of an input `Message` from the user.",
          "$ref": "Message"
        },
        "output": {
          "$ref": "Message",
          "description": "Required. An example of what the model should output given the input."
        }
      },
      "id": "Example",
      "type": "object"
    },
    "Part": {
      "type": "object",
      "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.",
      "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": {
          "$ref": "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."
        },
        "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.",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          },
          "type": "object"
        },
        "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"
        },
        "thoughtSignature": {
          "description": "Optional. An opaque signature for the thought so it can be reused in subsequent requests.",
          "format": "byte",
          "type": "string"
        },
        "codeExecutionResult": {
          "description": "Result of executing the `ExecutableCode`.",
          "$ref": "CodeExecutionResult"
        },
        "toolCall": {
          "$ref": "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."
        },
        "fileData": {
          "$ref": "FileData",
          "description": "URI based data."
        },
        "text": {
          "type": "string",
          "description": "Inline text."
        },
        "executableCode": {
          "description": "Code generated by the model that is meant to be executed.",
          "$ref": "ExecutableCode"
        },
        "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"
        },
        "inlineData": {
          "description": "Inline media bytes.",
          "$ref": "Blob"
        },
        "thought": {
          "type": "boolean",
          "description": "Optional. Indicates if the part is thought from the model."
        },
        "mediaResolution": {
          "description": "Optional. Media resolution for the input media.",
          "$ref": "MediaResolution"
        }
      },
      "id": "Part"
    },
    "ReviewSnippet": {
      "id": "ReviewSnippet",
      "description": "Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.",
      "properties": {
        "reviewId": {
          "type": "string",
          "description": "The ID of the review snippet."
        },
        "googleMapsUri": {
          "description": "A link that corresponds to the user review on Google Maps.",
          "type": "string"
        },
        "title": {
          "type": "string",
          "description": "Title of the review."
        }
      },
      "type": "object"
    },
    "UploadToFileSearchStoreRequest": {
      "type": "object",
      "description": "Request for `UploadToFileSearchStore`.",
      "properties": {
        "displayName": {
          "description": "Optional. Display name of the created document.",
          "type": "string"
        },
        "customMetadata": {
          "type": "array",
          "items": {
            "$ref": "CustomMetadata"
          },
          "description": "Custom metadata to be associated with the data."
        },
        "mimeType": {
          "description": "Optional. MIME type of the data. If not provided, it will be inferred from the uploaded content.",
          "type": "string"
        },
        "chunkingConfig": {
          "description": "Optional. Config for telling the service how to chunk the data. If not provided, the service will use default parameters.",
          "$ref": "ChunkingConfig"
        }
      },
      "id": "UploadToFileSearchStoreRequest"
    },
    "CitationMetadata": {
      "type": "object",
      "id": "CitationMetadata",
      "description": "A collection of source attributions for a piece of content.",
      "properties": {
        "citationSources": {
          "description": "Citations to sources for a specific response.",
          "items": {
            "$ref": "CitationSource"
          },
          "type": "array"
        }
      }
    },
    "RegisterFilesRequest": {
      "type": "object",
      "description": "Request for `RegisterFiles`.",
      "properties": {
        "uris": {
          "description": "Required. The Google Cloud Storage URIs to register. Example: `gs://bucket/object`.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "id": "RegisterFilesRequest"
    },
    "GenerateTextRequest": {
      "id": "GenerateTextRequest",
      "description": "Request to generate a text completion response from the model.",
      "properties": {
        "safetySettings": {
          "description": "Optional. A list of unique `SafetySetting` instances for blocking unsafe content. that will be enforced on the `GenerateTextRequest.prompt` and `GenerateTextResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type. The API will block any prompts 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_DEROGATORY, HARM_CATEGORY_TOXICITY, HARM_CATEGORY_VIOLENCE, HARM_CATEGORY_SEXUAL, HARM_CATEGORY_MEDICAL, HARM_CATEGORY_DANGEROUS are supported in text service.",
          "items": {
            "$ref": "SafetySetting"
          },
          "type": "array"
        },
        "candidateCount": {
          "type": "integer",
          "format": "int32",
          "description": "Optional. Number of generated responses to return. This value must be between [1, 8], inclusive. If unset, this will default to 1."
        },
        "topK": {
          "description": "Optional. The maximum number of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Top-k sampling considers the set of `top_k` most probable tokens. Defaults to 40. Note: The default value varies by model, see the `Model.top_k` attribute of the `Model` returned the `getModel` function.",
          "format": "int32",
          "type": "integer"
        },
        "stopSequences": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "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."
        },
        "prompt": {
          "description": "Required. The free-form input text given to the model as a prompt. Given a prompt, the model will generate a TextCompletion response it predicts as the completion of the input text.",
          "$ref": "TextPrompt"
        },
        "temperature": {
          "description": "Optional. Controls the randomness of the output. Note: The default value varies by model, see the `Model.temperature` attribute of the `Model` returned the `getModel` function. Values can range from [0.0,1.0], inclusive. A value closer to 1.0 will produce responses that are more varied and creative, while a value closer to 0.0 will typically result in more straightforward responses from the model.",
          "format": "float",
          "type": "number"
        },
        "maxOutputTokens": {
          "format": "int32",
          "description": "Optional. The maximum number of tokens to include in a candidate. If unset, this will default to output_token_limit specified in the `Model` specification.",
          "type": "integer"
        },
        "topP": {
          "type": "number",
          "description": "Optional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and 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 number of tokens based on the cumulative probability. Note: The default value varies by model, see the `Model.top_p` attribute of the `Model` returned the `getModel` function.",
          "format": "float"
        }
      },
      "type": "object"
    },
    "ModalityTokenCount": {
      "id": "ModalityTokenCount",
      "description": "Represents token counting info for a single modality.",
      "properties": {
        "tokenCount": {
          "description": "Number of tokens.",
          "format": "int32",
          "type": "integer"
        },
        "modality": {
          "type": "string",
          "enumDescriptions": [
            "Unspecified modality.",
            "Plain text.",
            "Image.",
            "Video.",
            "Audio.",
            "Document, e.g. PDF."
          ],
          "enum": [
            "MODALITY_UNSPECIFIED",
            "TEXT",
            "IMAGE",
            "VIDEO",
            "AUDIO",
            "DOCUMENT"
          ],
          "description": "The modality associated with this token count."
        }
      },
      "type": "object"
    }
  },
  "version_module": true,
  "name": "generativelanguage",
  "fullyEncodeReservedExpansion": true,
  "ownerName": "Google",
  "icons": {
    "x32": "http://www.google.com/images/icons/product/search-32.gif",
    "x16": "http://www.google.com/images/icons/product/search-16.gif"
  },
  "ownerDomain": "google.com",
  "documentationLink": "https://developers.generativeai.google/api",
  "protocol": "rest",
  "baseUrl": "https://generativelanguage.googleapis.com/",
  "resources": {
    "fileSearchStores": {
      "methods": {
        "create": {
          "parameters": {},
          "parameterOrder": [],
          "response": {
            "$ref": "FileSearchStore"
          },
          "description": "Creates an empty `FileSearchStore`.",
          "id": "generativelanguage.fileSearchStores.create",
          "path": "v1beta/fileSearchStores",
          "httpMethod": "POST",
          "flatPath": "v1beta/fileSearchStores",
          "request": {
            "$ref": "FileSearchStore"
          }
        },
        "list": {
          "flatPath": "v1beta/fileSearchStores",
          "path": "v1beta/fileSearchStores",
          "httpMethod": "GET",
          "parameters": {
            "pageToken": {
              "type": "string",
              "description": "Optional. A page token, received from a previous `ListFileSearchStores` call. Provide the `next_page_token` returned in the response as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListFileSearchStores` must match the call that provided the page token.",
              "location": "query"
            },
            "pageSize": {
              "type": "integer",
              "description": "Optional. The maximum number of `FileSearchStores` to return (per page). The service may return fewer `FileSearchStores`. If unspecified, at most 10 `FileSearchStores` will be returned. The maximum size limit is 20 `FileSearchStores` per page.",
              "location": "query",
              "format": "int32"
            }
          },
          "parameterOrder": [],
          "response": {
            "$ref": "ListFileSearchStoresResponse"
          },
          "description": "Lists all `FileSearchStores` owned by the user.",
          "id": "generativelanguage.fileSearchStores.list"
        },
        "importFile": {
          "request": {
            "$ref": "ImportFileRequest"
          },
          "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}:importFile",
          "path": "v1beta/{+fileSearchStoreName}:importFile",
          "httpMethod": "POST",
          "scopes": [
            "https://www.googleapis.com/auth/devstorage.read_only"
          ],
          "id": "generativelanguage.fileSearchStores.importFile",
          "parameters": {
            "fileSearchStoreName": {
              "required": true,
              "description": "Required. Immutable. The name of the `FileSearchStore` to import the file into. Example: `fileSearchStores/my-file-search-store-123`",
              "location": "path",
              "pattern": "^fileSearchStores/[^/]+$",
              "type": "string"
            }
          },
          "parameterOrder": [
            "fileSearchStoreName"
          ],
          "response": {
            "$ref": "Operation"
          },
          "description": "Imports a `File` from File Service to a `FileSearchStore`."
        },
        "delete": {
          "id": "generativelanguage.fileSearchStores.delete",
          "path": "v1beta/{+name}",
          "httpMethod": "DELETE",
          "parameters": {
            "name": {
              "required": true,
              "description": "Required. The resource name of the `FileSearchStore`. Example: `fileSearchStores/my-file-search-store-123`",
              "location": "path",
              "pattern": "^fileSearchStores/[^/]+$",
              "type": "string"
            },
            "force": {
              "description": "Optional. If set to true, any `Document`s and objects related to this `FileSearchStore` will also be deleted. If false (the default), a `FAILED_PRECONDITION` error will be returned if `FileSearchStore` contains any `Document`s.",
              "location": "query",
              "type": "boolean"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "Empty"
          },
          "description": "Deletes a `FileSearchStore`.",
          "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}"
        },
        "get": {
          "id": "generativelanguage.fileSearchStores.get",
          "path": "v1beta/{+name}",
          "httpMethod": "GET",
          "parameters": {
            "name": {
              "type": "string",
              "pattern": "^fileSearchStores/[^/]+$",
              "description": "Required. The name of the `FileSearchStore`. Example: `fileSearchStores/my-file-search-store-123`",
              "location": "path",
              "required": true
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "FileSearchStore"
          },
          "description": "Gets information about a specific `FileSearchStore`.",
          "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}"
        }
      },
      "resources": {
        "operations": {
          "methods": {
            "get": {
              "path": "v1beta/{+name}",
              "httpMethod": "GET",
              "parameters": {
                "name": {
                  "type": "string",
                  "pattern": "^fileSearchStores/[^/]+/operations/[^/]+$",
                  "required": true,
                  "description": "The name of the operation resource.",
                  "location": "path"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Operation"
              },
              "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.",
              "id": "generativelanguage.fileSearchStores.operations.get",
              "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}/operations/{operationsId}"
            }
          }
        },
        "documents": {
          "methods": {
            "list": {
              "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}/documents",
              "path": "v1beta/{+parent}/documents",
              "httpMethod": "GET",
              "parameters": {
                "pageToken": {
                  "type": "string",
                  "description": "Optional. A page token, received from a previous `ListDocuments` call. Provide the `next_page_token` returned in the response as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListDocuments` must match the call that provided the page token.",
                  "location": "query"
                },
                "parent": {
                  "required": true,
                  "description": "Required. The name of the `FileSearchStore` containing `Document`s. Example: `fileSearchStores/my-file-search-store-123`",
                  "location": "path",
                  "pattern": "^fileSearchStores/[^/]+$",
                  "type": "string"
                },
                "pageSize": {
                  "type": "integer",
                  "format": "int32",
                  "description": "Optional. The maximum number of `Document`s to return (per page). The service may return fewer `Document`s. If unspecified, at most 10 `Document`s will be returned. The maximum size limit is 20 `Document`s per page.",
                  "location": "query"
                }
              },
              "parameterOrder": [
                "parent"
              ],
              "response": {
                "$ref": "ListDocumentsResponse"
              },
              "description": "Lists all `Document`s in a `Corpus`.",
              "id": "generativelanguage.fileSearchStores.documents.list"
            },
            "get": {
              "id": "generativelanguage.fileSearchStores.documents.get",
              "path": "v1beta/{+name}",
              "httpMethod": "GET",
              "parameters": {
                "name": {
                  "pattern": "^fileSearchStores/[^/]+/documents/[^/]+$",
                  "type": "string",
                  "required": true,
                  "description": "Required. The name of the `Document` to retrieve. Example: `fileSearchStores/my-file-search-store-123/documents/the-doc-abc`",
                  "location": "path"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Document"
              },
              "description": "Gets information about a specific `Document`.",
              "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}/documents/{documentsId}"
            },
            "delete": {
              "id": "generativelanguage.fileSearchStores.documents.delete",
              "path": "v1beta/{+name}",
              "httpMethod": "DELETE",
              "parameters": {
                "name": {
                  "pattern": "^fileSearchStores/[^/]+/documents/[^/]+$",
                  "type": "string",
                  "description": "Required. The resource name of the `Document` to delete. Example: `fileSearchStores/my-file-search-store-123/documents/the-doc-abc`",
                  "location": "path",
                  "required": true
                },
                "force": {
                  "type": "boolean",
                  "description": "Optional. If set to true, any `Chunk`s and objects related to this `Document` will also be deleted. If false (the default), a `FAILED_PRECONDITION` error will be returned if `Document` contains any `Chunk`s.",
                  "location": "query"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Empty"
              },
              "description": "Deletes a `Document`.",
              "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}/documents/{documentsId}"
            }
          }
        },
        "upload": {
          "resources": {
            "operations": {
              "methods": {
                "get": {
                  "path": "v1beta/{+name}",
                  "httpMethod": "GET",
                  "parameters": {
                    "name": {
                      "pattern": "^fileSearchStores/[^/]+/upload/operations/[^/]+$",
                      "type": "string",
                      "required": true,
                      "description": "The name of the operation resource.",
                      "location": "path"
                    }
                  },
                  "parameterOrder": [
                    "name"
                  ],
                  "response": {
                    "$ref": "Operation"
                  },
                  "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.",
                  "id": "generativelanguage.fileSearchStores.upload.operations.get",
                  "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}/upload/operations/{operationsId}"
                }
              }
            }
          }
        }
      }
    },
    "batches": {
      "methods": {
        "cancel": {
          "path": "v1beta/{+name}:cancel",
          "httpMethod": "POST",
          "parameters": {
            "name": {
              "description": "The name of the operation resource to be cancelled.",
              "location": "path",
              "required": true,
              "pattern": "^batches/[^/]+$",
              "type": "string"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "Empty"
          },
          "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.batches.cancel",
          "flatPath": "v1beta/batches/{batchesId}:cancel"
        },
        "delete": {
          "flatPath": "v1beta/batches/{batchesId}",
          "id": "generativelanguage.batches.delete",
          "path": "v1beta/{+name}",
          "httpMethod": "DELETE",
          "parameters": {
            "name": {
              "description": "The name of the operation resource to be deleted.",
              "location": "path",
              "required": true,
              "type": "string",
              "pattern": "^batches/[^/]+$"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "Empty"
          },
          "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`."
        },
        "list": {
          "id": "generativelanguage.batches.list",
          "path": "v1beta/{+name}",
          "httpMethod": "GET",
          "parameters": {
            "name": {
              "pattern": "^batches$",
              "type": "string",
              "required": true,
              "description": "The name of the operation's parent resource.",
              "location": "path"
            },
            "pageSize": {
              "type": "integer",
              "format": "int32",
              "description": "The standard list page size.",
              "location": "query"
            },
            "filter": {
              "type": "string",
              "description": "The standard list filter.",
              "location": "query"
            },
            "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"
            },
            "pageToken": {
              "description": "The standard list page token.",
              "location": "query",
              "type": "string"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "ListOperationsResponse"
          },
          "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.",
          "flatPath": "v1beta/batches"
        },
        "updateGenerateContentBatch": {
          "parameters": {
            "updateMask": {
              "description": "Optional. The list of fields to update.",
              "location": "query",
              "format": "google-fieldmask",
              "type": "string"
            },
            "name": {
              "pattern": "^batches/[^/]+$",
              "type": "string",
              "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`.",
              "location": "path",
              "required": true
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "GenerateContentBatch"
          },
          "description": "Updates a batch of GenerateContent requests for batch processing.",
          "id": "generativelanguage.batches.updateGenerateContentBatch",
          "path": "v1beta/{+name}:updateGenerateContentBatch",
          "httpMethod": "PATCH",
          "request": {
            "$ref": "GenerateContentBatch"
          },
          "flatPath": "v1beta/batches/{batchesId}:updateGenerateContentBatch"
        },
        "updateEmbedContentBatch": {
          "flatPath": "v1beta/batches/{batchesId}:updateEmbedContentBatch",
          "request": {
            "$ref": "EmbedContentBatch"
          },
          "path": "v1beta/{+name}:updateEmbedContentBatch",
          "httpMethod": "PATCH",
          "id": "generativelanguage.batches.updateEmbedContentBatch",
          "parameters": {
            "name": {
              "pattern": "^batches/[^/]+$",
              "type": "string",
              "required": true,
              "description": "Output only. Identifier. Resource name of the batch. Format: `batches/{batch_id}`.",
              "location": "path"
            },
            "updateMask": {
              "format": "google-fieldmask",
              "description": "Optional. The list of fields to update.",
              "location": "query",
              "type": "string"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "EmbedContentBatch"
          },
          "description": "Updates a batch of EmbedContent requests for batch processing."
        },
        "get": {
          "path": "v1beta/{+name}",
          "httpMethod": "GET",
          "parameters": {
            "name": {
              "type": "string",
              "pattern": "^batches/[^/]+$",
              "required": true,
              "description": "The name of the operation resource.",
              "location": "path"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "Operation"
          },
          "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.",
          "id": "generativelanguage.batches.get",
          "flatPath": "v1beta/batches/{batchesId}"
        }
      }
    },
    "media": {
      "methods": {
        "upload": {
          "scopes": [
            "https://www.googleapis.com/auth/devstorage.read_only"
          ],
          "supportsMediaUpload": true,
          "id": "generativelanguage.media.upload",
          "parameters": {},
          "parameterOrder": [],
          "response": {
            "$ref": "CreateFileResponse"
          },
          "description": "Creates a `File`.",
          "request": {
            "$ref": "CreateFileRequest"
          },
          "flatPath": "v1beta/files",
          "path": "v1beta/files",
          "httpMethod": "POST",
          "mediaUpload": {
            "accept": [
              "*/*"
            ],
            "maxSize": "2147483648",
            "protocols": {
              "resumable": {
                "multipart": true,
                "path": "/resumable/upload/v1beta/files"
              },
              "simple": {
                "multipart": true,
                "path": "/upload/v1beta/files"
              }
            }
          }
        },
        "uploadToFileSearchStore": {
          "scopes": [
            "https://www.googleapis.com/auth/devstorage.read_only"
          ],
          "id": "generativelanguage.media.uploadToFileSearchStore",
          "parameters": {
            "fileSearchStoreName": {
              "type": "string",
              "pattern": "^fileSearchStores/[^/]+$",
              "description": "Required. Immutable. The name of the `FileSearchStore` to upload the file into. Example: `fileSearchStores/my-file-search-store-123`",
              "location": "path",
              "required": true
            }
          },
          "parameterOrder": [
            "fileSearchStoreName"
          ],
          "response": {
            "$ref": "CustomLongRunningOperation"
          },
          "description": "Uploads data to a FileSearchStore, preprocesses and chunks before storing it in a FileSearchStore Document.",
          "supportsMediaUpload": true,
          "flatPath": "v1beta/fileSearchStores/{fileSearchStoresId}:uploadToFileSearchStore",
          "request": {
            "$ref": "UploadToFileSearchStoreRequest"
          },
          "path": "v1beta/{+fileSearchStoreName}:uploadToFileSearchStore",
          "httpMethod": "POST",
          "mediaUpload": {
            "accept": [
              "*/*"
            ],
            "maxSize": "104857600",
            "protocols": {
              "resumable": {
                "path": "/resumable/upload/v1beta/{+fileSearchStoreName}:uploadToFileSearchStore",
                "multipart": true
              },
              "simple": {
                "multipart": true,
                "path": "/upload/v1beta/{+fileSearchStoreName}:uploadToFileSearchStore"
              }
            }
          }
        }
      }
    },
    "models": {
      "methods": {
        "streamGenerateContent": {
          "request": {
            "$ref": "GenerateContentRequest"
          },
          "flatPath": "v1beta/models/{modelsId}:streamGenerateContent",
          "path": "v1beta/{+model}:streamGenerateContent",
          "httpMethod": "POST",
          "parameters": {
            "model": {
              "pattern": "^models/[^/]+$",
              "type": "string",
              "required": true,
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "location": "path"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "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.models.streamGenerateContent"
        },
        "embedContent": {
          "parameters": {
            "model": {
              "required": true,
              "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}`",
              "location": "path",
              "pattern": "^models/[^/]+$",
              "type": "string"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "EmbedContentResponse"
          },
          "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).",
          "id": "generativelanguage.models.embedContent",
          "flatPath": "v1beta/models/{modelsId}:embedContent",
          "request": {
            "$ref": "EmbedContentRequest"
          },
          "path": "v1beta/{+model}:embedContent",
          "httpMethod": "POST"
        },
        "countTokens": {
          "request": {
            "$ref": "CountTokensRequest"
          },
          "flatPath": "v1beta/models/{modelsId}:countTokens",
          "path": "v1beta/{+model}:countTokens",
          "httpMethod": "POST",
          "id": "generativelanguage.models.countTokens",
          "parameters": {
            "model": {
              "type": "string",
              "pattern": "^models/[^/]+$",
              "required": true,
              "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}`",
              "location": "path"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "CountTokensResponse"
          },
          "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."
        },
        "countTextTokens": {
          "parameters": {
            "model": {
              "type": "string",
              "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}`",
              "location": "path",
              "required": true
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "CountTextTokensResponse"
          },
          "description": "Runs a model's tokenizer on a text and returns the token count.",
          "id": "generativelanguage.models.countTextTokens",
          "flatPath": "v1beta/models/{modelsId}:countTextTokens",
          "request": {
            "$ref": "CountTextTokensRequest"
          },
          "path": "v1beta/{+model}:countTextTokens",
          "httpMethod": "POST"
        },
        "batchEmbedContents": {
          "request": {
            "$ref": "BatchEmbedContentsRequest"
          },
          "flatPath": "v1beta/models/{modelsId}:batchEmbedContents",
          "path": "v1beta/{+model}:batchEmbedContents",
          "httpMethod": "POST",
          "parameters": {
            "model": {
              "type": "string",
              "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}`",
              "location": "path",
              "required": true
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "BatchEmbedContentsResponse"
          },
          "description": "Generates multiple embedding vectors from the input `Content` which consists of a batch of strings represented as `EmbedContentRequest` objects.",
          "id": "generativelanguage.models.batchEmbedContents"
        },
        "generateText": {
          "id": "generativelanguage.models.generateText",
          "parameters": {
            "model": {
              "required": true,
              "description": "Required. The name of the `Model` or `TunedModel` to use for generating the completion. Examples: models/text-bison-001 tunedModels/sentence-translator-u3b7m",
              "location": "path",
              "type": "string",
              "pattern": "^models/[^/]+$"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "GenerateTextResponse"
          },
          "description": "Generates a response from the model given an input message.",
          "flatPath": "v1beta/models/{modelsId}:generateText",
          "request": {
            "$ref": "GenerateTextRequest"
          },
          "path": "v1beta/{+model}:generateText",
          "httpMethod": "POST"
        },
        "batchGenerateContent": {
          "request": {
            "$ref": "BatchGenerateContentRequest"
          },
          "flatPath": "v1beta/models/{modelsId}:batchGenerateContent",
          "path": "v1beta/{+model}:batchGenerateContent",
          "httpMethod": "POST",
          "id": "generativelanguage.models.batchGenerateContent",
          "parameters": {
            "model": {
              "pattern": "^models/[^/]+$",
              "type": "string",
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "location": "path",
              "required": true
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "Operation"
          },
          "description": "Enqueues a batch of `GenerateContent` requests for batch processing."
        },
        "countMessageTokens": {
          "flatPath": "v1beta/models/{modelsId}:countMessageTokens",
          "request": {
            "$ref": "CountMessageTokensRequest"
          },
          "path": "v1beta/{+model}:countMessageTokens",
          "httpMethod": "POST",
          "id": "generativelanguage.models.countMessageTokens",
          "parameters": {
            "model": {
              "required": true,
              "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}`",
              "location": "path",
              "type": "string",
              "pattern": "^models/[^/]+$"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "CountMessageTokensResponse"
          },
          "description": "Runs a model's tokenizer on a string and returns the token count."
        },
        "get": {
          "flatPath": "v1beta/models/{modelsId}",
          "id": "generativelanguage.models.get",
          "path": "v1beta/{+name}",
          "httpMethod": "GET",
          "parameters": {
            "name": {
              "required": true,
              "description": "Required. The resource name of the model. This name should match a model name returned by the `ListModels` method. Format: `models/{model}`",
              "location": "path",
              "type": "string",
              "pattern": "^models/[^/]+$"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "Model"
          },
          "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."
        },
        "batchEmbedText": {
          "parameters": {
            "model": {
              "pattern": "^models/[^/]+$",
              "type": "string",
              "required": true,
              "description": "Required. The name of the `Model` to use for generating the embedding. Examples: models/embedding-gecko-001",
              "location": "path"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "BatchEmbedTextResponse"
          },
          "description": "Generates multiple embeddings from the model given input text in a synchronous call.",
          "id": "generativelanguage.models.batchEmbedText",
          "flatPath": "v1beta/models/{modelsId}:batchEmbedText",
          "request": {
            "$ref": "BatchEmbedTextRequest"
          },
          "path": "v1beta/{+model}:batchEmbedText",
          "httpMethod": "POST"
        },
        "generateAnswer": {
          "parameters": {
            "model": {
              "type": "string",
              "pattern": "^models/[^/]+$",
              "required": true,
              "description": "Required. The name of the `Model` to use for generating the grounded response. Format: `model=models/{model}`.",
              "location": "path"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "GenerateAnswerResponse"
          },
          "description": "Generates a grounded answer from the model given an input `GenerateAnswerRequest`.",
          "id": "generativelanguage.models.generateAnswer",
          "path": "v1beta/{+model}:generateAnswer",
          "httpMethod": "POST",
          "flatPath": "v1beta/models/{modelsId}:generateAnswer",
          "request": {
            "$ref": "GenerateAnswerRequest"
          }
        },
        "predict": {
          "request": {
            "$ref": "PredictRequest"
          },
          "flatPath": "v1beta/models/{modelsId}:predict",
          "path": "v1beta/{+model}:predict",
          "httpMethod": "POST",
          "parameters": {
            "model": {
              "required": true,
              "description": "Required. The name of the model for prediction. Format: `name=models/{model}`.",
              "location": "path",
              "pattern": "^models/[^/]+$",
              "type": "string"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "PredictResponse"
          },
          "description": "Performs a prediction request.",
          "id": "generativelanguage.models.predict"
        },
        "predictLongRunning": {
          "request": {
            "$ref": "PredictLongRunningRequest"
          },
          "flatPath": "v1beta/models/{modelsId}:predictLongRunning",
          "path": "v1beta/{+model}:predictLongRunning",
          "httpMethod": "POST",
          "id": "generativelanguage.models.predictLongRunning",
          "parameters": {
            "model": {
              "pattern": "^models/[^/]+$",
              "type": "string",
              "required": true,
              "description": "Required. The name of the model for prediction. Format: `name=models/{model}`.",
              "location": "path"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "Operation"
          },
          "description": "Same as Predict but returns an LRO."
        },
        "list": {
          "flatPath": "v1beta/models",
          "id": "generativelanguage.models.list",
          "path": "v1beta/models",
          "httpMethod": "GET",
          "parameters": {
            "pageSize": {
              "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.",
              "location": "query",
              "format": "int32",
              "type": "integer"
            },
            "pageToken": {
              "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.",
              "location": "query",
              "type": "string"
            }
          },
          "parameterOrder": [],
          "response": {
            "$ref": "ListModelsResponse"
          },
          "description": "Lists the [`Model`s](https://ai.google.dev/gemini-api/docs/models/gemini) available through the Gemini API."
        },
        "asyncBatchEmbedContent": {
          "parameters": {
            "model": {
              "pattern": "^models/[^/]+$",
              "type": "string",
              "required": true,
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "location": "path"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "Operation"
          },
          "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",
          "request": {
            "$ref": "AsyncBatchEmbedContentRequest"
          },
          "flatPath": "v1beta/models/{modelsId}:asyncBatchEmbedContent",
          "path": "v1beta/{+model}:asyncBatchEmbedContent",
          "httpMethod": "POST"
        },
        "embedText": {
          "path": "v1beta/{+model}:embedText",
          "httpMethod": "POST",
          "flatPath": "v1beta/models/{modelsId}:embedText",
          "request": {
            "$ref": "EmbedTextRequest"
          },
          "id": "generativelanguage.models.embedText",
          "parameters": {
            "model": {
              "type": "string",
              "pattern": "^models/[^/]+$",
              "required": true,
              "description": "Required. The model name to use with the format model=models/{model}.",
              "location": "path"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "EmbedTextResponse"
          },
          "description": "Generates an embedding from the model given an input message."
        },
        "generateContent": {
          "request": {
            "$ref": "GenerateContentRequest"
          },
          "flatPath": "v1beta/models/{modelsId}:generateContent",
          "path": "v1beta/{+model}:generateContent",
          "httpMethod": "POST",
          "id": "generativelanguage.models.generateContent",
          "parameters": {
            "model": {
              "type": "string",
              "pattern": "^models/[^/]+$",
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "location": "path",
              "required": true
            }
          },
          "parameterOrder": [
            "model"
          ],
          "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."
        },
        "generateMessage": {
          "path": "v1beta/{+model}:generateMessage",
          "httpMethod": "POST",
          "request": {
            "$ref": "GenerateMessageRequest"
          },
          "flatPath": "v1beta/models/{modelsId}:generateMessage",
          "id": "generativelanguage.models.generateMessage",
          "parameters": {
            "model": {
              "type": "string",
              "pattern": "^models/[^/]+$",
              "required": true,
              "description": "Required. The name of the model to use. Format: `name=models/{model}`.",
              "location": "path"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "GenerateMessageResponse"
          },
          "description": "Generates a response from the model given an input `MessagePrompt`."
        }
      },
      "resources": {
        "operations": {
          "methods": {
            "get": {
              "path": "v1beta/{+name}",
              "httpMethod": "GET",
              "parameters": {
                "name": {
                  "type": "string",
                  "pattern": "^models/[^/]+/operations/[^/]+$",
                  "description": "The name of the operation resource.",
                  "location": "path",
                  "required": true
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Operation"
              },
              "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.",
              "id": "generativelanguage.models.operations.get",
              "flatPath": "v1beta/models/{modelsId}/operations/{operationsId}"
            },
            "list": {
              "flatPath": "v1beta/models/{modelsId}/operations",
              "path": "v1beta/{+name}/operations",
              "httpMethod": "GET",
              "parameters": {
                "pageToken": {
                  "type": "string",
                  "description": "The standard list page token.",
                  "location": "query"
                },
                "filter": {
                  "type": "string",
                  "description": "The standard list filter.",
                  "location": "query"
                },
                "name": {
                  "description": "The name of the operation's parent resource.",
                  "location": "path",
                  "required": true,
                  "type": "string",
                  "pattern": "^models/[^/]+$"
                },
                "pageSize": {
                  "format": "int32",
                  "description": "The standard list page size.",
                  "location": "query",
                  "type": "integer"
                },
                "returnPartialSuccess": {
                  "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.",
                  "location": "query"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "ListOperationsResponse"
              },
              "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"
            }
          }
        }
      }
    },
    "cachedContents": {
      "methods": {
        "patch": {
          "path": "v1beta/{+name}",
          "httpMethod": "PATCH",
          "request": {
            "$ref": "CachedContent"
          },
          "flatPath": "v1beta/cachedContents/{cachedContentsId}",
          "id": "generativelanguage.cachedContents.patch",
          "parameters": {
            "updateMask": {
              "type": "string",
              "description": "The list of fields to update.",
              "location": "query",
              "format": "google-fieldmask"
            },
            "name": {
              "type": "string",
              "pattern": "^cachedContents/[^/]+$",
              "description": "Output only. Identifier. The resource name referring to the cached content. Format: `cachedContents/{id}`",
              "location": "path",
              "required": true
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "CachedContent"
          },
          "description": "Updates CachedContent resource (only expiration is updatable).",
          "scopes": [
            "https://www.googleapis.com/auth/devstorage.read_only"
          ]
        },
        "create": {
          "flatPath": "v1beta/cachedContents",
          "request": {
            "$ref": "CachedContent"
          },
          "path": "v1beta/cachedContents",
          "httpMethod": "POST",
          "scopes": [
            "https://www.googleapis.com/auth/devstorage.read_only"
          ],
          "parameters": {},
          "parameterOrder": [],
          "response": {
            "$ref": "CachedContent"
          },
          "description": "Creates CachedContent resource.",
          "id": "generativelanguage.cachedContents.create"
        },
        "delete": {
          "parameters": {
            "name": {
              "pattern": "^cachedContents/[^/]+$",
              "type": "string",
              "required": true,
              "description": "Required. The resource name referring to the content cache entry Format: `cachedContents/{id}`",
              "location": "path"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "Empty"
          },
          "description": "Deletes CachedContent resource.",
          "id": "generativelanguage.cachedContents.delete",
          "scopes": [
            "https://www.googleapis.com/auth/devstorage.read_only"
          ],
          "path": "v1beta/{+name}",
          "httpMethod": "DELETE",
          "flatPath": "v1beta/cachedContents/{cachedContentsId}"
        },
        "list": {
          "id": "generativelanguage.cachedContents.list",
          "parameters": {
            "pageToken": {
              "description": "Optional. A page token, received from a previous `ListCachedContents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCachedContents` must match the call that provided the page token.",
              "location": "query",
              "type": "string"
            },
            "pageSize": {
              "type": "integer",
              "description": "Optional. The maximum number of cached contents to return. The service may return fewer than this value. If unspecified, some default (under maximum) number of items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
              "location": "query",
              "format": "int32"
            }
          },
          "parameterOrder": [],
          "response": {
            "$ref": "ListCachedContentsResponse"
          },
          "description": "Lists CachedContents.",
          "scopes": [
            "https://www.googleapis.com/auth/devstorage.read_only"
          ],
          "path": "v1beta/cachedContents",
          "httpMethod": "GET",
          "flatPath": "v1beta/cachedContents"
        },
        "get": {
          "scopes": [
            "https://www.googleapis.com/auth/devstorage.read_only"
          ],
          "parameters": {
            "name": {
              "pattern": "^cachedContents/[^/]+$",
              "type": "string",
              "required": true,
              "description": "Required. The resource name referring to the content cache entry. Format: `cachedContents/{id}`",
              "location": "path"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "CachedContent"
          },
          "description": "Reads CachedContent resource.",
          "id": "generativelanguage.cachedContents.get",
          "flatPath": "v1beta/cachedContents/{cachedContentsId}",
          "path": "v1beta/{+name}",
          "httpMethod": "GET"
        }
      }
    },
    "tunedModels": {
      "methods": {
        "asyncBatchEmbedContent": {
          "id": "generativelanguage.tunedModels.asyncBatchEmbedContent",
          "parameters": {
            "model": {
              "required": true,
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "location": "path",
              "type": "string",
              "pattern": "^tunedModels/[^/]+$"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "Operation"
          },
          "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.",
          "path": "v1beta/{+model}:asyncBatchEmbedContent",
          "httpMethod": "POST",
          "flatPath": "v1beta/tunedModels/{tunedModelsId}:asyncBatchEmbedContent",
          "request": {
            "$ref": "AsyncBatchEmbedContentRequest"
          }
        },
        "delete": {
          "flatPath": "v1beta/tunedModels/{tunedModelsId}",
          "path": "v1beta/{+name}",
          "httpMethod": "DELETE",
          "parameters": {
            "name": {
              "required": true,
              "description": "Required. The resource name of the model. Format: `tunedModels/my-model-id`",
              "location": "path",
              "type": "string",
              "pattern": "^tunedModels/[^/]+$"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "Empty"
          },
          "description": "Deletes a tuned model.",
          "id": "generativelanguage.tunedModels.delete"
        },
        "generateContent": {
          "id": "generativelanguage.tunedModels.generateContent",
          "parameters": {
            "model": {
              "pattern": "^tunedModels/[^/]+$",
              "type": "string",
              "required": true,
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "location": "path"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "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.",
          "flatPath": "v1beta/tunedModels/{tunedModelsId}:generateContent",
          "request": {
            "$ref": "GenerateContentRequest"
          },
          "path": "v1beta/{+model}:generateContent",
          "httpMethod": "POST"
        },
        "streamGenerateContent": {
          "parameters": {
            "model": {
              "type": "string",
              "pattern": "^tunedModels/[^/]+$",
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "location": "path",
              "required": true
            }
          },
          "parameterOrder": [
            "model"
          ],
          "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.tunedModels.streamGenerateContent",
          "flatPath": "v1beta/tunedModels/{tunedModelsId}:streamGenerateContent",
          "request": {
            "$ref": "GenerateContentRequest"
          },
          "path": "v1beta/{+model}:streamGenerateContent",
          "httpMethod": "POST"
        },
        "transferOwnership": {
          "path": "v1beta/{+name}:transferOwnership",
          "httpMethod": "POST",
          "flatPath": "v1beta/tunedModels/{tunedModelsId}:transferOwnership",
          "request": {
            "$ref": "TransferOwnershipRequest"
          },
          "parameters": {
            "name": {
              "type": "string",
              "pattern": "^tunedModels/[^/]+$",
              "required": true,
              "description": "Required. The resource name of the tuned model to transfer ownership. Format: `tunedModels/my-model-id`",
              "location": "path"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "TransferOwnershipResponse"
          },
          "description": "Transfers ownership of the tuned model. This is the only way to change ownership of the tuned model. The current owner will be downgraded to writer role.",
          "id": "generativelanguage.tunedModels.transferOwnership"
        },
        "batchGenerateContent": {
          "parameters": {
            "model": {
              "required": true,
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "location": "path",
              "pattern": "^tunedModels/[^/]+$",
              "type": "string"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "Operation"
          },
          "description": "Enqueues a batch of `GenerateContent` requests for batch processing.",
          "id": "generativelanguage.tunedModels.batchGenerateContent",
          "path": "v1beta/{+model}:batchGenerateContent",
          "httpMethod": "POST",
          "flatPath": "v1beta/tunedModels/{tunedModelsId}:batchGenerateContent",
          "request": {
            "$ref": "BatchGenerateContentRequest"
          }
        },
        "generateText": {
          "flatPath": "v1beta/tunedModels/{tunedModelsId}:generateText",
          "request": {
            "$ref": "GenerateTextRequest"
          },
          "path": "v1beta/{+model}:generateText",
          "httpMethod": "POST",
          "parameters": {
            "model": {
              "description": "Required. The name of the `Model` or `TunedModel` to use for generating the completion. Examples: models/text-bison-001 tunedModels/sentence-translator-u3b7m",
              "location": "path",
              "required": true,
              "type": "string",
              "pattern": "^tunedModels/[^/]+$"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "response": {
            "$ref": "GenerateTextResponse"
          },
          "description": "Generates a response from the model given an input message.",
          "id": "generativelanguage.tunedModels.generateText"
        },
        "list": {
          "id": "generativelanguage.tunedModels.list",
          "path": "v1beta/tunedModels",
          "httpMethod": "GET",
          "parameters": {
            "pageToken": {
              "type": "string",
              "description": "Optional. A page token, received from a previous `ListTunedModels` 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 `ListTunedModels` must match the call that provided the page token.",
              "location": "query"
            },
            "filter": {
              "description": "Optional. A filter is a full text search over the tuned model's description and display name. By default, results will not include tuned models shared with everyone. Additional operators: - owner:me - writers:me - readers:me - readers:everyone Examples: \"owner:me\" returns all tuned models to which caller has owner role \"readers:me\" returns all tuned models to which caller has reader role \"readers:everyone\" returns all tuned models that are shared with everyone",
              "location": "query",
              "type": "string"
            },
            "pageSize": {
              "type": "integer",
              "description": "Optional. The maximum number of `TunedModels` to return (per page). The service may return fewer tuned models. If unspecified, at most 10 tuned models will be returned. This method returns at most 1000 models per page, even if you pass a larger page_size.",
              "location": "query",
              "format": "int32"
            }
          },
          "parameterOrder": [],
          "response": {
            "$ref": "ListTunedModelsResponse"
          },
          "description": "Lists created tuned models.",
          "flatPath": "v1beta/tunedModels"
        },
        "create": {
          "parameters": {
            "tunedModelId": {
              "type": "string",
              "description": "Optional. The unique id for the tuned model if specified. This value should be up to 40 characters, the first character must be a letter, the last could be a letter or a number. The id must match the regular expression: `[a-z]([a-z0-9-]{0,38}[a-z0-9])?`.",
              "location": "query"
            }
          },
          "parameterOrder": [],
          "response": {
            "$ref": "Operation"
          },
          "description": "Creates a tuned model. Check intermediate tuning progress (if any) through the [google.longrunning.Operations] service. Access status and results through the Operations service. Example: GET /v1/tunedModels/az2mb0bpw6i/operations/000-111-222",
          "id": "generativelanguage.tunedModels.create",
          "path": "v1beta/tunedModels",
          "httpMethod": "POST",
          "request": {
            "$ref": "TunedModel"
          },
          "flatPath": "v1beta/tunedModels"
        },
        "patch": {
          "request": {
            "$ref": "TunedModel"
          },
          "flatPath": "v1beta/tunedModels/{tunedModelsId}",
          "path": "v1beta/{+name}",
          "httpMethod": "PATCH",
          "id": "generativelanguage.tunedModels.patch",
          "parameters": {
            "name": {
              "description": "Output only. The tuned model name. A unique name will be generated on create. Example: `tunedModels/az2mb0bpw6i` If display_name is set on create, the id portion of the name will be set by concatenating the words of the display_name with hyphens and adding a random portion for uniqueness. Example: * display_name = `Sentence Translator` * name = `tunedModels/sentence-translator-u3b7m`",
              "location": "path",
              "required": true,
              "pattern": "^tunedModels/[^/]+$",
              "type": "string"
            },
            "updateMask": {
              "description": "Optional. The list of fields to update.",
              "location": "query",
              "format": "google-fieldmask",
              "type": "string"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "TunedModel"
          },
          "description": "Updates a tuned model."
        },
        "get": {
          "flatPath": "v1beta/tunedModels/{tunedModelsId}",
          "id": "generativelanguage.tunedModels.get",
          "path": "v1beta/{+name}",
          "httpMethod": "GET",
          "parameters": {
            "name": {
              "pattern": "^tunedModels/[^/]+$",
              "type": "string",
              "required": true,
              "description": "Required. The resource name of the model. Format: `tunedModels/my-model-id`",
              "location": "path"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "TunedModel"
          },
          "description": "Gets information about a specific TunedModel."
        }
      },
      "resources": {
        "operations": {
          "methods": {
            "get": {
              "flatPath": "v1beta/tunedModels/{tunedModelsId}/operations/{operationsId}",
              "path": "v1beta/{+name}",
              "httpMethod": "GET",
              "parameters": {
                "name": {
                  "description": "The name of the operation resource.",
                  "location": "path",
                  "required": true,
                  "pattern": "^tunedModels/[^/]+/operations/[^/]+$",
                  "type": "string"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Operation"
              },
              "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.",
              "id": "generativelanguage.tunedModels.operations.get"
            },
            "list": {
              "flatPath": "v1beta/tunedModels/{tunedModelsId}/operations",
              "path": "v1beta/{+name}/operations",
              "httpMethod": "GET",
              "parameters": {
                "returnPartialSuccess": {
                  "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.",
                  "location": "query"
                },
                "filter": {
                  "description": "The standard list filter.",
                  "location": "query",
                  "type": "string"
                },
                "name": {
                  "type": "string",
                  "pattern": "^tunedModels/[^/]+$",
                  "description": "The name of the operation's parent resource.",
                  "location": "path",
                  "required": true
                },
                "pageSize": {
                  "description": "The standard list page size.",
                  "location": "query",
                  "format": "int32",
                  "type": "integer"
                },
                "pageToken": {
                  "type": "string",
                  "description": "The standard list page token.",
                  "location": "query"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "ListOperationsResponse"
              },
              "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"
            }
          }
        },
        "permissions": {
          "methods": {
            "create": {
              "parameters": {
                "parent": {
                  "description": "Required. The parent resource of the `Permission`. Formats: `tunedModels/{tuned_model}` `corpora/{corpus}`",
                  "location": "path",
                  "required": true,
                  "pattern": "^tunedModels/[^/]+$",
                  "type": "string"
                }
              },
              "parameterOrder": [
                "parent"
              ],
              "response": {
                "$ref": "Permission"
              },
              "description": "Create a permission to a specific resource.",
              "id": "generativelanguage.tunedModels.permissions.create",
              "path": "v1beta/{+parent}/permissions",
              "httpMethod": "POST",
              "flatPath": "v1beta/tunedModels/{tunedModelsId}/permissions",
              "request": {
                "$ref": "Permission"
              }
            },
            "patch": {
              "id": "generativelanguage.tunedModels.permissions.patch",
              "parameters": {
                "updateMask": {
                  "type": "string",
                  "description": "Required. The list of fields to update. Accepted ones: - role (`Permission.role` field)",
                  "location": "query",
                  "format": "google-fieldmask"
                },
                "name": {
                  "type": "string",
                  "pattern": "^tunedModels/[^/]+/permissions/[^/]+$",
                  "description": "Output only. Identifier. The permission name. A unique name will be generated on create. Examples: tunedModels/{tuned_model}/permissions/{permission} corpora/{corpus}/permissions/{permission} Output only.",
                  "location": "path",
                  "required": true
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Permission"
              },
              "description": "Updates the permission.",
              "path": "v1beta/{+name}",
              "httpMethod": "PATCH",
              "request": {
                "$ref": "Permission"
              },
              "flatPath": "v1beta/tunedModels/{tunedModelsId}/permissions/{permissionsId}"
            },
            "list": {
              "id": "generativelanguage.tunedModels.permissions.list",
              "path": "v1beta/{+parent}/permissions",
              "httpMethod": "GET",
              "parameters": {
                "parent": {
                  "pattern": "^tunedModels/[^/]+$",
                  "type": "string",
                  "description": "Required. The parent resource of the permissions. Formats: `tunedModels/{tuned_model}` `corpora/{corpus}`",
                  "location": "path",
                  "required": true
                },
                "pageSize": {
                  "format": "int32",
                  "description": "Optional. The maximum number of `Permission`s to return (per page). The service may return fewer permissions. If unspecified, at most 10 permissions will be returned. This method returns at most 1000 permissions per page, even if you pass larger page_size.",
                  "location": "query",
                  "type": "integer"
                },
                "pageToken": {
                  "type": "string",
                  "description": "Optional. A page token, received from a previous `ListPermissions` 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 `ListPermissions` must match the call that provided the page token.",
                  "location": "query"
                }
              },
              "parameterOrder": [
                "parent"
              ],
              "response": {
                "$ref": "ListPermissionsResponse"
              },
              "description": "Lists permissions for the specific resource.",
              "flatPath": "v1beta/tunedModels/{tunedModelsId}/permissions"
            },
            "delete": {
              "id": "generativelanguage.tunedModels.permissions.delete",
              "path": "v1beta/{+name}",
              "httpMethod": "DELETE",
              "parameters": {
                "name": {
                  "required": true,
                  "description": "Required. The resource name of the permission. Formats: `tunedModels/{tuned_model}/permissions/{permission}` `corpora/{corpus}/permissions/{permission}`",
                  "location": "path",
                  "pattern": "^tunedModels/[^/]+/permissions/[^/]+$",
                  "type": "string"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Empty"
              },
              "description": "Deletes the permission.",
              "flatPath": "v1beta/tunedModels/{tunedModelsId}/permissions/{permissionsId}"
            },
            "get": {
              "id": "generativelanguage.tunedModels.permissions.get",
              "path": "v1beta/{+name}",
              "httpMethod": "GET",
              "parameters": {
                "name": {
                  "description": "Required. The resource name of the permission. Formats: `tunedModels/{tuned_model}/permissions/{permission}` `corpora/{corpus}/permissions/{permission}`",
                  "location": "path",
                  "required": true,
                  "type": "string",
                  "pattern": "^tunedModels/[^/]+/permissions/[^/]+$"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Permission"
              },
              "description": "Gets information about a specific Permission.",
              "flatPath": "v1beta/tunedModels/{tunedModelsId}/permissions/{permissionsId}"
            }
          }
        }
      }
    },
    "generatedFiles": {
      "methods": {
        "list": {
          "parameters": {
            "pageSize": {
              "type": "integer",
              "format": "int32",
              "description": "Optional. Maximum number of `GeneratedFile`s to return per page. If unspecified, defaults to 10. Maximum `page_size` is 50.",
              "location": "query"
            },
            "pageToken": {
              "type": "string",
              "description": "Optional. A page token from a previous `ListGeneratedFiles` call.",
              "location": "query"
            }
          },
          "parameterOrder": [],
          "response": {
            "$ref": "ListGeneratedFilesResponse"
          },
          "description": "Lists the generated files owned by the requesting project.",
          "id": "generativelanguage.generatedFiles.list",
          "scopes": [
            "https://www.googleapis.com/auth/devstorage.read_only"
          ],
          "path": "v1beta/generatedFiles",
          "httpMethod": "GET",
          "flatPath": "v1beta/generatedFiles"
        }
      },
      "resources": {
        "operations": {
          "methods": {
            "get": {
              "flatPath": "v1beta/generatedFiles/{generatedFilesId}/operations/{operationsId}",
              "path": "v1beta/{+name}",
              "httpMethod": "GET",
              "parameters": {
                "name": {
                  "description": "The name of the operation resource.",
                  "location": "path",
                  "required": true,
                  "pattern": "^generatedFiles/[^/]+/operations/[^/]+$",
                  "type": "string"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Operation"
              },
              "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.",
              "id": "generativelanguage.generatedFiles.operations.get"
            }
          }
        }
      }
    },
    "corpora": {
      "methods": {
        "get": {
          "flatPath": "v1beta/corpora/{corporaId}",
          "path": "v1beta/{+name}",
          "httpMethod": "GET",
          "parameters": {
            "name": {
              "type": "string",
              "pattern": "^corpora/[^/]+$",
              "description": "Required. The name of the `Corpus`. Example: `corpora/my-corpus-123`",
              "location": "path",
              "required": true
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "Corpus"
          },
          "description": "Gets information about a specific `Corpus`.",
          "id": "generativelanguage.corpora.get"
        },
        "delete": {
          "path": "v1beta/{+name}",
          "httpMethod": "DELETE",
          "parameters": {
            "name": {
              "description": "Required. The resource name of the `Corpus`. Example: `corpora/my-corpus-123`",
              "location": "path",
              "required": true,
              "pattern": "^corpora/[^/]+$",
              "type": "string"
            },
            "force": {
              "type": "boolean",
              "description": "Optional. If set to true, any `Document`s and objects related to this `Corpus` will also be deleted. If false (the default), a `FAILED_PRECONDITION` error will be returned if `Corpus` contains any `Document`s.",
              "location": "query"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "Empty"
          },
          "description": "Deletes a `Corpus`.",
          "id": "generativelanguage.corpora.delete",
          "flatPath": "v1beta/corpora/{corporaId}"
        },
        "list": {
          "id": "generativelanguage.corpora.list",
          "path": "v1beta/corpora",
          "httpMethod": "GET",
          "parameters": {
            "pageToken": {
              "description": "Optional. A page token, received from a previous `ListCorpora` call. Provide the `next_page_token` returned in the response as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to `ListCorpora` must match the call that provided the page token.",
              "location": "query",
              "type": "string"
            },
            "pageSize": {
              "type": "integer",
              "description": "Optional. The maximum number of `Corpora` to return (per page). The service may return fewer `Corpora`. If unspecified, at most 10 `Corpora` will be returned. The maximum size limit is 20 `Corpora` per page.",
              "location": "query",
              "format": "int32"
            }
          },
          "parameterOrder": [],
          "response": {
            "$ref": "ListCorporaResponse"
          },
          "description": "Lists all `Corpora` owned by the user.",
          "flatPath": "v1beta/corpora"
        },
        "create": {
          "parameters": {},
          "parameterOrder": [],
          "response": {
            "$ref": "Corpus"
          },
          "description": "Creates an empty `Corpus`.",
          "id": "generativelanguage.corpora.create",
          "path": "v1beta/corpora",
          "httpMethod": "POST",
          "request": {
            "$ref": "Corpus"
          },
          "flatPath": "v1beta/corpora"
        }
      },
      "resources": {
        "operations": {
          "methods": {
            "get": {
              "flatPath": "v1beta/corpora/{corporaId}/operations/{operationsId}",
              "path": "v1beta/{+name}",
              "httpMethod": "GET",
              "parameters": {
                "name": {
                  "description": "The name of the operation resource.",
                  "location": "path",
                  "required": true,
                  "pattern": "^corpora/[^/]+/operations/[^/]+$",
                  "type": "string"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Operation"
              },
              "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.",
              "id": "generativelanguage.corpora.operations.get"
            }
          }
        },
        "permissions": {
          "methods": {
            "get": {
              "flatPath": "v1beta/corpora/{corporaId}/permissions/{permissionsId}",
              "path": "v1beta/{+name}",
              "httpMethod": "GET",
              "parameters": {
                "name": {
                  "type": "string",
                  "pattern": "^corpora/[^/]+/permissions/[^/]+$",
                  "required": true,
                  "description": "Required. The resource name of the permission. Formats: `tunedModels/{tuned_model}/permissions/{permission}` `corpora/{corpus}/permissions/{permission}`",
                  "location": "path"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Permission"
              },
              "description": "Gets information about a specific Permission.",
              "id": "generativelanguage.corpora.permissions.get"
            },
            "delete": {
              "path": "v1beta/{+name}",
              "httpMethod": "DELETE",
              "parameters": {
                "name": {
                  "type": "string",
                  "pattern": "^corpora/[^/]+/permissions/[^/]+$",
                  "required": true,
                  "description": "Required. The resource name of the permission. Formats: `tunedModels/{tuned_model}/permissions/{permission}` `corpora/{corpus}/permissions/{permission}`",
                  "location": "path"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Empty"
              },
              "description": "Deletes the permission.",
              "id": "generativelanguage.corpora.permissions.delete",
              "flatPath": "v1beta/corpora/{corporaId}/permissions/{permissionsId}"
            },
            "list": {
              "path": "v1beta/{+parent}/permissions",
              "httpMethod": "GET",
              "parameters": {
                "pageToken": {
                  "type": "string",
                  "description": "Optional. A page token, received from a previous `ListPermissions` 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 `ListPermissions` must match the call that provided the page token.",
                  "location": "query"
                },
                "parent": {
                  "description": "Required. The parent resource of the permissions. Formats: `tunedModels/{tuned_model}` `corpora/{corpus}`",
                  "location": "path",
                  "required": true,
                  "type": "string",
                  "pattern": "^corpora/[^/]+$"
                },
                "pageSize": {
                  "description": "Optional. The maximum number of `Permission`s to return (per page). The service may return fewer permissions. If unspecified, at most 10 permissions will be returned. This method returns at most 1000 permissions per page, even if you pass larger page_size.",
                  "location": "query",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "parameterOrder": [
                "parent"
              ],
              "response": {
                "$ref": "ListPermissionsResponse"
              },
              "description": "Lists permissions for the specific resource.",
              "id": "generativelanguage.corpora.permissions.list",
              "flatPath": "v1beta/corpora/{corporaId}/permissions"
            },
            "patch": {
              "path": "v1beta/{+name}",
              "httpMethod": "PATCH",
              "flatPath": "v1beta/corpora/{corporaId}/permissions/{permissionsId}",
              "request": {
                "$ref": "Permission"
              },
              "parameters": {
                "updateMask": {
                  "type": "string",
                  "description": "Required. The list of fields to update. Accepted ones: - role (`Permission.role` field)",
                  "location": "query",
                  "format": "google-fieldmask"
                },
                "name": {
                  "description": "Output only. Identifier. The permission name. A unique name will be generated on create. Examples: tunedModels/{tuned_model}/permissions/{permission} corpora/{corpus}/permissions/{permission} Output only.",
                  "location": "path",
                  "required": true,
                  "pattern": "^corpora/[^/]+/permissions/[^/]+$",
                  "type": "string"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Permission"
              },
              "description": "Updates the permission.",
              "id": "generativelanguage.corpora.permissions.patch"
            },
            "create": {
              "path": "v1beta/{+parent}/permissions",
              "httpMethod": "POST",
              "flatPath": "v1beta/corpora/{corporaId}/permissions",
              "request": {
                "$ref": "Permission"
              },
              "id": "generativelanguage.corpora.permissions.create",
              "parameters": {
                "parent": {
                  "required": true,
                  "description": "Required. The parent resource of the `Permission`. Formats: `tunedModels/{tuned_model}` `corpora/{corpus}`",
                  "location": "path",
                  "pattern": "^corpora/[^/]+$",
                  "type": "string"
                }
              },
              "parameterOrder": [
                "parent"
              ],
              "response": {
                "$ref": "Permission"
              },
              "description": "Create a permission to a specific resource."
            }
          }
        }
      }
    },
    "dynamic": {
      "methods": {
        "generateContent": {
          "path": "v1beta/{+model}:generateContent",
          "httpMethod": "POST",
          "flatPath": "v1beta/dynamic/{dynamicId}:generateContent",
          "request": {
            "$ref": "GenerateContentRequest"
          },
          "id": "generativelanguage.dynamic.generateContent",
          "parameters": {
            "model": {
              "type": "string",
              "pattern": "^dynamic/[^/]+$",
              "required": true,
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "location": "path"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "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."
        },
        "streamGenerateContent": {
          "parameters": {
            "model": {
              "description": "Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`.",
              "location": "path",
              "required": true,
              "pattern": "^dynamic/[^/]+$",
              "type": "string"
            }
          },
          "parameterOrder": [
            "model"
          ],
          "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",
          "flatPath": "v1beta/dynamic/{dynamicId}:streamGenerateContent",
          "request": {
            "$ref": "GenerateContentRequest"
          },
          "path": "v1beta/{+model}:streamGenerateContent",
          "httpMethod": "POST"
        }
      }
    },
    "files": {
      "methods": {
        "list": {
          "scopes": [
            "https://www.googleapis.com/auth/devstorage.read_only"
          ],
          "id": "generativelanguage.files.list",
          "parameters": {
            "pageToken": {
              "description": "Optional. A page token from a previous `ListFiles` call.",
              "location": "query",
              "type": "string"
            },
            "pageSize": {
              "type": "integer",
              "description": "Optional. Maximum number of `File`s to return per page. If unspecified, defaults to 10. Maximum `page_size` is 100.",
              "location": "query",
              "format": "int32"
            }
          },
          "parameterOrder": [],
          "response": {
            "$ref": "ListFilesResponse"
          },
          "description": "Lists the metadata for `File`s owned by the requesting project.",
          "flatPath": "v1beta/files",
          "path": "v1beta/files",
          "httpMethod": "GET"
        },
        "register": {
          "flatPath": "v1beta/files:register",
          "request": {
            "$ref": "RegisterFilesRequest"
          },
          "path": "v1beta/files:register",
          "httpMethod": "POST",
          "scopes": [
            "https://www.googleapis.com/auth/devstorage.read_only"
          ],
          "id": "generativelanguage.files.register",
          "parameters": {},
          "parameterOrder": [],
          "response": {
            "$ref": "RegisterFilesResponse"
          },
          "description": "Registers a Google Cloud Storage files with FileService. The user is expected to provide Google Cloud Storage URIs and will receive a File resource for each URI in return. Note that the files are not copied, just registered with File API. If one file fails to register, the whole request fails."
        },
        "get": {
          "scopes": [
            "https://www.googleapis.com/auth/devstorage.read_only"
          ],
          "parameters": {
            "name": {
              "type": "string",
              "pattern": "^files/[^/]+$",
              "description": "Required. The name of the `File` to get. Example: `files/abc-123`",
              "location": "path",
              "required": true
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "File"
          },
          "description": "Gets the metadata for the given `File`.",
          "id": "generativelanguage.files.get",
          "flatPath": "v1beta/files/{filesId}",
          "path": "v1beta/{+name}",
          "httpMethod": "GET"
        },
        "delete": {
          "flatPath": "v1beta/files/{filesId}",
          "path": "v1beta/{+name}",
          "httpMethod": "DELETE",
          "scopes": [
            "https://www.googleapis.com/auth/devstorage.read_only"
          ],
          "id": "generativelanguage.files.delete",
          "parameters": {
            "name": {
              "description": "Required. The name of the `File` to delete. Example: `files/abc-123`",
              "location": "path",
              "required": true,
              "pattern": "^files/[^/]+$",
              "type": "string"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "Empty"
          },
          "description": "Deletes the `File`."
        }
      }
    }
  },
  "discoveryVersion": "v1",
  "batchPath": "batch",
  "kind": "discovery#restDescription",
  "revision": "20260416",
  "version": "v1beta",
  "mtlsRootUrl": "https://generativelanguage.mtls.googleapis.com/",
  "rootUrl": "https://generativelanguage.googleapis.com/",
  "servicePath": "",
  "basePath": "",
  "title": "Gemini API",
  "parameters": {
    "key": {
      "type": "string",
      "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.",
      "location": "query"
    },
    "prettyPrint": {
      "description": "Returns response with indentations and line breaks.",
      "location": "query",
      "default": "true",
      "type": "boolean"
    },
    "$.xgafv": {
      "description": "V1 error format.",
      "location": "query",
      "enum": [
        "1",
        "2"
      ],
      "type": "string",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ]
    },
    "callback": {
      "type": "string",
      "description": "JSONP",
      "location": "query"
    },
    "access_token": {
      "description": "OAuth access token.",
      "location": "query",
      "type": "string"
    },
    "alt": {
      "description": "Data format for response.",
      "location": "query",
      "type": "string",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "default": "json",
      "enum": [
        "json",
        "media",
        "proto"
      ]
    },
    "fields": {
      "type": "string",
      "description": "Selector specifying which fields to include in a partial response.",
      "location": "query"
    },
    "upload_protocol": {
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query",
      "type": "string"
    },
    "uploadType": {
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query",
      "type": "string"
    },
    "oauth_token": {
      "type": "string",
      "description": "OAuth 2.0 token for the current user.",
      "location": "query"
    },
    "quotaUser": {
      "type": "string",
      "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.",
      "location": "query"
    }
  },
  "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.",
  "id": "generativelanguage:v1beta",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/devstorage.read_only": {
          "description": "View your data in Google Cloud Storage"
        }
      }
    }
  }
}
