packages feed

haskell-google-genai-client-0.1.0: openapi.yaml

openapi: 3.0.3
info:
  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."
  title: Generative Language API
  version: v1beta
  x-google-revision: "20250601"
externalDocs:
  description: Find more info here.
  url: https://developers.generativeai.google/api
servers:
- description: Global Endpoint
  url: https://generativelanguage.googleapis.com
paths:
  /v1beta/dynamic/{dynamicId}:streamGenerateContent:
    post:
      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`.
      operationId: StreamGenerateContentByDynamicId
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: |-
          Part of `model`. Required. The name of the `Model` to use for generating the completion.

          Format: `models/{model}`.
        explode: false
        in: path
        name: dynamicId
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateContentRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateContentResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-operation-name: StreamGenerateContent
  /v1beta/tunedModels/{tunedModel}:generateText:
    post:
      description: Generates a response from the model given an input message.
      operationId: GenerateTextByTunedModel
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: tunedModel
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateTextRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateTextResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-operation-name: GenerateText
  /v1beta/corpora/{corpus}/documents:
    get:
      description: Lists all `Document`s in a `Corpus`.
      operationId: ListDocuments
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - 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.
        explode: true
        in: query
        name: pageSize
        required: false
        schema:
          format: int32
          type: integer
        style: form
      - 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.
        explode: true
        in: query
        name: pageToken
        required: false
        schema:
          type: string
        style: form
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDocumentsResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    post:
      description: Creates an empty `Document`.
      operationId: CreateDocument
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Document'
        description: Required. The `Document` to create.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/tunedModels/{tunedModel}/permissions:
    get:
      description: Lists permissions for the specific resource.
      operationId: ListPermissions
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: tunedModel
        required: true
        schema:
          type: string
        style: simple
      - 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.
        explode: true
        in: query
        name: pageSize
        required: false
        schema:
          format: int32
          type: integer
        style: form
      - 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.
        explode: true
        in: query
        name: pageToken
        required: false
        schema:
          type: string
        style: form
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPermissionsResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    post:
      description: Create a permission to a specific resource.
      operationId: CreatePermission
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: tunedModel
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Permission'
        description: Required. The permission to create.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Permission'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/tunedModels/{tunedModel}/operations:
    get:
      description: |-
        Lists operations that match the specified filter in the request. If the
        server doesn't support this method, it returns `UNIMPLEMENTED`.
      operationId: ListOperations
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: tunedModel
        required: true
        schema:
          type: string
        style: simple
      - description: The standard list filter.
        explode: true
        in: query
        name: filter
        required: false
        schema:
          type: string
        style: form
      - description: The standard list page size.
        explode: true
        in: query
        name: pageSize
        required: false
        schema:
          format: int32
          type: integer
        style: form
      - description: The standard list page token.
        explode: true
        in: query
        name: pageToken
        required: false
        schema:
          type: string
        style: form
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOperationsResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/models/{model}:generateMessage:
    post:
      description: Generates a response from the model given an input `MessagePrompt`.
      operationId: GenerateMessage
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateMessageRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateMessageResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/tunedModels:
    get:
      description: Lists created tuned models.
      operationId: ListTunedModels
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - 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.
        explode: true
        in: query
        name: pageSize
        required: false
        schema:
          format: int32
          type: integer
        style: form
      - 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.
        explode: true
        in: query
        name: pageToken
        required: false
        schema:
          type: string
        style: form
      - 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
        explode: true
        in: query
        name: filter
        required: false
        schema:
          type: string
        style: form
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTunedModelsResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    post:
      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
      operationId: CreateTunedModel
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - 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])?`.
        explode: true
        in: query
        name: tunedModelId
        required: false
        schema:
          type: string
        style: form
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TunedModel'
        description: Required. The tuned model to create.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTunedModelOperation'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-lro: "true"
  /v1beta/models/{model}:streamGenerateContent:
    post:
      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`.
      operationId: StreamGenerateContent
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateContentRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateContentResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/corpora/{corpus}/permissions/{permission}:
    delete:
      description: Deletes the permission.
      operationId: DeletePermissionByCorpusAndPermission
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: permission
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-operation-name: DeletePermission
    get:
      description: Gets information about a specific Permission.
      operationId: GetPermissionByCorpusAndPermission
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: permission
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Permission'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-operation-name: GetPermission
    patch:
      description: Updates the permission.
      operationId: UpdatePermissionByCorpusAndPermission
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: permission
        required: true
        schema:
          type: string
        style: simple
      - description: |-
          Required. The list of fields to update. Accepted ones:
           - role (`Permission.role` field)
        explode: true
        in: query
        name: updateMask
        required: true
        schema:
          format: google-fieldmask
          pattern: "^(\\s*[^,\\s.]+(\\s*[,.]\\s*[^,\\s.]+)*)?$"
          type: string
        style: form
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Permission'
        description: |-
          Required. The permission to update.

          The permission's `name` field is used to identify the permission to update.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Permission'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-operation-name: UpdatePermission
  /v1beta/models/{model}:generateAnswer:
    post:
      description: |-
        Generates a grounded answer from the model given an input
        `GenerateAnswerRequest`.
      operationId: GenerateAnswer
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateAnswerRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateAnswerResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/models/{model}:embedContent:
    post:
      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).
      operationId: EmbedContent
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbedContentRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbedContentResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/corpora/{corpus}:
    delete:
      description: Deletes a `Corpus`.
      operationId: DeleteCorpus
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - 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.
        explode: true
        in: query
        name: force
        required: false
        schema:
          type: boolean
        style: form
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    get:
      description: Gets information about a specific `Corpus`.
      operationId: GetCorpus
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Corpus'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    patch:
      description: Updates a `Corpus`.
      operationId: UpdateCorpus
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - description: |-
          Required. The list of fields to update.
          Currently, this only supports updating `display_name`.
        explode: true
        in: query
        name: updateMask
        required: true
        schema:
          format: google-fieldmask
          pattern: "^(\\s*[^,\\s.]+(\\s*[,.]\\s*[^,\\s.]+)*)?$"
          type: string
        style: form
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Corpus'
        description: Required. The `Corpus` to update.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Corpus'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/models/{model}/operations:
    get:
      description: |-
        Lists operations that match the specified filter in the request. If the
        server doesn't support this method, it returns `UNIMPLEMENTED`.
      operationId: ListOperationsByModel
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      - description: The standard list filter.
        explode: true
        in: query
        name: filter
        required: false
        schema:
          type: string
        style: form
      - description: The standard list page size.
        explode: true
        in: query
        name: pageSize
        required: false
        schema:
          format: int32
          type: integer
        style: form
      - description: The standard list page token.
        explode: true
        in: query
        name: pageToken
        required: false
        schema:
          type: string
        style: form
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOperationsResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-operation-name: ListOperations
  /v1beta/models/{model}:predictLongRunning:
    post:
      description: Same as Predict but returns an LRO.
      operationId: PredictLongRunning
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PredictLongRunningRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PredictLongRunningOperation'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-lro: "true"
  /v1beta/models/{model}:batchEmbedText:
    post:
      description: |-
        Generates multiple embeddings from the model given input text in a
        synchronous call.
      operationId: BatchEmbedText
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchEmbedTextRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchEmbedTextResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/corpora/{corpus}:query:
    post:
      description: Performs semantic search over a `Corpus`.
      operationId: QueryCorpus
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryCorpusRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryCorpusResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/batches:
    get:
      description: |-
        Lists operations that match the specified filter in the request. If the
        server doesn't support this method, it returns `UNIMPLEMENTED`.
      operationId: ListOperationsBy
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: The standard list filter.
        explode: true
        in: query
        name: filter
        required: false
        schema:
          type: string
        style: form
      - description: The standard list page size.
        explode: true
        in: query
        name: pageSize
        required: false
        schema:
          format: int32
          type: integer
        style: form
      - description: The standard list page token.
        explode: true
        in: query
        name: pageToken
        required: false
        schema:
          type: string
        style: form
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOperationsResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-operation-name: ListOperations
  /v1beta/models:
    get:
      description: |-
        Lists the [`Model`s](https://ai.google.dev/gemini-api/docs/models/gemini)
        available through the Gemini API.
      operationId: ListModels
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - 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.
        explode: true
        in: query
        name: pageSize
        required: false
        schema:
          format: int32
          type: integer
        style: form
      - 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.
        explode: true
        in: query
        name: pageToken
        required: false
        schema:
          type: string
        style: form
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListModelsResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/files/{file}:download:
    get:
      description: Download the `File`.
      operationId: DownloadFile
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: file
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadFileResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/models/{model}:countMessageTokens:
    post:
      description: Runs a model's tokenizer on a string and returns the token count.
      operationId: CountMessageTokens
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CountMessageTokensRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountMessageTokensResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/models/{model}:generateText:
    post:
      description: Generates a response from the model given an input message.
      operationId: GenerateText
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateTextRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateTextResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/tunedModels/{tunedModel}:streamGenerateContent:
    post:
      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`.
      operationId: StreamGenerateContentByTunedModel
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: tunedModel
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateContentRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateContentResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-operation-name: StreamGenerateContent
  /v1beta/tunedModels/{tunedModel}/permissions/{permission}:
    delete:
      description: Deletes the permission.
      operationId: DeletePermission
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: tunedModel
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: permission
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    get:
      description: Gets information about a specific Permission.
      operationId: GetPermission
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: tunedModel
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: permission
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Permission'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    patch:
      description: Updates the permission.
      operationId: UpdatePermission
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: tunedModel
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: permission
        required: true
        schema:
          type: string
        style: simple
      - description: |-
          Required. The list of fields to update. Accepted ones:
           - role (`Permission.role` field)
        explode: true
        in: query
        name: updateMask
        required: true
        schema:
          format: google-fieldmask
          pattern: "^(\\s*[^,\\s.]+(\\s*[,.]\\s*[^,\\s.]+)*)?$"
          type: string
        style: form
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Permission'
        description: |-
          Required. The permission to update.

          The permission's `name` field is used to identify the permission to update.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Permission'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/models/{model}:countTextTokens:
    post:
      description: Runs a model's tokenizer on a text and returns the token count.
      operationId: CountTextTokens
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CountTextTokensRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountTextTokensResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/tunedModels/{tunedModel}:generateContent:
    post:
      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.
      operationId: GenerateContentByTunedModel
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: tunedModel
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateContentRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateContentResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-operation-name: GenerateContent
  /v1beta/corpora/{corpus}/documents/{document}/chunks:batchDelete:
    post:
      description: Batch delete `Chunk`s.
      operationId: BatchDeleteChunks
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: document
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchDeleteChunksRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/tunedModels/{tunedModel}:
    delete:
      description: Deletes a tuned model.
      operationId: DeleteTunedModel
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: tunedModel
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    get:
      description: Gets information about a specific TunedModel.
      operationId: GetTunedModel
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: tunedModel
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TunedModel'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    patch:
      description: Updates a tuned model.
      operationId: UpdateTunedModel
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: tunedModel
        required: true
        schema:
          type: string
        style: simple
      - description: Optional. The list of fields to update.
        explode: true
        in: query
        name: updateMask
        required: false
        schema:
          format: google-fieldmask
          pattern: "^(\\s*[^,\\s.]+(\\s*[,.]\\s*[^,\\s.]+)*)?$"
          type: string
        style: form
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TunedModel'
        description: Required. The tuned model to update.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TunedModel'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/corpora/{corpus}/documents/{document}/chunks:batchUpdate:
    post:
      description: Batch update `Chunk`s.
      operationId: BatchUpdateChunks
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: document
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchUpdateChunksRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchUpdateChunksResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/models/{model}:
    get:
      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.
      operationId: GetModel
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/batches/{generateContentBatch}:
    get:
      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.
      operationId: GetOperationByGenerateContentBatch
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: generateContentBatch
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-operation-name: GetOperation
  /v1beta/corpora/{corpus}/documents/{document}/chunks:
    get:
      description: Lists all `Chunk`s in a `Document`.
      operationId: ListChunks
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: document
        required: true
        schema:
          type: string
        style: simple
      - description: |-
          Optional. The maximum number of `Chunk`s to return (per page).
          The service may return fewer `Chunk`s.

          If unspecified, at most 10 `Chunk`s will be returned.
          The maximum size limit is 100 `Chunk`s per page.
        explode: true
        in: query
        name: pageSize
        required: false
        schema:
          format: int32
          type: integer
        style: form
      - description: |-
          Optional. A page token, received from a previous `ListChunks` 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 `ListChunks`
          must match the call that provided the page token.
        explode: true
        in: query
        name: pageToken
        required: false
        schema:
          type: string
        style: form
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListChunksResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    post:
      description: Creates a `Chunk`.
      operationId: CreateChunk
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: document
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Chunk'
        description: Required. The `Chunk` to create.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Chunk'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/tunedModels/{tunedModel}:transferOwnership:
    post:
      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.
      operationId: TransferOwnership
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: tunedModel
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferOwnershipRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferOwnershipResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/files/{file}:
    delete:
      description: Deletes the `File`.
      operationId: DeleteFile
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: file
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    get:
      description: Gets the metadata for the given `File`.
      operationId: GetFile
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: file
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/cachedContents/{id}:
    delete:
      description: Deletes CachedContent resource.
      operationId: DeleteCachedContent
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: id
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    get:
      description: Reads CachedContent resource.
      operationId: GetCachedContent
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: id
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CachedContent'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    patch:
      description: Updates CachedContent resource (only expiration is updatable).
      operationId: UpdateCachedContent
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: id
        required: true
        schema:
          type: string
        style: simple
      - description: The list of fields to update.
        explode: true
        in: query
        name: updateMask
        required: false
        schema:
          format: google-fieldmask
          pattern: "^(\\s*[^,\\s.]+(\\s*[,.]\\s*[^,\\s.]+)*)?$"
          type: string
        style: form
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CachedContent'
        description: Required. The content cache entry to update
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CachedContent'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/dynamic/{dynamicId}:generateContent:
    post:
      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.
      operationId: GenerateContentByDynamicId
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: |-
          Part of `model`. Required. The name of the `Model` to use for generating the completion.

          Format: `models/{model}`.
        explode: false
        in: path
        name: dynamicId
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateContentRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateContentResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-operation-name: GenerateContent
  /v1beta/corpora/{corpus}/documents/{document}:query:
    post:
      description: Performs semantic search over a `Document`.
      operationId: QueryDocument
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: document
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryDocumentRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryDocumentResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/models/{model}:generateContent:
    post:
      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.
      operationId: GenerateContent
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateContentRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateContentResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/corpora:
    get:
      description: Lists all `Corpora` owned by the user.
      operationId: ListCorpora
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - 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.
        explode: true
        in: query
        name: pageSize
        required: false
        schema:
          format: int32
          type: integer
        style: form
      - 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.
        explode: true
        in: query
        name: pageToken
        required: false
        schema:
          type: string
        style: form
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCorporaResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    post:
      description: Creates an empty `Corpus`.
      operationId: CreateCorpus
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Corpus'
        description: Required. The `Corpus` to create.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Corpus'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/models/{model}:predict:
    post:
      description: Performs a prediction request.
      operationId: Predict
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PredictRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PredictResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/models/{model}/operations/{operation}:
    get:
      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.
      operationId: GetOperationByModelAndOperation
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: operation
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-operation-name: GetOperation
  /v1beta/cachedContents:
    get:
      description: Lists CachedContents.
      operationId: ListCachedContents
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - 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.
        explode: true
        in: query
        name: pageSize
        required: false
        schema:
          format: int32
          type: integer
        style: form
      - 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.
        explode: true
        in: query
        name: pageToken
        required: false
        schema:
          type: string
        style: form
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCachedContentsResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    post:
      description: Creates CachedContent resource.
      operationId: CreateCachedContent
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CachedContent'
        description: Required. The cached content to create.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CachedContent'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/generatedFiles/{generatedFile}:
    get:
      description: |-
        Gets a generated file. When calling this method via REST, only the metadata
        of the generated file is returned. To retrieve the file content via REST,
        add alt=media as a query parameter.
      operationId: GetGeneratedFile
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: generatedFile
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneratedFile'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/corpora/{corpus}/permissions:
    get:
      description: Lists permissions for the specific resource.
      operationId: ListPermissionsByCorpus
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - 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.
        explode: true
        in: query
        name: pageSize
        required: false
        schema:
          format: int32
          type: integer
        style: form
      - 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.
        explode: true
        in: query
        name: pageToken
        required: false
        schema:
          type: string
        style: form
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPermissionsResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-operation-name: ListPermissions
    post:
      description: Create a permission to a specific resource.
      operationId: CreatePermissionByCorpus
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Permission'
        description: Required. The permission to create.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Permission'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-operation-name: CreatePermission
  /v1beta/batches/{generateContentBatch}:cancel:
    post:
      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`.
      operationId: CancelOperation
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: generateContentBatch
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/models/{model}:batchEmbedContents:
    post:
      description: |-
        Generates multiple embedding vectors from the input `Content` which
        consists of a batch of strings represented as `EmbedContentRequest`
        objects.
      operationId: BatchEmbedContents
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchEmbedContentsRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchEmbedContentsResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/corpora/{corpus}/documents/{document}/chunks:batchCreate:
    post:
      description: Batch create `Chunk`s.
      operationId: BatchCreateChunks
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: document
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchCreateChunksRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchCreateChunksResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/tunedModels/{tunedModel}/operations/{operation}:
    get:
      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.
      operationId: GetOperation
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: tunedModel
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: operation
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/corpora/{corpus}/documents/{document}/chunks/{chunk}:
    delete:
      description: Deletes a `Chunk`.
      operationId: DeleteChunk
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: document
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: chunk
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    get:
      description: Gets information about a specific `Chunk`.
      operationId: GetChunk
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: document
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: chunk
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Chunk'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    patch:
      description: Updates a `Chunk`.
      operationId: UpdateChunk
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: document
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: chunk
        required: true
        schema:
          type: string
        style: simple
      - description: |-
          Required. The list of fields to update.
          Currently, this only supports updating `custom_metadata` and `data`.
        explode: true
        in: query
        name: updateMask
        required: true
        schema:
          format: google-fieldmask
          pattern: "^(\\s*[^,\\s.]+(\\s*[,.]\\s*[^,\\s.]+)*)?$"
          type: string
        style: form
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Chunk'
        description: Required. The `Chunk` to update.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Chunk'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/models/{model}:countTokens:
    post:
      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.
      operationId: CountTokens
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CountTokensRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountTokensResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/generatedFiles/{generatedFile}/operations/{operation}:
    get:
      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.
      operationId: GetOperationByGeneratedFileAndOperation
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: generatedFile
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: operation
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
      x-google-operation-name: GetOperation
  /v1beta/corpora/{corpus}/documents/{document}:
    delete:
      description: Deletes a `Document`.
      operationId: DeleteDocument
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: document
        required: true
        schema:
          type: string
        style: simple
      - 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.
        explode: true
        in: query
        name: force
        required: false
        schema:
          type: boolean
        style: form
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    get:
      description: Gets information about a specific `Document`.
      operationId: GetDocument
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: document
        required: true
        schema:
          type: string
        style: simple
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    patch:
      description: Updates a `Document`.
      operationId: UpdateDocument
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: corpus
        required: true
        schema:
          type: string
        style: simple
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: document
        required: true
        schema:
          type: string
        style: simple
      - description: |-
          Required. The list of fields to update.
          Currently, this only supports updating `display_name` and
          `custom_metadata`.
        explode: true
        in: query
        name: updateMask
        required: true
        schema:
          format: google-fieldmask
          pattern: "^(\\s*[^,\\s.]+(\\s*[,.]\\s*[^,\\s.]+)*)?$"
          type: string
        style: form
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Document'
        description: Required. The `Document` to update.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/models/{model}:embedText:
    post:
      description: Generates an embedding from the model given an input message.
      operationId: EmbedText
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: Resource ID segment making up resource `name`. It identifies
          the resource within its parent collection as described in https://google.aip.dev/122.
        explode: false
        in: path
        name: model
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbedTextRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbedTextResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/files:
    get:
      description: Lists the metadata for `File`s owned by the requesting project.
      operationId: ListFiles
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: |-
          Optional. Maximum number of `File`s to return per page.
          If unspecified, defaults to 10. Maximum `page_size` is 100.
        explode: true
        in: query
        name: pageSize
        required: false
        schema:
          format: int32
          type: integer
        style: form
      - description: Optional. A page token from a previous `ListFiles` call.
        explode: true
        in: query
        name: pageToken
        required: false
        schema:
          type: string
        style: form
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFilesResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
    post:
      description: Creates a `File`.
      operationId: CreateFile
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFileRequest'
        description: The request body.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateFileResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
  /v1beta/generatedFiles:
    get:
      description: Lists the generated files owned by the requesting project.
      operationId: ListGeneratedFiles
      parameters:
      - description: Data format for response.
        explode: true
        in: query
        name: $alt
        required: false
        schema:
          default: json
          enum:
          - json
          - media
          - proto
          type: string
          x-google-enum-descriptions:
          - Responses with Content-Type of application/json
          - Media download with context-dependent Content-Type
          - Responses with Content-Type of application/x-protobuf
        style: form
      - description: JSONP
        explode: true
        in: query
        name: $callback
        required: false
        schema:
          type: string
        style: form
      - description: Returns response with indentations and line breaks.
        explode: true
        in: query
        name: $prettyPrint
        required: false
        schema:
          default: true
          type: boolean
        style: form
      - description: V1 error format.
        explode: true
        in: query
        name: $.xgafv
        required: false
        schema:
          enum:
          - "1"
          - "2"
          type: string
          x-google-enum-descriptions:
          - v1 error format
          - v2 error format
        style: form
      - description: |-
          Optional. Maximum number of `GeneratedFile`s to return per page.
          If unspecified, defaults to 10. Maximum `page_size` is 50.
        explode: true
        in: query
        name: pageSize
        required: false
        schema:
          format: int32
          type: integer
        style: form
      - description: Optional. A page token from a previous `ListGeneratedFiles` call.
        explode: true
        in: query
        name: pageToken
        required: false
        schema:
          type: string
        style: form
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListGeneratedFilesResponse'
          description: Successful operation
      security: []
      tags:
      - generativelanguage
components:
  parameters:
    _.xgafv:
      description: V1 error format.
      explode: true
      in: query
      name: $.xgafv
      required: false
      schema:
        enum:
        - "1"
        - "2"
        type: string
        x-google-enum-descriptions:
        - v1 error format
        - v2 error format
      style: form
    callback:
      description: JSONP
      explode: true
      in: query
      name: $callback
      required: false
      schema:
        type: string
      style: form
    alt:
      description: Data format for response.
      explode: true
      in: query
      name: $alt
      required: false
      schema:
        default: json
        enum:
        - json
        - media
        - proto
        type: string
        x-google-enum-descriptions:
        - Responses with Content-Type of application/json
        - Media download with context-dependent Content-Type
        - Responses with Content-Type of application/x-protobuf
      style: form
    prettyPrint:
      description: Returns response with indentations and line breaks.
      explode: true
      in: query
      name: $prettyPrint
      required: false
      schema:
        default: true
        type: boolean
      style: form
  schemas:
    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.
      example:
        citationMetadata: ""
        author: author
        content: content
      properties:
        citationMetadata:
          allOf:
          - $ref: '#/components/schemas/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
        author:
          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.
          type: string
        content:
          description: Required. The text content of the structured `Message`.
          type: string
      required:
      - content
      type: object
    CreateFileRequest:
      description: Request for `CreateFile`.
      example:
        file: ""
      properties:
        file:
          allOf:
          - $ref: '#/components/schemas/File'
          description: Optional. Metadata for the file to create.
      type: object
    GroundingAttribution:
      description: Attribution for a source that contributed to an answer.
      example:
        sourceId: ""
        content: ""
      properties:
        sourceId:
          allOf:
          - $ref: '#/components/schemas/AttributionSourceId'
          description: Output only. Identifier for the source contributing to this
            attribution.
          readOnly: true
        content:
          allOf:
          - $ref: '#/components/schemas/Content'
          description: Grounding source content that makes up this attribution.
      type: object
    GroundingPassageId:
      description: Identifier for a part within a `GroundingPassage`.
      properties:
        passageId:
          description: |-
            Output only. ID of the passage matching the `GenerateAnswerRequest`'s
            `GroundingPassage.id`.
          readOnly: true
          type: string
        partIndex:
          description: |-
            Output only. Index of the part within the `GenerateAnswerRequest`'s
            `GroundingPassage.content`.
          format: int32
          readOnly: true
          type: integer
      type: object
    EmbedTextRequest:
      description: Request to get a text embedding from the model.
      example:
        model: model
        text: text
      properties:
        text:
          description: Optional. The free-form input text that the model will turn
            into an embedding.
          type: string
        model:
          description: "Required. The model name to use with the format model=models/{model}."
          type: string
      required:
      - model
      type: object
    Part:
      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.
      example:
        functionResponse: ""
        executableCode: ""
        codeExecutionResult: ""
        thought: true
        fileData: ""
        functionCall: ""
        inlineData: ""
        text: text
        thoughtSignature: thoughtSignature
        videoMetadata: ""
      properties:
        inlineData:
          allOf:
          - $ref: '#/components/schemas/Blob'
          description: Inline media bytes.
        functionResponse:
          allOf:
          - $ref: '#/components/schemas/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.
        codeExecutionResult:
          allOf:
          - $ref: '#/components/schemas/CodeExecutionResult'
          description: Result of executing the `ExecutableCode`.
        fileData:
          allOf:
          - $ref: '#/components/schemas/FileData'
          description: URI based data.
        executableCode:
          allOf:
          - $ref: '#/components/schemas/ExecutableCode'
          description: Code generated by the model that is meant to be executed.
        videoMetadata:
          allOf:
          - $ref: '#/components/schemas/VideoMetadata'
          description: |-
            Optional. Video metadata. The metadata should only be specified while the video
            data is presented in inline_data or file_data.
        thought:
          description: Optional. Indicates if the part is thought from the model.
          type: boolean
        text:
          description: Inline text.
          type: string
        thoughtSignature:
          description: |-
            Optional. An opaque signature for the thought so it can be reused in subsequent
            requests.
          format: byte
          type: string
        functionCall:
          allOf:
          - $ref: '#/components/schemas/FunctionCall'
          description: |-
            A predicted `FunctionCall` returned from the model that contains
            a string representing the `FunctionDeclaration.name` with the
            arguments and their values.
      type: object
    CitationSource:
      description: A citation to a source for a portion of a specific response.
      properties:
        startIndex:
          description: |-
            Optional. Start of segment of the response that is attributed to this source.

            Index indicates the start of the segment, measured in bytes.
          format: int32
          type: integer
        uri:
          description: Optional. URI that is attributed as a source for a portion
            of the text.
          type: string
        endIndex:
          description: "Optional. End of the attributed segment, exclusive."
          format: int32
          type: integer
        license:
          description: |-
            Optional. License for the GitHub project that is attributed as a source for segment.

            License info is required for code citations.
          type: string
      type: object
    GenerateVideoResponse:
      description: Veo response.
      properties:
        generatedSamples:
          description: The generated samples.
          items:
            $ref: '#/components/schemas/Media'
          type: array
        raiMediaFilteredCount:
          description: Returns if any videos were filtered due to RAI policies.
          format: int32
          type: integer
        raiMediaFilteredReasons:
          description: Returns rai failure reasons if any.
          items:
            type: string
          type: array
      type: object
    TuningTask:
      description: Tuning tasks that create tuned models.
      properties:
        startTime:
          description: Output only. The timestamp when tuning this model started.
          format: date-time
          readOnly: true
          type: string
        trainingData:
          allOf:
          - $ref: '#/components/schemas/Dataset'
          description: Required. Input only. Immutable. The model training data.
          writeOnly: true
          x-google-immutable: true
        hyperparameters:
          allOf:
          - $ref: '#/components/schemas/Hyperparameters'
          description: |-
            Immutable. Hyperparameters controlling the tuning process. If not provided, default
            values will be used.
          x-google-immutable: true
        completeTime:
          description: Output only. The timestamp when tuning this model completed.
          format: date-time
          readOnly: true
          type: string
        snapshots:
          description: Output only. Metrics collected during tuning.
          items:
            $ref: '#/components/schemas/TuningSnapshot'
          readOnly: true
          type: array
      required:
      - trainingData
      type: object
    ToolConfig:
      description: |-
        The Tool configuration containing parameters for specifying `Tool` use
        in the request.
      properties:
        functionCallingConfig:
          allOf:
          - $ref: '#/components/schemas/FunctionCallingConfig'
          description: Optional. Function calling config.
      type: object
    DeleteChunkRequest:
      description: Request to delete a `Chunk`.
      example:
        name: name
      properties:
        name:
          description: |-
            Required. The resource name of the `Chunk` to delete.
            Example: `corpora/my-corpus-123/documents/the-doc-abc/chunks/some-chunk`
          type: string
      required:
      - name
      type: object
    ListCorporaResponse:
      description: |-
        Response from `ListCorpora` containing a paginated list of `Corpora`.
        The results are sorted by ascending `corpus.create_time`.
      example:
        nextPageToken: nextPageToken
        corpora:
        - createTime: 2000-01-23T04:56:07.000+00:00
          displayName: displayName
          name: name
          updateTime: 2000-01-23T04:56:07.000+00:00
        - createTime: 2000-01-23T04:56:07.000+00:00
          displayName: displayName
          name: name
          updateTime: 2000-01-23T04:56:07.000+00:00
      properties:
        corpora:
          description: The returned corpora.
          items:
            $ref: '#/components/schemas/Corpus'
          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
      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.
      properties:
        args:
          additionalProperties:
            description: Properties of the object.
          description: Optional. The function parameters and values in JSON object
            format.
          type: object
        id:
          description: |-
            Optional. The unique id of the function call. If populated, the client to execute the
            `function_call` and return the response with the matching `id`.
          type: string
        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 63.
          type: string
      required:
      - name
      type: object
    BaseOperation:
      description: |-
        This resource represents a long-running operation that is the result of a
        network API call.
      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
        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
        error:
          allOf:
          - $ref: '#/components/schemas/Status'
          description: The error result of the operation in case of failure or cancellation.
      type: object
    GenerateContentRequest:
      description: |-
        Request to generate a completion from the model.
        NEXT ID: 13
      example:
        cachedContent: cachedContent
        toolConfig: ""
        safetySettings:
        - threshold: HARM_BLOCK_THRESHOLD_UNSPECIFIED
          category: ""
        - threshold: HARM_BLOCK_THRESHOLD_UNSPECIFIED
          category: ""
        contents:
        - role: role
          parts:
          - functionResponse: ""
            executableCode: ""
            codeExecutionResult: ""
            thought: true
            fileData: ""
            functionCall: ""
            inlineData: ""
            text: text
            thoughtSignature: thoughtSignature
            videoMetadata: ""
          - functionResponse: ""
            executableCode: ""
            codeExecutionResult: ""
            thought: true
            fileData: ""
            functionCall: ""
            inlineData: ""
            text: text
            thoughtSignature: thoughtSignature
            videoMetadata: ""
        - role: role
          parts:
          - functionResponse: ""
            executableCode: ""
            codeExecutionResult: ""
            thought: true
            fileData: ""
            functionCall: ""
            inlineData: ""
            text: text
            thoughtSignature: thoughtSignature
            videoMetadata: ""
          - functionResponse: ""
            executableCode: ""
            codeExecutionResult: ""
            thought: true
            fileData: ""
            functionCall: ""
            inlineData: ""
            text: text
            thoughtSignature: thoughtSignature
            videoMetadata: ""
        generationConfig: ""
        systemInstruction: ""
        model: model
        tools:
        - googleSearchRetrieval: ""
          googleSearch: ""
          codeExecution: ""
          urlContext: ""
          functionDeclarations:
          - responseJsonSchema: ""
            response: ""
            parametersJsonSchema: ""
            name: name
            description: description
            behavior: UNSPECIFIED
            parameters: ""
          - responseJsonSchema: ""
            response: ""
            parametersJsonSchema: ""
            name: name
            description: description
            behavior: UNSPECIFIED
            parameters: ""
        - googleSearchRetrieval: ""
          googleSearch: ""
          codeExecution: ""
          urlContext: ""
          functionDeclarations:
          - responseJsonSchema: ""
            response: ""
            parametersJsonSchema: ""
            name: name
            description: description
            behavior: UNSPECIFIED
            parameters: ""
          - responseJsonSchema: ""
            response: ""
            parametersJsonSchema: ""
            name: name
            description: description
            behavior: UNSPECIFIED
            parameters: ""
      properties:
        toolConfig:
          allOf:
          - $ref: '#/components/schemas/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.
        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: '#/components/schemas/Tool'
          type: array
        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: '#/components/schemas/Content'
          type: array
        systemInstruction:
          allOf:
          - $ref: '#/components/schemas/Content'
          description: |-
            Optional. Developer set [system
            instruction(s)](https://ai.google.dev/gemini-api/docs/system-instructions).
            Currently, text only.
        cachedContent:
          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}`
          type: string
        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: '#/components/schemas/SafetySetting'
          type: array
        model:
          description: |-
            Required. The name of the `Model` to use for generating the completion.

            Format: `models/{model}`.
          type: string
        generationConfig:
          allOf:
          - $ref: '#/components/schemas/GenerationConfig'
          description: Optional. Configuration options for model generation and outputs.
      required:
      - contents
      - model
      type: object
    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`.
      example:
        generateContentRequest: ""
        contents:
        - role: role
          parts:
          - functionResponse: ""
            executableCode: ""
            codeExecutionResult: ""
            thought: true
            fileData: ""
            functionCall: ""
            inlineData: ""
            text: text
            thoughtSignature: thoughtSignature
            videoMetadata: ""
          - functionResponse: ""
            executableCode: ""
            codeExecutionResult: ""
            thought: true
            fileData: ""
            functionCall: ""
            inlineData: ""
            text: text
            thoughtSignature: thoughtSignature
            videoMetadata: ""
        - role: role
          parts:
          - functionResponse: ""
            executableCode: ""
            codeExecutionResult: ""
            thought: true
            fileData: ""
            functionCall: ""
            inlineData: ""
            text: text
            thoughtSignature: thoughtSignature
            videoMetadata: ""
          - functionResponse: ""
            executableCode: ""
            codeExecutionResult: ""
            thought: true
            fileData: ""
            functionCall: ""
            inlineData: ""
            text: text
            thoughtSignature: thoughtSignature
            videoMetadata: ""
      properties:
        contents:
          description: |-
            Optional. The input given to the model as a prompt. This field is ignored when
            `generate_content_request` is set.
          items:
            $ref: '#/components/schemas/Content'
          type: array
        generateContentRequest:
          allOf:
          - $ref: '#/components/schemas/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.
      type: object
    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
      example:
        emailAddress: emailAddress
        role: ROLE_UNSPECIFIED
        name: name
        granteeType: GRANTEE_TYPE_UNSPECIFIED
      properties:
        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
          x-google-identifier: true
        granteeType:
          description: Optional. Immutable. The type of the grantee.
          enum:
          - GRANTEE_TYPE_UNSPECIFIED
          - USER
          - GROUP
          - EVERYONE
          type: string
          x-google-immutable: true
          x-google-enum-descriptions:
          - 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.
        role:
          description: Required. The role granted by this permission.
          enum:
          - ROLE_UNSPECIFIED
          - OWNER
          - WRITER
          - READER
          type: string
          x-google-enum-descriptions:
          - 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.
        emailAddress:
          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.
          type: string
          x-google-immutable: true
      required:
      - role
      type: object
    CachedContentUsageMetadata:
      description: Metadata on the usage of the cached content.
      properties:
        totalTokenCount:
          description: Total number of tokens that the cached content consumes.
          format: int32
          type: integer
      type: object
    MetadataFilter:
      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}]
      example:
        conditions:
        - stringValue: stringValue
          numericValue: 0.8008282
          operation: OPERATOR_UNSPECIFIED
        - stringValue: stringValue
          numericValue: 0.8008282
          operation: OPERATOR_UNSPECIFIED
        key: key
      properties:
        conditions:
          description: |-
            Required. The `Condition`s for the given key that will trigger this filter. Multiple
            `Condition`s are joined by logical ORs.
          items:
            $ref: '#/components/schemas/Condition'
          type: array
        key:
          description: Required. The key of the metadata to filter on.
          type: string
      required:
      - conditions
      - key
      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:
        context:
          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.
          type: string
        messages:
          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`.
          items:
            $ref: '#/components/schemas/Message'
          type: array
        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: '#/components/schemas/Example'
          type: array
      required:
      - messages
      type: object
    BatchUpdateChunksRequest:
      description: Request to batch update `Chunk`s.
      example:
        requests:
        - chunk: ""
          updateMask: updateMask
        - chunk: ""
          updateMask: updateMask
      properties:
        requests:
          description: |-
            Required. The request messages specifying the `Chunk`s to update.
            A maximum of 100 `Chunk`s can be updated in a batch.
          items:
            $ref: '#/components/schemas/UpdateChunkRequest'
          type: array
      required:
      - requests
      type: object
    TuningSnapshot:
      description: Record for a single tuning step.
      example:
        meanLoss: 5.962134
        computeTime: 2000-01-23T04:56:07.000+00:00
        step: 5
        epoch: 2
      properties:
        meanLoss:
          description: Output only. The mean loss of the training examples for this
            step.
          format: float
          readOnly: true
          type: number
        computeTime:
          description: Output only. The timestamp when this metric was computed.
          format: date-time
          readOnly: true
          type: string
        step:
          description: Output only. The tuning step.
          format: int32
          readOnly: true
          type: integer
        epoch:
          description: Output only. The epoch this step was part of.
          format: int32
          readOnly: true
          type: integer
      type: object
    DownloadFileResponse:
      description: Response for `DownloadFile`.
      type: object
    Dataset:
      description: Dataset for training or validation.
      properties:
        examples:
          allOf:
          - $ref: '#/components/schemas/TuningExamples'
          description: Optional. Inline examples with simple input/output text.
      type: object
    TextCompletion:
      description: Output text returned from a model.
      example:
        output: output
        citationMetadata: ""
        safetyRatings:
        - blocked: true
          probability: HARM_PROBABILITY_UNSPECIFIED
          category: ""
        - blocked: true
          probability: HARM_PROBABILITY_UNSPECIFIED
          category: ""
      properties:
        safetyRatings:
          description: |-
            Ratings for the safety of a response.

            There is at most one rating per category.
          items:
            $ref: '#/components/schemas/SafetyRating'
          type: array
        output:
          description: Output only. The generated text returned from the model.
          readOnly: true
          type: string
        citationMetadata:
          allOf:
          - $ref: '#/components/schemas/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
      type: object
    GenerateTextResponse:
      description: "The response from the model, including candidate completions."
      example:
        candidates:
        - output: output
          citationMetadata: ""
          safetyRatings:
          - blocked: true
            probability: HARM_PROBABILITY_UNSPECIFIED
            category: ""
          - blocked: true
            probability: HARM_PROBABILITY_UNSPECIFIED
            category: ""
        - output: output
          citationMetadata: ""
          safetyRatings:
          - blocked: true
            probability: HARM_PROBABILITY_UNSPECIFIED
            category: ""
          - blocked: true
            probability: HARM_PROBABILITY_UNSPECIFIED
            category: ""
        filters:
        - reason: BLOCKED_REASON_UNSPECIFIED
          message: message
        - reason: BLOCKED_REASON_UNSPECIFIED
          message: message
        safetyFeedback:
        - rating: ""
          setting: ""
        - rating: ""
          setting: ""
      properties:
        safetyFeedback:
          description: Returns any safety feedback related to content filtering.
          items:
            $ref: '#/components/schemas/SafetyFeedback'
          type: array
        candidates:
          description: Candidate responses from the model.
          items:
            $ref: '#/components/schemas/TextCompletion'
          type: array
        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: '#/components/schemas/ContentFilter'
          type: array
      type: object
    FunctionDeclaration:
      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.
      example:
        responseJsonSchema: ""
        response: ""
        parametersJsonSchema: ""
        name: name
        description: description
        behavior: UNSPECIFIED
        parameters: ""
      properties:
        parameters:
          allOf:
          - $ref: '#/components/schemas/Schema'
          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.
        name:
          description: |-
            Required. The name of the function.
            Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
            length of 63.
          type: string
        behavior:
          description: |-
            Optional. Specifies the function Behavior.
            Currently only supported by the BidiGenerateContent method.
          enum:
          - UNSPECIFIED
          - BLOCKING
          - NON_BLOCKING
          type: string
          x-google-enum-descriptions:
          - 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.
        description:
          description: Required. A brief description of the function.
          type: string
        response:
          allOf:
          - $ref: '#/components/schemas/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.
        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`.
        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`.
      required:
      - description
      - name
      type: object
    Hyperparameters:
      description: |-
        Hyperparameters controlling the tuning process. Read more at
        https://ai.google.dev/docs/model_tuning_guidance
      properties:
        epochCount:
          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.
          format: int32
          type: integer
          x-google-immutable: true
        learningRate:
          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.
          format: float
          type: number
          x-google-immutable: true
        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
          x-google-immutable: true
        batchSize:
          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.
          format: int32
          type: integer
          x-google-immutable: true
      type: object
    GoogleSearchRetrieval:
      description: "Tool to retrieve public web data for grounding, powered by Google."
      properties:
        dynamicRetrievalConfig:
          allOf:
          - $ref: '#/components/schemas/DynamicRetrievalConfig'
          description: Specifies the dynamic retrieval configuration for the given
            source.
      type: object
    GenerateTextRequest:
      description: Request to generate a text completion response from the model.
      example:
        topK: 1
        safetySettings:
        - threshold: HARM_BLOCK_THRESHOLD_UNSPECIFIED
          category: ""
        - threshold: HARM_BLOCK_THRESHOLD_UNSPECIFIED
          category: ""
        stopSequences:
        - stopSequences
        - stopSequences
        temperature: 6.0274563
        prompt: ""
        maxOutputTokens: 0
        topP: 5.962134
        candidateCount: 5
      properties:
        stopSequences:
          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.
          items:
            type: string
          type: array
        prompt:
          allOf:
          - $ref: '#/components/schemas/TextPrompt'
          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.
        maxOutputTokens:
          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.
          format: int32
          type: integer
        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: '#/components/schemas/SafetySetting'
          type: array
        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
        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
        topP:
          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: number
        candidateCount:
          description: |-
            Optional. Number of generated responses to return.

            This value must be between [1, 8], inclusive. If unset, this will default
            to 1.
          format: int32
          type: integer
      required:
      - prompt
      type: object
    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: '#/components/schemas/TuningExample'
          type: array
      type: object
    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
      type: object
    Web:
      description: Chunk from the web.
      properties:
        title:
          description: Title of the chunk.
          type: string
        uri:
          description: URI reference of the chunk.
          type: string
      type: object
    MultiSpeakerVoiceConfig:
      description: The configuration for the multi-speaker setup.
      properties:
        speakerVoiceConfigs:
          description: Required. All the enabled speaker voices.
          items:
            $ref: '#/components/schemas/SpeakerVoiceConfig'
          type: array
      required:
      - speakerVoiceConfigs
      type: object
    PredictLongRunningRequest:
      description: "Request message for [PredictionService.PredictLongRunning]."
      example:
        instances:
        - ""
        - ""
        parameters: ""
      properties:
        parameters:
          description: Optional. The parameters that govern the prediction call.
        instances:
          description: Required. The instances that are the input to the prediction
            call.
          items: {}
          type: array
      required:
      - instances
      type: object
    ListCachedContentsResponse:
      description: Response with CachedContents list.
      example:
        nextPageToken: nextPageToken
        cachedContents:
        - toolConfig: ""
          expireTime: 2000-01-23T04:56:07.000+00:00
          contents:
          - role: role
            parts:
            - functionResponse: ""
              executableCode: ""
              codeExecutionResult: ""
              thought: true
              fileData: ""
              functionCall: ""
              inlineData: ""
              text: text
              thoughtSignature: thoughtSignature
              videoMetadata: ""
            - functionResponse: ""
              executableCode: ""
              codeExecutionResult: ""
              thought: true
              fileData: ""
              functionCall: ""
              inlineData: ""
              text: text
              thoughtSignature: thoughtSignature
              videoMetadata: ""
          - role: role
            parts:
            - functionResponse: ""
              executableCode: ""
              codeExecutionResult: ""
              thought: true
              fileData: ""
              functionCall: ""
              inlineData: ""
              text: text
              thoughtSignature: thoughtSignature
              videoMetadata: ""
            - functionResponse: ""
              executableCode: ""
              codeExecutionResult: ""
              thought: true
              fileData: ""
              functionCall: ""
              inlineData: ""
              text: text
              thoughtSignature: thoughtSignature
              videoMetadata: ""
          createTime: 2000-01-23T04:56:07.000+00:00
          displayName: displayName
          systemInstruction: ""
          name: name
          model: model
          updateTime: 2000-01-23T04:56:07.000+00:00
          usageMetadata: ""
          tools:
          - googleSearchRetrieval: ""
            googleSearch: ""
            codeExecution: ""
            urlContext: ""
            functionDeclarations:
            - responseJsonSchema: ""
              response: ""
              parametersJsonSchema: ""
              name: name
              description: description
              behavior: UNSPECIFIED
              parameters: ""
            - responseJsonSchema: ""
              response: ""
              parametersJsonSchema: ""
              name: name
              description: description
              behavior: UNSPECIFIED
              parameters: ""
          - googleSearchRetrieval: ""
            googleSearch: ""
            codeExecution: ""
            urlContext: ""
            functionDeclarations:
            - responseJsonSchema: ""
              response: ""
              parametersJsonSchema: ""
              name: name
              description: description
              behavior: UNSPECIFIED
              parameters: ""
            - responseJsonSchema: ""
              response: ""
              parametersJsonSchema: ""
              name: name
              description: description
              behavior: UNSPECIFIED
              parameters: ""
          ttl: ttl
        - toolConfig: ""
          expireTime: 2000-01-23T04:56:07.000+00:00
          contents:
          - role: role
            parts:
            - functionResponse: ""
              executableCode: ""
              codeExecutionResult: ""
              thought: true
              fileData: ""
              functionCall: ""
              inlineData: ""
              text: text
              thoughtSignature: thoughtSignature
              videoMetadata: ""
            - functionResponse: ""
              executableCode: ""
              codeExecutionResult: ""
              thought: true
              fileData: ""
              functionCall: ""
              inlineData: ""
              text: text
              thoughtSignature: thoughtSignature
              videoMetadata: ""
          - role: role
            parts:
            - functionResponse: ""
              executableCode: ""
              codeExecutionResult: ""
              thought: true
              fileData: ""
              functionCall: ""
              inlineData: ""
              text: text
              thoughtSignature: thoughtSignature
              videoMetadata: ""
            - functionResponse: ""
              executableCode: ""
              codeExecutionResult: ""
              thought: true
              fileData: ""
              functionCall: ""
              inlineData: ""
              text: text
              thoughtSignature: thoughtSignature
              videoMetadata: ""
          createTime: 2000-01-23T04:56:07.000+00:00
          displayName: displayName
          systemInstruction: ""
          name: name
          model: model
          updateTime: 2000-01-23T04:56:07.000+00:00
          usageMetadata: ""
          tools:
          - googleSearchRetrieval: ""
            googleSearch: ""
            codeExecution: ""
            urlContext: ""
            functionDeclarations:
            - responseJsonSchema: ""
              response: ""
              parametersJsonSchema: ""
              name: name
              description: description
              behavior: UNSPECIFIED
              parameters: ""
            - responseJsonSchema: ""
              response: ""
              parametersJsonSchema: ""
              name: name
              description: description
              behavior: UNSPECIFIED
              parameters: ""
          - googleSearchRetrieval: ""
            googleSearch: ""
            codeExecution: ""
            urlContext: ""
            functionDeclarations:
            - responseJsonSchema: ""
              response: ""
              parametersJsonSchema: ""
              name: name
              description: description
              behavior: UNSPECIFIED
              parameters: ""
            - responseJsonSchema: ""
              response: ""
              parametersJsonSchema: ""
              name: name
              description: description
              behavior: UNSPECIFIED
              parameters: ""
          ttl: ttl
      properties:
        nextPageToken:
          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.
          type: string
        cachedContents:
          description: List of cached contents.
          items:
            $ref: '#/components/schemas/CachedContent'
          type: array
      type: object
    CitationMetadata:
      description: A collection of source attributions for a piece of content.
      properties:
        citationSources:
          description: Citations to sources for a specific response.
          items:
            $ref: '#/components/schemas/CitationSource'
          type: array
      type: object
    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.
      example:
        googleSearchRetrieval: ""
        googleSearch: ""
        codeExecution: ""
        urlContext: ""
        functionDeclarations:
        - responseJsonSchema: ""
          response: ""
          parametersJsonSchema: ""
          name: name
          description: description
          behavior: UNSPECIFIED
          parameters: ""
        - responseJsonSchema: ""
          response: ""
          parametersJsonSchema: ""
          name: name
          description: description
          behavior: UNSPECIFIED
          parameters: ""
      properties:
        functionDeclarations:
          description: |-
            Optional. A list of `FunctionDeclarations` available to the model that can be used
            for function calling.

            The model or system does not execute the function. Instead the defined
            function may be returned as a FunctionCall
            with arguments to the client side for execution. The model may decide to
            call a subset of these functions by populating
            FunctionCall in the response. The next
            conversation turn may contain a
            FunctionResponse
            with the Content.role "function" generation context for the next model
            turn.
          items:
            $ref: '#/components/schemas/FunctionDeclaration'
          type: array
        googleSearchRetrieval:
          allOf:
          - $ref: '#/components/schemas/GoogleSearchRetrieval'
          description: Optional. Retrieval tool that is powered by Google search.
        googleSearch:
          allOf:
          - $ref: '#/components/schemas/GoogleSearch'
          description: |-
            Optional. GoogleSearch tool type.
            Tool to support Google Search in Model. Powered by Google.
        codeExecution:
          allOf:
          - $ref: '#/components/schemas/CodeExecution'
          description: Optional. Enables the model to execute code as part of generation.
        urlContext:
          allOf:
          - $ref: '#/components/schemas/UrlContext'
          description: Optional. Tool to support URL context retrieval.
      type: object
    TopCandidates:
      description: Candidates with top log probabilities at each decoding step.
      properties:
        candidates:
          description: Sorted by log probability in descending order.
          items:
            $ref: '#/components/schemas/LogprobsResultCandidate'
          type: array
      type: object
    GroundingPassage:
      description: Passage included inline with a grounding configuration.
      properties:
        content:
          allOf:
          - $ref: '#/components/schemas/Content'
          description: Content of the passage.
        id:
          description: |-
            Identifier for the passage for attributing this passage in grounded
            answers.
          type: string
      type: object
    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
      required:
      - fileUri
      type: object
    CreateFileResponse:
      description: Response for `CreateFile`.
      example:
        file: ""
      properties:
        file:
          allOf:
          - $ref: '#/components/schemas/File'
          description: Metadata for the created file.
      type: object
    ListDocumentsResponse:
      description: |-
        Response from `ListDocuments` containing a paginated list of `Document`s.
        The `Document`s are sorted by ascending `document.create_time`.
      example:
        documents:
        - createTime: 2000-01-23T04:56:07.000+00:00
          displayName: displayName
          name: name
          customMetadata:
          - stringValue: stringValue
            stringListValue: ""
            numericValue: 0.8008282
            key: key
          - stringValue: stringValue
            stringListValue: ""
            numericValue: 0.8008282
            key: key
          updateTime: 2000-01-23T04:56:07.000+00:00
        - createTime: 2000-01-23T04:56:07.000+00:00
          displayName: displayName
          name: name
          customMetadata:
          - stringValue: stringValue
            stringListValue: ""
            numericValue: 0.8008282
            key: key
          - stringValue: stringValue
            stringListValue: ""
            numericValue: 0.8008282
            key: key
          updateTime: 2000-01-23T04:56:07.000+00:00
        nextPageToken: nextPageToken
      properties:
        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
        documents:
          description: The returned `Document`s.
          items:
            $ref: '#/components/schemas/Document'
          type: array
      type: object
    Empty:
      description: |-
        A generic empty message that you can re-use to avoid defining duplicated
        empty messages in your APIs. A typical example is to use it as the request
        or the response type of an API method. For instance:

            service Foo {
              rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
            }
      type: object
    TunedModelSource:
      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
          x-google-immutable: true
        baseModel:
          description: |-
            Output only. The name of the base `Model` this `TunedModel` was tuned from.
            Example: `models/gemini-1.5-flash-001`
          readOnly: true
          type: string
      type: object
    GroundingMetadata:
      description: Metadata returned to client when grounding is enabled.
      properties:
        retrievalMetadata:
          allOf:
          - $ref: '#/components/schemas/RetrievalMetadata'
          description: Metadata related to retrieval in the grounding flow.
        webSearchQueries:
          description: Web search queries for the following-up web search.
          items:
            type: string
          type: array
        groundingChunks:
          description: List of supporting references retrieved from specified grounding
            source.
          items:
            $ref: '#/components/schemas/GroundingChunk'
          type: array
        searchEntryPoint:
          allOf:
          - $ref: '#/components/schemas/SearchEntryPoint'
          description: Optional. Google search entry for the following-up web searches.
        groundingSupports:
          description: List of grounding support.
          items:
            $ref: '#/components/schemas/GroundingSupport'
          type: array
      type: object
    File:
      description: |-
        A file uploaded to the API.
        Next ID: 15
      example:
        displayName: displayName
        updateTime: 2000-01-23T04:56:07.000+00:00
        source: SOURCE_UNSPECIFIED
        mimeType: mimeType
        downloadUri: downloadUri
        error: ""
        uri: uri
        videoMetadata: ""
        sizeBytes: sizeBytes
        createTime: 2000-01-23T04:56:07.000+00:00
        sha256Hash: sha256Hash
        expirationTime: 2000-01-23T04:56:07.000+00:00
        name: name
        state: STATE_UNSPECIFIED
      properties:
        uri:
          description: Output only. The uri of the `File`.
          readOnly: true
          type: string
        name:
          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`
          type: string
          x-google-immutable: true
          x-google-identifier: true
        expirationTime:
          description: |-
            Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is
            scheduled to expire.
          format: date-time
          readOnly: true
          type: string
        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
        videoMetadata:
          allOf:
          - $ref: '#/components/schemas/VideoFileMetadata'
          description: Output only. Metadata for a video.
          readOnly: true
        state:
          description: Output only. Processing state of the File.
          enum:
          - STATE_UNSPECIFIED
          - PROCESSING
          - ACTIVE
          - FAILED
          readOnly: true
          type: string
          x-google-enum-descriptions:
          - 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.
        source:
          description: Source of the File.
          enum:
          - SOURCE_UNSPECIFIED
          - UPLOADED
          - GENERATED
          type: string
          x-google-enum-descriptions:
          - Used if source is not specified.
          - Indicates the file is uploaded by the user.
          - Indicates the file is generated by Google.
        mimeType:
          description: Output only. MIME type of the file.
          readOnly: true
          type: string
        createTime:
          description: Output only. The timestamp of when the `File` was created.
          format: date-time
          readOnly: true
          type: string
        error:
          allOf:
          - $ref: '#/components/schemas/Status'
          description: Output only. Error status if File processing failed.
          readOnly: true
        downloadUri:
          description: Output only. The download uri of the `File`.
          readOnly: true
          type: string
        sizeBytes:
          description: Output only. Size of the file in bytes.
          format: int64
          readOnly: true
          type: string
        sha256Hash:
          description: Output only. SHA-256 hash of the uploaded bytes.
          format: byte
          readOnly: true
          type: string
        updateTime:
          description: Output only. The timestamp of when the `File` was last updated.
          format: date-time
          readOnly: true
          type: string
      type: object
    Content:
      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.
      example:
        role: role
        parts:
        - functionResponse: ""
          executableCode: ""
          codeExecutionResult: ""
          thought: true
          fileData: ""
          functionCall: ""
          inlineData: ""
          text: text
          thoughtSignature: thoughtSignature
          videoMetadata: ""
        - functionResponse: ""
          executableCode: ""
          codeExecutionResult: ""
          thought: true
          fileData: ""
          functionCall: ""
          inlineData: ""
          text: text
          thoughtSignature: thoughtSignature
          videoMetadata: ""
      properties:
        parts:
          description: |-
            Ordered `Parts` that constitute a single message. Parts may have different
            MIME types.
          items:
            $ref: '#/components/schemas/Part'
          type: array
        role:
          description: |-
            Optional. The producer of the content. Must be either 'user' or 'model'.

            Useful to set for multi-turn conversations, otherwise can be left blank
            or unset.
          type: string
      type: object
    AttributionSourceId:
      description: Identifier for the source contributing to this attribution.
      properties:
        groundingPassage:
          allOf:
          - $ref: '#/components/schemas/GroundingPassageId'
          description: Identifier for an inline passage.
        semanticRetrieverChunk:
          allOf:
          - $ref: '#/components/schemas/SemanticRetrieverChunk'
          description: Identifier for a `Chunk` fetched via Semantic Retriever.
      type: object
    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.
      type: object
    TaskType:
      enum:
      - TASK_TYPE_UNSPECIFIED
      - RETRIEVAL_QUERY
      - RETRIEVAL_DOCUMENT
      - SEMANTIC_SIMILARITY
      - CLASSIFICATION
      - CLUSTERING
      - QUESTION_ANSWERING
      - FACT_VERIFICATION
      - CODE_RETRIEVAL_QUERY
      type: string
      x-google-enum-descriptions:
      - "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.
    LogprobsResultCandidate:
      description: Candidate for the logprobs token and score.
      properties:
        logProbability:
          description: The candidate's log probability.
          format: float
          type: number
        tokenId:
          description: The candidate’s token id value.
          format: int32
          type: integer
        token:
          description: The candidate’s token string value.
          type: string
      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:
        output:
          allOf:
          - $ref: '#/components/schemas/Message'
          description: Required. An example of what the model should output given
            the input.
        input:
          allOf:
          - $ref: '#/components/schemas/Message'
          description: Required. An example of an input `Message` from the user.
      required:
      - input
      - output
      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:
          description: Required. The prompt text.
          type: string
      required:
      - text
      type: object
    GeneratedFile:
      description: A file generated on behalf of a user.
      example:
        name: name
        state: STATE_UNSPECIFIED
        mimeType: mimeType
        error: ""
      properties:
        error:
          allOf:
          - $ref: '#/components/schemas/Status'
          description: Error details if the GeneratedFile ends up in the STATE_FAILED
            state.
        name:
          description: |-
            Identifier. The name of the generated file.
            Example: `generatedFiles/abc-123`
          type: string
          x-google-identifier: true
        state:
          description: Output only. The state of the GeneratedFile.
          enum:
          - STATE_UNSPECIFIED
          - GENERATING
          - GENERATED
          - FAILED
          readOnly: true
          type: string
          x-google-enum-descriptions:
          - 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.
        mimeType:
          description: MIME type of the generatedFile.
          type: string
      type: object
    TransferOwnershipRequest:
      description: Request to transfer the ownership of the tuned model.
      example:
        emailAddress: emailAddress
      properties:
        emailAddress:
          description: |-
            Required. The email address of the user to whom the tuned model is being transferred
            to.
          type: string
      required:
      - emailAddress
      type: object
    UsageMetadata:
      description: Metadata on the generation request's token usage.
      properties:
        candidatesTokensDetails:
          description: Output only. List of modalities that were returned in the response.
          items:
            $ref: '#/components/schemas/ModalityTokenCount'
          readOnly: true
          type: array
        thoughtsTokenCount:
          description: Output only. Number of tokens of thoughts for thinking models.
          format: int32
          readOnly: true
          type: integer
        toolUsePromptTokenCount:
          description: Output only. Number of tokens present in tool-use prompt(s).
          format: int32
          readOnly: true
          type: integer
        cachedContentTokenCount:
          description: Number of tokens in the cached part of the prompt (the cached
            content)
          format: int32
          type: integer
        promptTokenCount:
          description: |-
            Number of tokens in the prompt. When `cached_content` is set, this is
            still the total effective prompt size meaning this includes the number of
            tokens in the cached content.
          format: int32
          type: integer
        candidatesTokenCount:
          description: Total number of tokens across all the generated response candidates.
          format: int32
          type: integer
        promptTokensDetails:
          description: Output only. List of modalities that were processed in the
            request input.
          items:
            $ref: '#/components/schemas/ModalityTokenCount'
          readOnly: true
          type: array
        totalTokenCount:
          description: |-
            Total token count for the generation request (prompt + response
            candidates).
          format: int32
          type: integer
        cacheTokensDetails:
          description: Output only. List of modalities of the cached content in the
            request input.
          items:
            $ref: '#/components/schemas/ModalityTokenCount'
          readOnly: true
          type: array
        toolUsePromptTokensDetails:
          description: Output only. List of modalities that were processed for tool-use
            request inputs.
          items:
            $ref: '#/components/schemas/ModalityTokenCount'
          readOnly: true
          type: array
      type: object
    ListGeneratedFilesResponse:
      description: Response for `ListGeneratedFiles`.
      example:
        generatedFiles:
        - name: name
          state: STATE_UNSPECIFIED
          mimeType: mimeType
          error: ""
        - name: name
          state: STATE_UNSPECIFIED
          mimeType: mimeType
          error: ""
        nextPageToken: nextPageToken
      properties:
        nextPageToken:
          description: |-
            A token that can be sent as a `page_token` into a subsequent
            `ListGeneratedFiles` call.
          type: string
        generatedFiles:
          description: The list of `GeneratedFile`s.
          items:
            $ref: '#/components/schemas/GeneratedFile'
          type: array
      type: object
    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.
      example:
        blocked: true
        probability: HARM_PROBABILITY_UNSPECIFIED
        category: ""
      properties:
        category:
          allOf:
          - $ref: '#/components/schemas/HarmCategory'
          description: Required. The category for this rating.
        blocked:
          description: Was this content blocked because of this rating?
          type: boolean
        probability:
          description: Required. The probability of harm for this content.
          enum:
          - HARM_PROBABILITY_UNSPECIFIED
          - NEGLIGIBLE
          - LOW
          - MEDIUM
          - HIGH
          type: string
          x-google-enum-descriptions:
          - 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.
      required:
      - category
      - probability
      type: object
    EmbedContentResponse:
      description: The response to an `EmbedContentRequest`.
      example:
        embedding: ""
      properties:
        embedding:
          allOf:
          - $ref: '#/components/schemas/ContentEmbedding'
          description: Output only. The embedding generated from the input content.
          readOnly: true
      type: object
    GenerationConfig:
      description: |-
        Configuration options for model generation and outputs. Not all parameters
        are configurable for every model.
      properties:
        responseSchema:
          allOf:
          - $ref: '#/components/schemas/Schema'
          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.
        thinkingConfig:
          allOf:
          - $ref: '#/components/schemas/ThinkingConfig'
          description: |-
            Optional. Config for thinking features.
            An error will be returned if this field is set for models that don't
            support thinking.
        logprobs:
          description: |-
            Optional. Only valid if response_logprobs=True.
            This sets the number of top logprobs to return at each decoding step in the
            Candidate.logprobs_result.
          format: int32
          type: integer
        mediaResolution:
          description: "Optional. If specified, the media resolution specified will\
            \ be used."
          enum:
          - MEDIA_RESOLUTION_UNSPECIFIED
          - MEDIA_RESOLUTION_LOW
          - MEDIA_RESOLUTION_MEDIUM
          - MEDIA_RESOLUTION_HIGH
          type: string
          x-google-enum-descriptions:
          - 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).
        stopSequences:
          description: |-
            Optional. The set of character sequences (up to 5) that will stop output generation.
            If specified, the API will stop at the first appearance of a
            `stop_sequence`. The stop sequence will not be included as part of the
            response.
          items:
            type: string
          type: array
        speechConfig:
          allOf:
          - $ref: '#/components/schemas/SpeechConfig'
          description: Optional. The speech generation config.
        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.
        presencePenalty:
          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.
          format: float
          type: number
        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
        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
        topK:
          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.
          format: int32
          type: integer
        candidateCount:
          description: |-
            Optional. Number of generated responses to return. If unset, this will default
            to 1. Please note that this doesn't work for previous generation
            models (Gemini 1.0 family)
          format: int32
          type: integer
        enableEnhancedCivicAnswers:
          description: Optional. Enables enhanced civic answers. It may not be available
            for all models.
          type: boolean
        responseLogprobs:
          description: "Optional. If true, export the logprobs results in response."
          type: boolean
        responseModalities:
          description: |-
            Optional. The requested modalities of the response. Represents the set of modalities
            that the model can return, and should be expected in the response. This is
            an exact match to the modalities of the response.

            A model may have multiple combinations of supported modalities. If the
            requested modalities do not match any of the supported combinations, an
            error will be returned.

            An empty list is equivalent to requesting only text.
          items:
            enum:
            - MODALITY_UNSPECIFIED
            - TEXT
            - IMAGE
            - AUDIO
            type: string
            x-google-enum-descriptions:
            - Default value.
            - Indicates the model should return text.
            - Indicates the model should return images.
            - Indicates the model should return audio.
          type: array
        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
        seed:
          description: |-
            Optional. Seed used in decoding. If not set, the request uses a randomly generated
            seed.
          format: int32
          type: integer
        maxOutputTokens:
          description: |-
            Optional. The maximum number of tokens to include in a response candidate.

            Note: The default value varies by model, see the `Model.output_token_limit`
            attribute of the `Model` returned from the `getModel` function.
          format: int32
          type: integer
        responseMimeType:
          description: |-
            Optional. MIME type of the generated candidate text.
            Supported MIME types are:
            `text/plain`: (default) Text output.
            `application/json`: JSON response in the response candidates.
            `text/x.enum`: ENUM as a string response in the response candidates.
            Refer to the
            [docs](https://ai.google.dev/gemini-api/docs/prompting_with_media#plain_text_formats)
            for a list of all supported text MIME types.
          type: string
      type: object
    CodeExecutionResult:
      description: |-
        Result of executing the `ExecutableCode`.

        Only generated when using the `CodeExecution`, and always follows a `part`
        containing the `ExecutableCode`.
      properties:
        outcome:
          description: Required. Outcome of the code execution.
          enum:
          - OUTCOME_UNSPECIFIED
          - OUTCOME_OK
          - OUTCOME_FAILED
          - OUTCOME_DEADLINE_EXCEEDED
          type: string
          x-google-enum-descriptions:
          - Unspecified status. This value should not be used.
          - Code execution completed successfully.
          - |-
            Code execution finished but with a failure. `stderr` should contain the
            reason.
          - |-
            Code execution ran for too long, and was cancelled. There may or may not
            be a partial output present.
        output:
          description: |-
            Optional. Contains stdout when code execution is successful, stderr or other
            description otherwise.
          type: string
      required:
      - outcome
      type: object
    ListChunksResponse:
      description: |-
        Response from `ListChunks` containing a paginated list of `Chunk`s.
        The `Chunk`s are sorted by ascending `chunk.create_time`.
      example:
        nextPageToken: nextPageToken
        chunks:
        - data: ""
          createTime: 2000-01-23T04:56:07.000+00:00
          customMetadata:
          - stringValue: stringValue
            stringListValue: ""
            numericValue: 0.8008282
            key: key
          - stringValue: stringValue
            stringListValue: ""
            numericValue: 0.8008282
            key: key
          name: name
          updateTime: 2000-01-23T04:56:07.000+00:00
          state: STATE_UNSPECIFIED
        - data: ""
          createTime: 2000-01-23T04:56:07.000+00:00
          customMetadata:
          - stringValue: stringValue
            stringListValue: ""
            numericValue: 0.8008282
            key: key
          - stringValue: stringValue
            stringListValue: ""
            numericValue: 0.8008282
            key: key
          name: name
          updateTime: 2000-01-23T04:56:07.000+00:00
          state: STATE_UNSPECIFIED
      properties:
        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
        chunks:
          description: The returned `Chunk`s.
          items:
            $ref: '#/components/schemas/Chunk'
          type: array
      type: object
    ThinkingConfig:
      description: Config for thinking features.
      properties:
        thinkingBudget:
          description: The number of thoughts tokens that the model should generate.
          format: int32
          type: integer
        includeThoughts:
          description: |-
            Indicates whether to include thoughts in the response.
            If true, thoughts are returned only when available.
          type: boolean
      type: object
    BatchEmbedTextResponse:
      description: The response to a EmbedTextRequest.
      example:
        embeddings:
        - value:
          - 0.8008282
          - 0.8008282
        - value:
          - 0.8008282
          - 0.8008282
      properties:
        embeddings:
          description: Output only. The embeddings generated from the input text.
          items:
            $ref: '#/components/schemas/Embedding'
          readOnly: true
          type: array
      type: object
    BatchDeleteChunksRequest:
      description: Request to batch delete `Chunk`s.
      example:
        requests:
        - name: name
        - name: name
      properties:
        requests:
          description: Required. The request messages specifying the `Chunk`s to delete.
          items:
            $ref: '#/components/schemas/DeleteChunkRequest'
          type: array
      required:
      - requests
      type: object
    SemanticRetrieverConfig:
      description: |-
        Configuration for retrieving grounding content from a `Corpus` or
        `Document` created using the Semantic Retriever API.
      properties:
        source:
          description: |-
            Required. Name of the resource for retrieval. Example: `corpora/123` or
            `corpora/123/documents/abc`.
          type: string
        query:
          allOf:
          - $ref: '#/components/schemas/Content'
          description: Required. Query to use for matching `Chunk`s in the given resource
            by similarity.
        maxChunksCount:
          description: Optional. Maximum number of relevant `Chunk`s to retrieve.
          format: int32
          type: integer
        metadataFilters:
          description: Optional. Filters for selecting `Document`s and/or `Chunk`s
            from the resource.
          items:
            $ref: '#/components/schemas/MetadataFilter'
          type: array
        minimumRelevanceScore:
          description: Optional. Minimum relevance score for retrieved relevant `Chunk`s.
          format: float
          type: number
      required:
      - query
      - source
      type: object
    TunedModel:
      description: A fine-tuned model created using ModelService.CreateTunedModel.
      example:
        topK: 1
        baseModel: baseModel
        displayName: displayName
        description: description
        updateTime: 2000-01-23T04:56:07.000+00:00
        topP: 6.0274563
        createTime: 2000-01-23T04:56:07.000+00:00
        tunedModelSource: ""
        readerProjectNumbers:
        - readerProjectNumbers
        - readerProjectNumbers
        name: name
        temperature: 0.8008282
        state: STATE_UNSPECIFIED
        tuningTask: ""
      properties:
        updateTime:
          description: Output only. The timestamp when this model was updated.
          format: date-time
          readOnly: true
          type: string
        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`
          readOnly: true
          type: string
        createTime:
          description: Output only. The timestamp when this model was created.
          format: date-time
          readOnly: true
          type: string
        tuningTask:
          allOf:
          - $ref: '#/components/schemas/TuningTask'
          description: Required. The tuning task that creates the tuned model.
        tunedModelSource:
          allOf:
          - $ref: '#/components/schemas/TunedModelSource'
          description: Optional. TunedModel to use as the starting point for training
            the new model.
        baseModel:
          description: |-
            Immutable. The name of the `Model` to tune.
            Example: `models/gemini-1.5-flash-001`
          type: string
          x-google-immutable: true
        readerProjectNumbers:
          description: Optional. List of project numbers that have read access to
            the tuned model.
          items:
            format: int64
            type: string
          type: array
        displayName:
          description: |-
            Optional. The name to display for this model in user interfaces.
            The display name must be up to 40 characters including spaces.
          type: string
        temperature:
          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.
          format: float
          type: number
        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
        topK:
          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.
          format: int32
          type: integer
        state:
          description: Output only. The state of the tuned model.
          enum:
          - STATE_UNSPECIFIED
          - CREATING
          - ACTIVE
          - FAILED
          readOnly: true
          type: string
          x-google-enum-descriptions:
          - 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.
      required:
      - tuningTask
      type: object
    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`.
      example:
        candidates:
        - urlContextMetadata: ""
          groundingMetadata: ""
          citationMetadata: ""
          groundingAttributions:
          - sourceId: ""
            content: ""
          - sourceId: ""
            content: ""
          avgLogprobs: 0.8008281904610115
          finishReason: FINISH_REASON_UNSPECIFIED
          index: 6
          tokenCount: 1
          safetyRatings:
          - blocked: true
            probability: HARM_PROBABILITY_UNSPECIFIED
            category: ""
          - blocked: true
            probability: HARM_PROBABILITY_UNSPECIFIED
            category: ""
          logprobsResult: ""
          content: ""
        - urlContextMetadata: ""
          groundingMetadata: ""
          citationMetadata: ""
          groundingAttributions:
          - sourceId: ""
            content: ""
          - sourceId: ""
            content: ""
          avgLogprobs: 0.8008281904610115
          finishReason: FINISH_REASON_UNSPECIFIED
          index: 6
          tokenCount: 1
          safetyRatings:
          - blocked: true
            probability: HARM_PROBABILITY_UNSPECIFIED
            category: ""
          - blocked: true
            probability: HARM_PROBABILITY_UNSPECIFIED
            category: ""
          logprobsResult: ""
          content: ""
        promptFeedback: ""
        modelVersion: modelVersion
        usageMetadata: ""
        responseId: responseId
      properties:
        candidates:
          description: Candidate responses from the model.
          items:
            $ref: '#/components/schemas/Candidate'
          type: array
        usageMetadata:
          allOf:
          - $ref: '#/components/schemas/UsageMetadata'
          description: Output only. Metadata on the generation requests' token usage.
          readOnly: true
        modelVersion:
          description: Output only. The model version used to generate the response.
          readOnly: true
          type: string
        promptFeedback:
          allOf:
          - $ref: '#/components/schemas/PromptFeedback'
          description: Returns the prompt's feedback related to the content filters.
        responseId:
          description: Output only. response_id is used to identify each response.
          readOnly: true
          type: string
      type: object
    Operation:
      allOf:
      - $ref: '#/components/schemas/BaseOperation'
      - properties:
          metadata:
            additionalProperties:
              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.
            type: object
          response:
            additionalProperties:
              description: Properties of the object. Contains field @type with type
                URL.
            description: |-
              The normal, successful response of the operation.  If the original
              method returns no data on success, such as `Delete`, the response is
              `google.protobuf.Empty`.  If the original method is standard
              `Get`/`Create`/`Update`, the response should be the resource.  For other
              methods, the response should have the type `XxxResponse`, where `Xxx`
              is the original method name.  For example, if the original method name
              is `TakeSnapshot()`, the inferred response type is
              `TakeSnapshotResponse`.
            type: object
        type: object
      description: |-
        This resource represents a long-running operation that is the result of a
        network API call.
      example:
        metadata:
          key: ""
        response:
          key: ""
        name: name
        error: ""
        done: true
      type: object
    DynamicRetrievalConfig:
      description: Describes the options to customize dynamic retrieval.
      properties:
        dynamicThreshold:
          description: |-
            The threshold to be used in dynamic retrieval.
            If not set, a system default value is used.
          format: float
          type: number
        mode:
          description: The mode of the predictor to be used in dynamic retrieval.
          enum:
          - MODE_UNSPECIFIED
          - MODE_DYNAMIC
          type: string
          x-google-enum-descriptions:
          - Always trigger retrieval.
          - Run retrieval only when system decides it is necessary.
      type: object
    UrlMetadata:
      description: Context of the a single url retrieval.
      properties:
        retrievedUrl:
          description: Retrieved url by the tool.
          type: string
        urlRetrievalStatus:
          description: Status of the url retrieval.
          enum:
          - URL_RETRIEVAL_STATUS_UNSPECIFIED
          - URL_RETRIEVAL_STATUS_SUCCESS
          - URL_RETRIEVAL_STATUS_ERROR
          type: string
          x-google-enum-descriptions:
          - Default value. This value is unused.
          - Url retrieval is successful.
          - Url retrieval is failed due to error.
      type: object
    Candidate:
      description: A response candidate generated from the model.
      example:
        urlContextMetadata: ""
        groundingMetadata: ""
        citationMetadata: ""
        groundingAttributions:
        - sourceId: ""
          content: ""
        - sourceId: ""
          content: ""
        avgLogprobs: 0.8008281904610115
        finishReason: FINISH_REASON_UNSPECIFIED
        index: 6
        tokenCount: 1
        safetyRatings:
        - blocked: true
          probability: HARM_PROBABILITY_UNSPECIFIED
          category: ""
        - blocked: true
          probability: HARM_PROBABILITY_UNSPECIFIED
          category: ""
        logprobsResult: ""
        content: ""
      properties:
        citationMetadata:
          allOf:
          - $ref: '#/components/schemas/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
        groundingMetadata:
          allOf:
          - $ref: '#/components/schemas/GroundingMetadata'
          description: |-
            Output only. Grounding metadata for the candidate.

            This field is populated for `GenerateContent` calls.
          readOnly: true
        urlContextMetadata:
          allOf:
          - $ref: '#/components/schemas/UrlContextMetadata'
          description: Output only. Metadata related to url context retrieval tool.
          readOnly: true
        groundingAttributions:
          description: |-
            Output only. Attribution information for sources that contributed to a grounded answer.

            This field is populated for `GenerateAnswer` calls.
          items:
            $ref: '#/components/schemas/GroundingAttribution'
          readOnly: true
          type: array
        logprobsResult:
          allOf:
          - $ref: '#/components/schemas/LogprobsResult'
          description: Output only. Log-likelihood scores for the response tokens
            and top tokens
          readOnly: true
        content:
          allOf:
          - $ref: '#/components/schemas/Content'
          description: Output only. Generated content returned from the model.
          readOnly: true
        avgLogprobs:
          description: Output only. Average log probability score of the candidate.
          format: double
          readOnly: true
          type: number
        index:
          description: Output only. Index of the candidate in the list of response
            candidates.
          format: int32
          readOnly: true
          type: integer
        finishReason:
          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
          readOnly: true
          type: string
          x-google-enum-descriptions:
          - 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.
        safetyRatings:
          description: |-
            List of ratings for the safety of a response candidate.

            There is at most one rating per category.
          items:
            $ref: '#/components/schemas/SafetyRating'
          type: array
        tokenCount:
          description: Output only. Token count for this candidate.
          format: int32
          readOnly: true
          type: integer
      type: object
    UrlContext:
      description: Tool to support URL context retrieval.
      type: object
    BatchCreateChunksResponse:
      description: Response from `BatchCreateChunks` containing a list of created
        `Chunk`s.
      example:
        chunks:
        - data: ""
          createTime: 2000-01-23T04:56:07.000+00:00
          customMetadata:
          - stringValue: stringValue
            stringListValue: ""
            numericValue: 0.8008282
            key: key
          - stringValue: stringValue
            stringListValue: ""
            numericValue: 0.8008282
            key: key
          name: name
          updateTime: 2000-01-23T04:56:07.000+00:00
          state: STATE_UNSPECIFIED
        - data: ""
          createTime: 2000-01-23T04:56:07.000+00:00
          customMetadata:
          - stringValue: stringValue
            stringListValue: ""
            numericValue: 0.8008282
            key: key
          - stringValue: stringValue
            stringListValue: ""
            numericValue: 0.8008282
            key: key
          name: name
          updateTime: 2000-01-23T04:56:07.000+00:00
          state: STATE_UNSPECIFIED
      properties:
        chunks:
          description: '`Chunk`s created.'
          items:
            $ref: '#/components/schemas/Chunk'
          type: array
      type: object
    GenerateAnswerRequest:
      description: Request to generate a grounded answer from the `Model`.
      example:
        safetySettings:
        - threshold: HARM_BLOCK_THRESHOLD_UNSPECIFIED
          category: ""
        - threshold: HARM_BLOCK_THRESHOLD_UNSPECIFIED
          category: ""
        semanticRetriever: ""
        answerStyle: ANSWER_STYLE_UNSPECIFIED
        contents:
        - role: role
          parts:
          - functionResponse: ""
            executableCode: ""
            codeExecutionResult: ""
            thought: true
            fileData: ""
            functionCall: ""
            inlineData: ""
            text: text
            thoughtSignature: thoughtSignature
            videoMetadata: ""
          - functionResponse: ""
            executableCode: ""
            codeExecutionResult: ""
            thought: true
            fileData: ""
            functionCall: ""
            inlineData: ""
            text: text
            thoughtSignature: thoughtSignature
            videoMetadata: ""
        - role: role
          parts:
          - functionResponse: ""
            executableCode: ""
            codeExecutionResult: ""
            thought: true
            fileData: ""
            functionCall: ""
            inlineData: ""
            text: text
            thoughtSignature: thoughtSignature
            videoMetadata: ""
          - functionResponse: ""
            executableCode: ""
            codeExecutionResult: ""
            thought: true
            fileData: ""
            functionCall: ""
            inlineData: ""
            text: text
            thoughtSignature: thoughtSignature
            videoMetadata: ""
        inlinePassages: ""
        temperature: 0.8008282
      properties:
        semanticRetriever:
          allOf:
          - $ref: '#/components/schemas/SemanticRetrieverConfig'
          description: |-
            Content retrieved from resources created via the Semantic Retriever
            API.
        temperature:
          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.
          format: float
          type: number
        answerStyle:
          description: Required. Style in which answers should be returned.
          enum:
          - ANSWER_STYLE_UNSPECIFIED
          - ABSTRACTIVE
          - EXTRACTIVE
          - VERBOSE
          type: string
          x-google-enum-descriptions:
          - Unspecified answer style.
          - Succint 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.
        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.
          items:
            $ref: '#/components/schemas/Content'
          type: array
        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.
          items:
            $ref: '#/components/schemas/SafetySetting'
          type: array
        inlinePassages:
          allOf:
          - $ref: '#/components/schemas/GroundingPassages'
          description: Passages provided inline with the request.
      required:
      - answerStyle
      - contents
      type: object
    CountMessageTokensResponse:
      description: |-
        A response from `CountMessageTokens`.

        It returns the model's `token_count` for the `prompt`.
      example:
        tokenCount: 0
      properties:
        tokenCount:
          description: |-
            The number of tokens that the `model` tokenizes the `prompt` into.

            Always non-negative.
          format: int32
          type: integer
      type: object
    Model:
      description: Information about a Generative Language Model.
      example:
        topK: 0
        supportedGenerationMethods:
        - supportedGenerationMethods
        - supportedGenerationMethods
        maxTemperature: 5.637377
        inputTokenLimit: 6
        displayName: displayName
        name: name
        temperature: 5.962134
        description: description
        outputTokenLimit: 2
        baseModelId: baseModelId
        version: version
        topP: 1.4658129
      properties:
        topK:
          description: |-
            For Top-k sampling.

            Top-k sampling considers the set of `top_k` most probable tokens.
            This value specifies default to be used by the backend while making the
            call to the model.
            If empty, indicates the model doesn't use top-k sampling, and `top_k` isn't
            allowed as a generation parameter.
          format: int32
          type: integer
        name:
          description: |-
            Required. The resource name of the `Model`. Refer to [Model
            variants](https://ai.google.dev/gemini-api/docs/models/gemini#model-variations)
            for all allowed values.

            Format: `models/{model}` with a `{model}` naming convention of:

            * "{base_model_id}-{version}"

            Examples:

            * `models/gemini-1.5-flash-001`
          type: string
        baseModelId:
          description: |-
            Required. The name of the base model, pass this to the generation request.

            Examples:

            * `gemini-1.5-flash`
          type: string
        version:
          description: |-
            Required. The version number of the model.

            This represents the major version (`1.0` or `1.5`)
          type: string
        inputTokenLimit:
          description: Maximum number of input tokens allowed for this model.
          format: int32
          type: integer
        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
        supportedGenerationMethods:
          description: |-
            The model's supported generation methods.

            The corresponding API method names are defined as Pascal case
            strings, such as `generateMessage` and `generateContent`.
          items:
            type: string
          type: array
        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
        displayName:
          description: |-
            The human-readable name of the model. E.g. "Gemini 1.5 Flash".

            The name can be up to 128 characters long and can consist of any UTF-8
            characters.
          type: string
        description:
          description: A short description of the model.
          type: string
        maxTemperature:
          description: The maximum temperature this model can use.
          format: float
          type: number
        outputTokenLimit:
          description: Maximum number of output tokens available for this model.
          format: int32
          type: integer
      required:
      - baseModelId
      - name
      - version
      type: object
    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:
        items:
          allOf:
          - $ref: '#/components/schemas/Schema'
          description: Optional. Schema of the elements of Type.ARRAY.
        anyOf:
          description: |-
            Optional. The value should be validated against any (one or more) of the subschemas
            in the list.
          items:
            $ref: '#/components/schemas/Schema'
          type: array
        minLength:
          description: |-
            Optional. SCHEMA FIELDS FOR TYPE STRING
            Minimum length of the Type.STRING
          format: int64
          type: string
        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
        nullable:
          description: Optional. Indicates if the value may be null.
          type: boolean
        required:
          description: Optional. Required properties of Type.OBJECT.
          items:
            type: string
          type: array
        minProperties:
          description: Optional. Minimum number of the properties for Type.OBJECT.
          format: int64
          type: string
        maxItems:
          description: Optional. Maximum number of the elements for Type.ARRAY.
          format: int64
          type: string
        example:
          description: Optional. Example of the object. Will only populated when the
            object is the root.
        title:
          description: Optional. The title of the schema.
          type: string
        minItems:
          description: Optional. Minimum number of the elements for Type.ARRAY.
          format: int64
          type: string
        description:
          description: |-
            Optional. A brief description of the parameter. This could contain examples of use.
            Parameter description may be formatted as Markdown.
          type: string
        type:
          allOf:
          - $ref: '#/components/schemas/Type'
          description: Required. Data type.
        default:
          description: |-
            Optional. Default value of the field. Per JSON Schema, this field is intended for
            documentation generators and doesn't affect validation. Thus it's included
            here and ignored so that developers who send schemas with a `default` field
            don't get unknown-field errors.
        minimum:
          description: |-
            Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
            Minimum value of the Type.INTEGER and Type.NUMBER
          format: double
          type: number
        pattern:
          description: Optional. Pattern of the Type.STRING to restrict a string to
            a regular expression.
          type: string
        properties:
          additionalProperties:
            $ref: '#/components/schemas/Schema'
          description: Optional. Properties of Type.OBJECT.
          type: object
        maxProperties:
          description: Optional. Maximum number of the properties for Type.OBJECT.
          format: int64
          type: string
        format:
          description: |-
            Optional. The format of the data. This is used only for primitive datatypes.
            Supported formats:
             for NUMBER type: float, double
             for INTEGER type: int32, int64
             for STRING type: enum, date-time
          type: string
        enum:
          description: |-
            Optional. Possible values of the element of Type.STRING with enum format.
            For example we can define an Enum Direction as :
            {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
          items:
            type: string
          type: array
        maxLength:
          description: Optional. Maximum length of the Type.STRING
          format: int64
          type: string
      required:
      - type
      type: object
    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.
      example:
        rating: ""
        setting: ""
      properties:
        setting:
          allOf:
          - $ref: '#/components/schemas/SafetySetting'
          description: Safety settings applied to the request.
        rating:
          allOf:
          - $ref: '#/components/schemas/SafetyRating'
          description: Safety rating evaluated from content.
      type: object
    VideoMetadata:
      description: Metadata describes the input video content.
      properties:
        endOffset:
          description: Optional. The end offset of the video.
          format: google-duration
          type: string
        startOffset:
          description: Optional. The start offset of the video.
          format: google-duration
          type: string
        fps:
          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].
          format: double
          type: number
      type: object
    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`.
      example:
        prompt: ""
      properties:
        prompt:
          allOf:
          - $ref: '#/components/schemas/MessagePrompt'
          description: "Required. The prompt, whose token count is to be returned."
      required:
      - prompt
      type: object
    CreateTunedModelMetadata:
      description: |-
        Metadata about the state and progress of creating a tuned model returned from
        the long-running operation
      example:
        completedSteps: 6
        snapshots:
        - meanLoss: 5.962134
          computeTime: 2000-01-23T04:56:07.000+00:00
          step: 5
          epoch: 2
        - meanLoss: 5.962134
          computeTime: 2000-01-23T04:56:07.000+00:00
          step: 5
          epoch: 2
        tunedModel: tunedModel
        totalSteps: 1
        completedPercent: 0.8008282
      properties:
        completedPercent:
          description: The completed percentage for the tuning operation.
          format: float
          type: number
        completedSteps:
          description: The number of steps completed.
          format: int32
          type: integer
        totalSteps:
          description: The total number of tuning steps.
          format: int32
          type: integer
        snapshots:
          description: Metrics collected during tuning.
          items:
            $ref: '#/components/schemas/TuningSnapshot'
          type: array
        tunedModel:
          description: Name of the tuned model associated with the tuning operation.
          type: string
      type: object
    SafetySetting:
      description: |-
        Safety setting, affecting the safety-blocking behavior.

        Passing a safety setting for a category changes the allowed probability that
        content is blocked.
      example:
        threshold: HARM_BLOCK_THRESHOLD_UNSPECIFIED
        category: ""
      properties:
        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
          x-google-enum-descriptions:
          - 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.
        category:
          allOf:
          - $ref: '#/components/schemas/HarmCategory'
          description: Required. The category for this setting.
      required:
      - category
      - threshold
      type: object
    BatchUpdateChunksResponse:
      description: Response from `BatchUpdateChunks` containing a list of updated
        `Chunk`s.
      example:
        chunks:
        - data: ""
          createTime: 2000-01-23T04:56:07.000+00:00
          customMetadata:
          - stringValue: stringValue
            stringListValue: ""
            numericValue: 0.8008282
            key: key
          - stringValue: stringValue
            stringListValue: ""
            numericValue: 0.8008282
            key: key
          name: name
          updateTime: 2000-01-23T04:56:07.000+00:00
          state: STATE_UNSPECIFIED
        - data: ""
          createTime: 2000-01-23T04:56:07.000+00:00
          customMetadata:
          - stringValue: stringValue
            stringListValue: ""
            numericValue: 0.8008282
            key: key
          - stringValue: stringValue
            stringListValue: ""
            numericValue: 0.8008282
            key: key
          name: name
          updateTime: 2000-01-23T04:56:07.000+00:00
          state: STATE_UNSPECIFIED
      properties:
        chunks:
          description: '`Chunk`s updated.'
          items:
            $ref: '#/components/schemas/Chunk'
          type: array
      type: object
    PredictLongRunningResponse:
      description: "Response message for [PredictionService.PredictLongRunning]"
      example:
        generateVideoResponse: ""
      properties:
        generateVideoResponse:
          allOf:
          - $ref: '#/components/schemas/GenerateVideoResponse'
          description: The response of the video generation prediction.
      type: object
    Media:
      description: A proto encapsulate various type of media.
      properties:
        video:
          allOf:
          - $ref: '#/components/schemas/Video'
          description: Video as the only one for now.  This is mimicking Vertex proto.
      type: object
    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`.
      example:
        prompt: ""
      properties:
        prompt:
          allOf:
          - $ref: '#/components/schemas/TextPrompt'
          description: Required. The free-form input text given to the model as a
            prompt.
      required:
      - prompt
      type: object
    PrebuiltVoiceConfig:
      description: The configuration for the prebuilt speaker to use.
      properties:
        voiceName:
          description: The name of the preset voice to use.
          type: string
      type: object
    QueryDocumentResponse:
      description: Response from `QueryDocument` containing a list of relevant chunks.
      example:
        relevantChunks:
        - chunkRelevanceScore: 0.8008282
          chunk: ""
        - chunkRelevanceScore: 0.8008282
          chunk: ""
      properties:
        relevantChunks:
          description: The returned relevant chunks.
          items:
            $ref: '#/components/schemas/RelevantChunk'
          type: array
      type: object
    EmbedContentRequest:
      description: Request containing the `Content` for the model to embed.
      example:
        taskType: ""
        outputDimensionality: 0
        model: model
        title: title
        content: ""
      properties:
        taskType:
          allOf:
          - $ref: '#/components/schemas/TaskType'
          description: |-
            Optional. Optional task type for which the embeddings will be used. Not supported on
            earlier models (`models/embedding-001`).
        content:
          allOf:
          - $ref: '#/components/schemas/Content'
          description: Required. The content to embed. Only the `parts.text` fields
            will be counted.
        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:
          description: |-
            Required. The model's resource name. This serves as an ID for the Model to use.

            This name should match a model name returned by the `ListModels` method.

            Format: `models/{model}`
          type: string
        title:
          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.
          type: string
      required:
      - content
      - model
      type: object
    ChunkData:
      description: Extracted data that represents the `Chunk` content.
      properties:
        stringValue:
          description: |-
            The `Chunk` content as a string.
            The maximum number of tokens per chunk is 2043.
          type: string
      type: object
    CustomMetadata:
      description: User provided metadata stored as key-value pairs.
      example:
        stringValue: stringValue
        stringListValue: ""
        numericValue: 0.8008282
        key: key
      properties:
        stringListValue:
          allOf:
          - $ref: '#/components/schemas/StringList'
          description: The StringList value of the metadata to store.
        stringValue:
          description: The string value of the metadata to store.
          type: string
        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
      required:
      - key
      type: object
    EmbedTextResponse:
      description: The response to a EmbedTextRequest.
      example:
        embedding: ""
      properties:
        embedding:
          allOf:
          - $ref: '#/components/schemas/Embedding'
          description: Output only. The embedding generated from the input text.
          readOnly: true
      type: object
    UrlContextMetadata:
      description: Metadata related to url context retrieval tool.
      properties:
        urlMetadata:
          description: List of url context.
          items:
            $ref: '#/components/schemas/UrlMetadata'
          type: array
      type: object
    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: date-time
          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: date-time
          type: string
      type: object
    Video:
      description: Representation of a video.
      properties:
        video:
          description: Raw bytes.
          format: byte
          type: string
        uri:
          description: Path to another storage.
          type: string
      type: object
    QueryCorpusResponse:
      description: Response from `QueryCorpus` containing a list of relevant chunks.
      example:
        relevantChunks:
        - chunkRelevanceScore: 0.8008282
          chunk: ""
        - chunkRelevanceScore: 0.8008282
          chunk: ""
      properties:
        relevantChunks:
          description: The relevant chunks.
          items:
            $ref: '#/components/schemas/RelevantChunk'
          type: array
      type: object
    TuningExample:
      description: A single example for tuning.
      properties:
        textInput:
          description: Optional. Text model input.
          type: string
        output:
          description: Required. The expected model output.
          type: string
      required:
      - output
      type: object
    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.
      example:
        toolConfig: ""
        expireTime: 2000-01-23T04:56:07.000+00:00
        contents:
        - role: role
          parts:
          - functionResponse: ""
            executableCode: ""
            codeExecutionResult: ""
            thought: true
            fileData: ""
            functionCall: ""
            inlineData: ""
            text: text
            thoughtSignature: thoughtSignature
            videoMetadata: ""
          - functionResponse: ""
            executableCode: ""
            codeExecutionResult: ""
            thought: true
            fileData: ""
            functionCall: ""
            inlineData: ""
            text: text
            thoughtSignature: thoughtSignature
            videoMetadata: ""
        - role: role
          parts:
          - functionResponse: ""
            executableCode: ""
            codeExecutionResult: ""
            thought: true
            fileData: ""
            functionCall: ""
            inlineData: ""
            text: text
            thoughtSignature: thoughtSignature
            videoMetadata: ""
          - functionResponse: ""
            executableCode: ""
            codeExecutionResult: ""
            thought: true
            fileData: ""
            functionCall: ""
            inlineData: ""
            text: text
            thoughtSignature: thoughtSignature
            videoMetadata: ""
        createTime: 2000-01-23T04:56:07.000+00:00
        displayName: displayName
        systemInstruction: ""
        name: name
        model: model
        updateTime: 2000-01-23T04:56:07.000+00:00
        usageMetadata: ""
        tools:
        - googleSearchRetrieval: ""
          googleSearch: ""
          codeExecution: ""
          urlContext: ""
          functionDeclarations:
          - responseJsonSchema: ""
            response: ""
            parametersJsonSchema: ""
            name: name
            description: description
            behavior: UNSPECIFIED
            parameters: ""
          - responseJsonSchema: ""
            response: ""
            parametersJsonSchema: ""
            name: name
            description: description
            behavior: UNSPECIFIED
            parameters: ""
        - googleSearchRetrieval: ""
          googleSearch: ""
          codeExecution: ""
          urlContext: ""
          functionDeclarations:
          - responseJsonSchema: ""
            response: ""
            parametersJsonSchema: ""
            name: name
            description: description
            behavior: UNSPECIFIED
            parameters: ""
          - responseJsonSchema: ""
            response: ""
            parametersJsonSchema: ""
            name: name
            description: description
            behavior: UNSPECIFIED
            parameters: ""
        ttl: ttl
      properties:
        tools:
          description: Optional. Input only. Immutable. A list of `Tools` the model
            may use to generate the next response
          items:
            $ref: '#/components/schemas/Tool'
          type: array
          writeOnly: true
          x-google-immutable: true
        displayName:
          description: |-
            Optional. Immutable. The user-generated meaningful display name of the cached content. Maximum
            128 Unicode characters.
          type: string
          x-google-immutable: true
        model:
          description: |-
            Required. Immutable. The name of the `Model` to use for cached content
            Format: `models/{model}`
          type: string
          x-google-immutable: true
        expireTime:
          description: |-
            Timestamp in UTC of when this resource is considered expired.
            This is *always* provided on output, regardless of what was sent
            on input.
          format: date-time
          type: string
        usageMetadata:
          allOf:
          - $ref: '#/components/schemas/CachedContentUsageMetadata'
          description: Output only. Metadata on the usage of the cached content.
          readOnly: true
        name:
          description: |-
            Output only. Identifier. The resource name referring to the cached content.
            Format: `cachedContents/{id}`
          readOnly: true
          type: string
          x-google-identifier: true
        contents:
          description: Optional. Input only. Immutable. The content to cache.
          items:
            $ref: '#/components/schemas/Content'
          type: array
          writeOnly: true
          x-google-immutable: true
        systemInstruction:
          allOf:
          - $ref: '#/components/schemas/Content'
          description: Optional. Input only. Immutable. Developer set system instruction.
            Currently text only.
          writeOnly: true
          x-google-immutable: true
        toolConfig:
          allOf:
          - $ref: '#/components/schemas/ToolConfig'
          description: Optional. Input only. Immutable. Tool config. This config is
            shared for all tools.
          writeOnly: true
          x-google-immutable: true
        createTime:
          description: Output only. Creation time of the cache entry.
          format: date-time
          readOnly: true
          type: string
        ttl:
          description: "Input only. New TTL for this resource, input only."
          format: google-duration
          type: string
          writeOnly: true
        updateTime:
          description: Output only. When the cache entry was last updated in UTC time.
          format: date-time
          readOnly: true
          type: string
      required:
      - model
      type: object
    GroundingChunk:
      description: Grounding chunk.
      properties:
        web:
          allOf:
          - $ref: '#/components/schemas/Web'
          description: Grounding chunk from the web.
      type: object
    PredictLongRunningMetadata:
      description: Metadata for PredictLongRunning long running operations.
      type: object
    SearchEntryPoint:
      description: Google search entry point.
      properties:
        sdkBlob:
          description: Optional. Base64 encoded JSON representing array of  tuple.
          format: byte
          type: string
        renderedContent:
          description: Optional. Web content snippet that can be embedded in a web
            page or an app webview.
          type: string
      type: object
    ModalityTokenCount:
      description: Represents token counting info for a single modality.
      example:
        modality: ""
        tokenCount: 0
      properties:
        tokenCount:
          description: Number of tokens.
          format: int32
          type: integer
        modality:
          allOf:
          - $ref: '#/components/schemas/Modality'
          description: The modality associated with this token count.
      type: object
    ExecutableCode:
      description: |-
        Code generated by the model that is meant to be executed, and the result
        returned to the model.

        Only generated when using the `CodeExecution` tool, in which the code will
        be automatically executed, and a corresponding `CodeExecutionResult` will
        also be generated.
      properties:
        language:
          description: Required. Programming language of the `code`.
          enum:
          - LANGUAGE_UNSPECIFIED
          - PYTHON
          type: string
          x-google-enum-descriptions:
          - Unspecified language. This value should not be used.
          - "Python >= 3.10, with numpy and simpy available."
        code:
          description: Required. The code to be executed.
          type: string
      required:
      - code
      - language
      type: object
    ContentFilter:
      description: |-
        Content filtering metadata associated with processing a single request.

        ContentFilter contains a reason and an optional supporting string. The reason
        may be unspecified.
      example:
        reason: BLOCKED_REASON_UNSPECIFIED
        message: message
      properties:
        reason:
          description: The reason content was blocked during request processing.
          enum:
          - BLOCKED_REASON_UNSPECIFIED
          - SAFETY
          - OTHER
          type: string
          x-google-enum-descriptions:
          - A blocked reason was not specified.
          - Content was blocked by safety settings.
          - "Content was blocked, but the reason is uncategorized."
        message:
          description: A string that describes the filtering behavior in more detail.
          type: string
      type: object
    QueryCorpusRequest:
      description: Request for querying a `Corpus`.
      example:
        query: query
        resultsCount: 6
        metadataFilters:
        - conditions:
          - stringValue: stringValue
            numericValue: 0.8008282
            operation: OPERATOR_UNSPECIFIED
          - stringValue: stringValue
            numericValue: 0.8008282
            operation: OPERATOR_UNSPECIFIED
          key: key
        - conditions:
          - stringValue: stringValue
            numericValue: 0.8008282
            operation: OPERATOR_UNSPECIFIED
          - stringValue: stringValue
            numericValue: 0.8008282
            operation: OPERATOR_UNSPECIFIED
          key: key
      properties:
        metadataFilters:
          description: |-
            Optional. Filter for `Chunk` and `Document` metadata. Each `MetadataFilter` object
            should correspond to a unique key. Multiple `MetadataFilter` objects are
            joined by logical "AND"s.

            Example query at document level:
            (year >= 2020 OR year < 2010) AND (genre = drama OR genre = action)

            `MetadataFilter` object list:
             metadata_filters = [
             {key = "document.custom_metadata.year"
              conditions = [{int_value = 2020, operation = GREATER_EQUAL},
                            {int_value = 2010, operation = LESS}]},
             {key = "document.custom_metadata.year"
              conditions = [{int_value = 2020, operation = GREATER_EQUAL},
                            {int_value = 2010, operation = LESS}]},
             {key = "document.custom_metadata.genre"
              conditions = [{string_value = "drama", operation = EQUAL},
                            {string_value = "action", operation = EQUAL}]}]

            Example query at chunk level for a numeric range of values:
            (year > 2015 AND year <= 2020)

            `MetadataFilter` object list:
             metadata_filters = [
             {key = "chunk.custom_metadata.year"
              conditions = [{int_value = 2015, operation = GREATER}]},
             {key = "chunk.custom_metadata.year"
              conditions = [{int_value = 2020, operation = LESS_EQUAL}]}]

            Note: "AND"s for the same key are only supported for numeric values. String
            values only support "OR"s for the same key.
          items:
            $ref: '#/components/schemas/MetadataFilter'
          type: array
        query:
          description: Required. Query string to perform semantic search.
          type: string
        resultsCount:
          description: |-
            Optional. The maximum number of `Chunk`s to return.
            The service may return fewer `Chunk`s.

            If unspecified, at most 10 `Chunk`s will be returned.
            The maximum specified result count is 100.
          format: int32
          type: integer
      required:
      - query
      type: object
    PredictRequest:
      description: Request message for PredictionService.Predict.
      example:
        instances:
        - ""
        - ""
        parameters: ""
      properties:
        instances:
          description: Required. The instances that are the input to the prediction
            call.
          items: {}
          type: array
        parameters:
          description: Optional. The parameters that govern the prediction call.
      required:
      - instances
      type: object
    GenerateAnswerResponse:
      description: Response from the model for a grounded answer.
      example:
        answer: ""
        answerableProbability: 0.8008282
        inputFeedback: ""
      properties:
        answer:
          allOf:
          - $ref: '#/components/schemas/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:
          allOf:
          - $ref: '#/components/schemas/InputFeedback'
          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`)
          readOnly: true
        answerableProbability:
          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.
          format: float
          readOnly: true
          type: number
      type: object
    Embedding:
      description: A list of floats representing the embedding.
      example:
        value:
        - 0.8008282
        - 0.8008282
      properties:
        value:
          description: The embedding values.
          items:
            format: float
            type: number
          type: array
      type: object
    BatchCreateChunksRequest:
      description: Request to batch create `Chunk`s.
      example:
        requests:
        - parent: parent
          chunk: ""
        - parent: parent
          chunk: ""
      properties:
        requests:
          description: |-
            Required. The request messages specifying the `Chunk`s to create.
            A maximum of 100 `Chunk`s can be created in a batch.
          items:
            $ref: '#/components/schemas/CreateChunkRequest'
          type: array
      required:
      - requests
      type: object
    PredictLongRunningOperation:
      allOf:
      - $ref: '#/components/schemas/BaseOperation'
      - properties:
          metadata:
            $ref: '#/components/schemas/PredictLongRunningMetadata'
          response:
            $ref: '#/components/schemas/PredictLongRunningResponse'
        type: object
      description: This resource represents a long-running operation where metadata
        and response fields are strongly typed.
      example:
        metadata: null
        response:
          generateVideoResponse: ""
        name: name
        error: ""
        done: true
      type: object
    SemanticRetrieverChunk:
      description: |-
        Identifier for a `Chunk` retrieved via Semantic Retriever specified in the
        `GenerateAnswerRequest` using `SemanticRetrieverConfig`.
      properties:
        chunk:
          description: |-
            Output only. Name of the `Chunk` containing the attributed text.
            Example: `corpora/123/documents/abc/chunks/xyz`
          readOnly: true
          type: string
        source:
          description: |-
            Output only. Name of the source matching the request's
            `SemanticRetrieverConfig.source`. Example: `corpora/123` or
            `corpora/123/documents/abc`
          readOnly: true
          type: string
      type: object
    Condition:
      description: Filter condition applicable to a single key.
      example:
        stringValue: stringValue
        numericValue: 0.8008282
        operation: OPERATOR_UNSPECIFIED
      properties:
        numericValue:
          description: The numeric value to filter the metadata on.
          format: float
          type: number
        operation:
          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
          type: string
          x-google-enum-descriptions:
          - 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`.
        stringValue:
          description: The string value to filter the metadata on.
          type: string
      required:
      - operation
      type: object
    Document:
      description: |-
        A `Document` is a collection of `Chunk`s.
        A `Corpus` can have a maximum of 10,000 `Document`s.
      example:
        createTime: 2000-01-23T04:56:07.000+00:00
        displayName: displayName
        name: name
        customMetadata:
        - stringValue: stringValue
          stringListValue: ""
          numericValue: 0.8008282
          key: key
        - stringValue: stringValue
          stringListValue: ""
          numericValue: 0.8008282
          key: key
        updateTime: 2000-01-23T04:56:07.000+00:00
      properties:
        updateTime:
          description: Output only. The Timestamp of when the `Document` was last
            updated.
          format: date-time
          readOnly: true
          type: string
        name:
          description: |-
            Immutable. Identifier. The `Document` resource name. The ID (name excluding the
            "corpora/*/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: `corpora/{corpus_id}/documents/my-awesome-doc-123a456b789c`
          type: string
          x-google-immutable: true
          x-google-identifier: true
        customMetadata:
          description: |-
            Optional. User provided custom metadata stored as key-value pairs used for querying.
            A `Document` can have a maximum of 20 `CustomMetadata`.
          items:
            $ref: '#/components/schemas/CustomMetadata'
          type: array
        createTime:
          description: Output only. The Timestamp of when the `Document` was created.
          format: date-time
          readOnly: true
          type: string
        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
      type: object
    Corpus:
      description: |-
        A `Corpus` is a collection of `Document`s.
        A project can create up to 5 corpora.
      example:
        createTime: 2000-01-23T04:56:07.000+00:00
        displayName: displayName
        name: name
        updateTime: 2000-01-23T04:56:07.000+00:00
      properties:
        updateTime:
          description: Output only. The Timestamp of when the `Corpus` was last updated.
          format: date-time
          readOnly: true
          type: string
        createTime:
          description: Output only. The Timestamp of when the `Corpus` was created.
          format: date-time
          readOnly: true
          type: string
        displayName:
          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"
          type: string
        name:
          description: |-
            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`
          type: string
          x-google-immutable: true
          x-google-identifier: true
      type: object
    FunctionCallingConfig:
      description: Configuration for specifying function calling behavior.
      properties:
        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
          x-google-enum-descriptions:
          - 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.
        allowedFunctionNames:
          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. Function names
            should match [FunctionDeclaration.name]. With mode set to ANY, model will
            predict a function call from the set of function names provided.
          items:
            type: string
          type: array
      type: object
    BatchEmbedContentsResponse:
      description: The response to a `BatchEmbedContentsRequest`.
      example:
        embeddings:
        - values:
          - 0.8008282
          - 0.8008282
        - values:
          - 0.8008282
          - 0.8008282
      properties:
        embeddings:
          description: |-
            Output only. The embeddings for each request, in the same order as provided in the batch
            request.
          items:
            $ref: '#/components/schemas/ContentEmbedding'
          readOnly: true
          type: array
      type: object
    HarmCategory:
      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
      x-google-enum-descriptions:
      - 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.'
    CountTokensResponse:
      description: |-
        A response from `CountTokens`.

        It returns the model's `token_count` for the `prompt`.
      example:
        promptTokensDetails:
        - modality: ""
          tokenCount: 0
        - modality: ""
          tokenCount: 0
        cachedContentTokenCount: 1
        totalTokens: 6
        cacheTokensDetails:
        - modality: ""
          tokenCount: 0
        - modality: ""
          tokenCount: 0
      properties:
        cacheTokensDetails:
          description: Output only. List of modalities that were processed in the
            cached content.
          items:
            $ref: '#/components/schemas/ModalityTokenCount'
          readOnly: true
          type: array
        promptTokensDetails:
          description: Output only. List of modalities that were processed in the
            request input.
          items:
            $ref: '#/components/schemas/ModalityTokenCount'
          readOnly: true
          type: array
        totalTokens:
          description: |-
            The number of tokens that the `Model` tokenizes the `prompt` into. Always
            non-negative.
          format: int32
          type: integer
        cachedContentTokenCount:
          description: Number of tokens in the cached part of the prompt (the cached
            content).
          format: int32
          type: integer
      type: object
    ContentEmbedding:
      description: A list of floats representing an embedding.
      example:
        values:
        - 0.8008282
        - 0.8008282
      properties:
        values:
          description: The embedding values.
          items:
            format: float
            type: number
          type: array
      type: object
    RetrievalMetadata:
      description: Metadata related to retrieval in the grounding flow.
      properties:
        googleSearchDynamicRetrievalScore:
          description: |-
            Optional. Score indicating how likely information from google search could help
            answer the prompt. The score is in the range [0, 1], where 0 is the least
            likely and 1 is the most likely. This score is only populated when
            google search grounding and dynamic retrieval is enabled. It will be
            compared to the threshold to determine whether to trigger google search.
          format: float
          type: number
      type: object
    GroundingPassages:
      description: A repeated list of passages.
      properties:
        passages:
          description: List of passages.
          items:
            $ref: '#/components/schemas/GroundingPassage'
          type: array
      type: object
    VideoFileMetadata:
      description: Metadata for a video `File`.
      properties:
        videoDuration:
          description: Duration of the video.
          format: google-duration
          type: string
      type: object
    GenerateMessageRequest:
      description: Request to generate a message response from the model.
      example:
        topK: 5
        temperature: 0.8008282
        topP: 6.0274563
        prompt: ""
        candidateCount: 1
      properties:
        temperature:
          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.
          format: float
          type: number
        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
        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:
          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.
          format: int32
          type: integer
        prompt:
          allOf:
          - $ref: '#/components/schemas/MessagePrompt'
          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.
      required:
      - prompt
      type: object
    LogprobsResult:
      description: Logprobs Result
      properties:
        chosenCandidates:
          description: |-
            Length = total number of decoding steps.
            The chosen candidates may or may not be in top_candidates.
          items:
            $ref: '#/components/schemas/LogprobsResultCandidate'
          type: array
        topCandidates:
          description: Length = total number of decoding steps.
          items:
            $ref: '#/components/schemas/TopCandidates'
          type: array
      type: object
    CountTextTokensResponse:
      description: |-
        A response from `CountTextTokens`.

        It returns the model's `token_count` for the `prompt`.
      example:
        tokenCount: 0
      properties:
        tokenCount:
          description: |-
            The number of tokens that the `model` tokenizes the `prompt` into.

            Always non-negative.
          format: int32
          type: integer
      type: object
    VoiceConfig:
      description: The configuration for the voice to use.
      properties:
        prebuiltVoiceConfig:
          allOf:
          - $ref: '#/components/schemas/PrebuiltVoiceConfig'
          description: The configuration for the prebuilt voice to use.
      type: object
    ListModelsResponse:
      description: Response from `ListModel` containing a paginated list of Models.
      example:
        models:
        - topK: 0
          supportedGenerationMethods:
          - supportedGenerationMethods
          - supportedGenerationMethods
          maxTemperature: 5.637377
          inputTokenLimit: 6
          displayName: displayName
          name: name
          temperature: 5.962134
          description: description
          outputTokenLimit: 2
          baseModelId: baseModelId
          version: version
          topP: 1.4658129
        - topK: 0
          supportedGenerationMethods:
          - supportedGenerationMethods
          - supportedGenerationMethods
          maxTemperature: 5.637377
          inputTokenLimit: 6
          displayName: displayName
          name: name
          temperature: 5.962134
          description: description
          outputTokenLimit: 2
          baseModelId: baseModelId
          version: version
          topP: 1.4658129
        nextPageToken: nextPageToken
      properties:
        models:
          description: The returned Models.
          items:
            $ref: '#/components/schemas/Model'
          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
      type: object
    ListPermissionsResponse:
      description: |-
        Response from `ListPermissions` containing a paginated list of
        permissions.
      example:
        permissions:
        - emailAddress: emailAddress
          role: ROLE_UNSPECIFIED
          name: name
          granteeType: GRANTEE_TYPE_UNSPECIFIED
        - emailAddress: emailAddress
          role: ROLE_UNSPECIFIED
          name: name
          granteeType: GRANTEE_TYPE_UNSPECIFIED
        nextPageToken: nextPageToken
      properties:
        permissions:
          description: Returned permissions.
          items:
            $ref: '#/components/schemas/Permission'
          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
      type: object
    CreateTunedModelOperation:
      allOf:
      - $ref: '#/components/schemas/BaseOperation'
      - properties:
          metadata:
            $ref: '#/components/schemas/CreateTunedModelMetadata'
          response:
            $ref: '#/components/schemas/TunedModel'
        type: object
      description: This resource represents a long-running operation where metadata
        and response fields are strongly typed.
      example:
        metadata:
          completedSteps: 6
          snapshots:
          - meanLoss: 5.962134
            computeTime: 2000-01-23T04:56:07.000+00:00
            step: 5
            epoch: 2
          - meanLoss: 5.962134
            computeTime: 2000-01-23T04:56:07.000+00:00
            step: 5
            epoch: 2
          tunedModel: tunedModel
          totalSteps: 1
          completedPercent: 0.8008282
        response:
          topK: 1
          baseModel: baseModel
          displayName: displayName
          description: description
          updateTime: 2000-01-23T04:56:07.000+00:00
          topP: 6.0274563
          createTime: 2000-01-23T04:56:07.000+00:00
          tunedModelSource: ""
          readerProjectNumbers:
          - readerProjectNumbers
          - readerProjectNumbers
          name: name
          temperature: 0.8008282
          state: STATE_UNSPECIFIED
          tuningTask: ""
        name: name
        error: ""
        done: true
      type: object
    Blob:
      description: |-
        Raw media bytes.

        Text should not be sent as raw bytes, use the 'text' field.
      properties:
        data:
          description: Raw bytes for media formats.
          format: byte
          type: string
        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
      type: object
    ListOperationsResponse:
      description: The response message for Operations.ListOperations.
      example:
        operations:
        - metadata:
            key: ""
          response:
            key: ""
          name: name
          error: ""
          done: true
        - metadata:
            key: ""
          response:
            key: ""
          name: name
          error: ""
          done: true
        nextPageToken: nextPageToken
      properties:
        nextPageToken:
          description: The standard List next-page token.
          type: string
        operations:
          description: A list of operations that matches the specified filter in the
            request.
          items:
            $ref: '#/components/schemas/Operation'
          type: array
      type: object
    SpeechConfig:
      description: The speech generation config.
      properties:
        voiceConfig:
          allOf:
          - $ref: '#/components/schemas/VoiceConfig'
          description: The configuration in case of single-voice output.
        languageCode:
          description: |-
            Optional. Language code (in BCP 47 format, e.g. "en-US") for speech 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.
          type: string
        multiSpeakerVoiceConfig:
          allOf:
          - $ref: '#/components/schemas/MultiSpeakerVoiceConfig'
          description: |-
            Optional. The configuration for the multi-speaker setup.
            It is mutually exclusive with the voice_config field.
      type: object
    GroundingSupport:
      description: Grounding support.
      properties:
        confidenceScores:
          description: |-
            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:
            format: float
            type: number
          type: array
        groundingChunkIndices:
          description: |-
            A list of indices (into 'grounding_chunk') 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.
          items:
            format: int32
            type: integer
          type: array
        segment:
          allOf:
          - $ref: '#/components/schemas/Segment'
          description: Segment of the content this support belongs to.
      type: object
    ListFilesResponse:
      description: Response for `ListFiles`.
      example:
        nextPageToken: nextPageToken
        files:
        - displayName: displayName
          updateTime: 2000-01-23T04:56:07.000+00:00
          source: SOURCE_UNSPECIFIED
          mimeType: mimeType
          downloadUri: downloadUri
          error: ""
          uri: uri
          videoMetadata: ""
          sizeBytes: sizeBytes
          createTime: 2000-01-23T04:56:07.000+00:00
          sha256Hash: sha256Hash
          expirationTime: 2000-01-23T04:56:07.000+00:00
          name: name
          state: STATE_UNSPECIFIED
        - displayName: displayName
          updateTime: 2000-01-23T04:56:07.000+00:00
          source: SOURCE_UNSPECIFIED
          mimeType: mimeType
          downloadUri: downloadUri
          error: ""
          uri: uri
          videoMetadata: ""
          sizeBytes: sizeBytes
          createTime: 2000-01-23T04:56:07.000+00:00
          sha256Hash: sha256Hash
          expirationTime: 2000-01-23T04:56:07.000+00:00
          name: name
          state: STATE_UNSPECIFIED
      properties:
        nextPageToken:
          description: |-
            A token that can be sent as a `page_token` into a subsequent `ListFiles`
            call.
          type: string
        files:
          description: The list of `File`s.
          items:
            $ref: '#/components/schemas/File'
          type: array
      type: object
    Type:
      enum:
      - TYPE_UNSPECIFIED
      - STRING
      - NUMBER
      - INTEGER
      - BOOLEAN
      - ARRAY
      - OBJECT
      - "NULL"
      type: string
      x-google-enum-descriptions:
      - "Not specified, should not be used."
      - String type.
      - Number type.
      - Integer type.
      - Boolean type.
      - Array type.
      - Object type.
      - Null type.
    BatchEmbedContentsRequest:
      description: Batch request to get embeddings from the model for a list of prompts.
      example:
        requests:
        - taskType: ""
          outputDimensionality: 0
          model: model
          title: title
          content: ""
        - taskType: ""
          outputDimensionality: 0
          model: model
          title: title
          content: ""
      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: '#/components/schemas/EmbedContentRequest'
          type: array
      required:
      - requests
      type: object
    TransferOwnershipResponse:
      description: Response from `TransferOwnership`.
      type: object
    PromptFeedback:
      description: |-
        A set of the feedback metadata the prompt specified in
        `GenerateContentRequest.content`.
      properties:
        blockReason:
          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
          type: string
          x-google-enum-descriptions:
          - 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.
        safetyRatings:
          description: |-
            Ratings for safety of the prompt.
            There is at most one rating per category.
          items:
            $ref: '#/components/schemas/SafetyRating'
          type: array
      type: object
    InputFeedback:
      description: |-
        Feedback related to the input data used to answer the question, as opposed
        to the model-generated response to the question.
      properties:
        safetyRatings:
          description: |-
            Ratings for safety of the input.
            There is at most one rating per category.
          items:
            $ref: '#/components/schemas/SafetyRating'
          type: array
        blockReason:
          description: |-
            Optional. If set, the input was blocked and no candidates are returned.
            Rephrase the input.
          enum:
          - BLOCK_REASON_UNSPECIFIED
          - SAFETY
          - OTHER
          type: string
          x-google-enum-descriptions:
          - 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.
      type: object
    RelevantChunk:
      description: The information for a chunk relevant to a query.
      example:
        chunkRelevanceScore: 0.8008282
        chunk: ""
      properties:
        chunk:
          allOf:
          - $ref: '#/components/schemas/Chunk'
          description: '`Chunk` associated with the query.'
        chunkRelevanceScore:
          description: '`Chunk` relevance to the query.'
          format: float
          type: number
      type: object
    QueryDocumentRequest:
      description: Request for querying a `Document`.
      example:
        query: query
        resultsCount: 0
        metadataFilters:
        - conditions:
          - stringValue: stringValue
            numericValue: 0.8008282
            operation: OPERATOR_UNSPECIFIED
          - stringValue: stringValue
            numericValue: 0.8008282
            operation: OPERATOR_UNSPECIFIED
          key: key
        - conditions:
          - stringValue: stringValue
            numericValue: 0.8008282
            operation: OPERATOR_UNSPECIFIED
          - stringValue: stringValue
            numericValue: 0.8008282
            operation: OPERATOR_UNSPECIFIED
          key: key
      properties:
        query:
          description: Required. Query string to perform semantic search.
          type: string
        resultsCount:
          description: |-
            Optional. The maximum number of `Chunk`s to return.
            The service may return fewer `Chunk`s.

            If unspecified, at most 10 `Chunk`s will be returned.
            The maximum specified result count is 100.
          format: int32
          type: integer
        metadataFilters:
          description: |-
            Optional. Filter for `Chunk` metadata. Each `MetadataFilter` object should
            correspond to a unique key. Multiple `MetadataFilter` objects are joined by
            logical "AND"s.

            Note: `Document`-level filtering is not supported for this request because
            a `Document` name is already specified.

            Example query:
            (year >= 2020 OR year < 2010) AND (genre = drama OR genre = action)

            `MetadataFilter` object list:
             metadata_filters = [
             {key = "chunk.custom_metadata.year"
              conditions = [{int_value = 2020, operation = GREATER_EQUAL},
                            {int_value = 2010, operation = LESS}},
             {key = "chunk.custom_metadata.genre"
              conditions = [{string_value = "drama", operation = EQUAL},
                            {string_value = "action", operation = EQUAL}}]

            Example query for a numeric range of values:
            (year > 2015 AND year <= 2020)

            `MetadataFilter` object list:
             metadata_filters = [
             {key = "chunk.custom_metadata.year"
              conditions = [{int_value = 2015, operation = GREATER}]},
             {key = "chunk.custom_metadata.year"
              conditions = [{int_value = 2020, operation = LESS_EQUAL}]}]

            Note: "AND"s for the same key are only supported for numeric values. String
            values only support "OR"s for the same key.
          items:
            $ref: '#/components/schemas/MetadataFilter'
          type: array
      required:
      - query
      type: object
    FunctionResponse:
      description: |-
        The result output from a `FunctionCall` that contains a string
        representing the `FunctionDeclaration.name` and a structured JSON
        object containing any output from the function is used as context to
        the model. This should contain the result of a`FunctionCall` made
        based on model prediction.
      properties:
        scheduling:
          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.
          enum:
          - SCHEDULING_UNSPECIFIED
          - SILENT
          - WHEN_IDLE
          - INTERRUPT
          type: string
          x-google-enum-descriptions:
          - 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.
        id:
          description: |-
            Optional. The id of the function call this response is for. Populated by the client
            to match the corresponding function call `id`.
          type: string
        willContinue:
          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`.
          type: boolean
        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 63.
          type: string
        response:
          additionalProperties:
            description: Properties of the object.
          description: Required. The function response in JSON object format.
          type: object
      required:
      - name
      - response
      type: object
    CreateChunkRequest:
      description: Request to create a `Chunk`.
      example:
        parent: parent
        chunk: ""
      properties:
        parent:
          description: |-
            Required. The name of the `Document` where this `Chunk` will be created.
            Example: `corpora/my-corpus-123/documents/the-doc-abc`
          type: string
        chunk:
          allOf:
          - $ref: '#/components/schemas/Chunk'
          description: Required. The `Chunk` to create.
      required:
      - chunk
      - parent
      type: object
    BatchEmbedTextRequest:
      description: Batch request to get a text embedding from the model.
      example:
        texts:
        - texts
        - texts
        requests:
        - model: model
          text: text
        - model: model
          text: text
      properties:
        requests:
          description: Optional. Embed requests for the batch. Only one of `texts`
            or `requests` can be set.
          items:
            $ref: '#/components/schemas/EmbedTextRequest'
          type: array
        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.
          items:
            type: string
          type: array
      type: object
    SpeakerVoiceConfig:
      description: The configuration for a single speaker in a multi speaker setup.
      properties:
        voiceConfig:
          allOf:
          - $ref: '#/components/schemas/VoiceConfig'
          description: Required. The configuration for the voice to use.
        speaker:
          description: Required. The name of the speaker to use. Should be the same
            as in the prompt.
          type: string
      required:
      - speaker
      - voiceConfig
      type: object
    ListTunedModelsResponse:
      description: Response from `ListTunedModels` containing a paginated list of
        Models.
      example:
        nextPageToken: nextPageToken
        tunedModels:
        - topK: 1
          baseModel: baseModel
          displayName: displayName
          description: description
          updateTime: 2000-01-23T04:56:07.000+00:00
          topP: 6.0274563
          createTime: 2000-01-23T04:56:07.000+00:00
          tunedModelSource: ""
          readerProjectNumbers:
          - readerProjectNumbers
          - readerProjectNumbers
          name: name
          temperature: 0.8008282
          state: STATE_UNSPECIFIED
          tuningTask: ""
        - topK: 1
          baseModel: baseModel
          displayName: displayName
          description: description
          updateTime: 2000-01-23T04:56:07.000+00:00
          topP: 6.0274563
          createTime: 2000-01-23T04:56:07.000+00:00
          tunedModelSource: ""
          readerProjectNumbers:
          - readerProjectNumbers
          - readerProjectNumbers
          name: name
          temperature: 0.8008282
          state: STATE_UNSPECIFIED
          tuningTask: ""
      properties:
        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
        tunedModels:
          description: The returned Models.
          items:
            $ref: '#/components/schemas/TunedModel'
          type: array
      type: object
    Modality:
      enum:
      - MODALITY_UNSPECIFIED
      - TEXT
      - IMAGE
      - VIDEO
      - AUDIO
      - DOCUMENT
      type: string
      x-google-enum-descriptions:
      - Unspecified modality.
      - Plain text.
      - Image.
      - Video.
      - Audio.
      - "Document, e.g. PDF."
    Chunk:
      description: |-
        A `Chunk` is a subpart of a `Document` that is treated as an independent unit
        for the purposes of vector representation and storage.
        A `Corpus` can have a maximum of 1 million `Chunk`s.
      example:
        data: ""
        createTime: 2000-01-23T04:56:07.000+00:00
        customMetadata:
        - stringValue: stringValue
          stringListValue: ""
          numericValue: 0.8008282
          key: key
        - stringValue: stringValue
          stringListValue: ""
          numericValue: 0.8008282
          key: key
        name: name
        updateTime: 2000-01-23T04:56:07.000+00:00
        state: STATE_UNSPECIFIED
      properties:
        createTime:
          description: Output only. The Timestamp of when the `Chunk` was created.
          format: date-time
          readOnly: true
          type: string
        customMetadata:
          description: |-
            Optional. User provided custom metadata stored as key-value pairs.
            The maximum number of `CustomMetadata` per chunk is 20.
          items:
            $ref: '#/components/schemas/CustomMetadata'
          type: array
        data:
          allOf:
          - $ref: '#/components/schemas/ChunkData'
          description: |-
            Required. The content for the `Chunk`, such as the text string.
            The maximum number of tokens per chunk is 2043.
        updateTime:
          description: Output only. The Timestamp of when the `Chunk` was last updated.
          format: date-time
          readOnly: true
          type: string
        state:
          description: Output only. Current state of the `Chunk`.
          enum:
          - STATE_UNSPECIFIED
          - STATE_PENDING_PROCESSING
          - STATE_ACTIVE
          - STATE_FAILED
          readOnly: true
          type: string
          x-google-enum-descriptions:
          - The default value. This value is used if the state is omitted.
          - '`Chunk` is being processed (embedding and vector storage).'
          - '`Chunk` is processed and available for querying.'
          - '`Chunk` failed processing.'
        name:
          description: |-
            Immutable. Identifier. The `Chunk` resource name. The ID (name excluding the
            "corpora/*/documents/*/chunks/" 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 random 12-character unique
            ID will be generated.
            Example: `corpora/{corpus_id}/documents/{document_id}/chunks/123a456b789c`
          type: string
          x-google-immutable: true
          x-google-identifier: true
      required:
      - data
      type: object
    GenerateMessageResponse:
      description: |-
        The response from the model.

        This includes candidate messages and
        conversation history in the form of chronologically-ordered messages.
      example:
        candidates:
        - citationMetadata: ""
          author: author
          content: content
        - citationMetadata: ""
          author: author
          content: content
        messages:
        - citationMetadata: ""
          author: author
          content: content
        - citationMetadata: ""
          author: author
          content: content
        filters:
        - reason: BLOCKED_REASON_UNSPECIFIED
          message: message
        - reason: BLOCKED_REASON_UNSPECIFIED
          message: message
      properties:
        candidates:
          description: Candidate response messages from the model.
          items:
            $ref: '#/components/schemas/Message'
          type: array
        messages:
          description: The conversation history used by the model.
          items:
            $ref: '#/components/schemas/Message'
          type: array
        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.
          items:
            $ref: '#/components/schemas/ContentFilter'
          type: array
      type: object
    UpdateChunkRequest:
      description: Request to update a `Chunk`.
      example:
        chunk: ""
        updateMask: updateMask
      properties:
        updateMask:
          description: |-
            Required. The list of fields to update.
            Currently, this only supports updating `custom_metadata` and `data`.
          format: google-fieldmask
          pattern: "^(\\s*[^,\\s.]+(\\s*[,.]\\s*[^,\\s.]+)*)?$"
          type: string
        chunk:
          allOf:
          - $ref: '#/components/schemas/Chunk'
          description: Required. The `Chunk` to update.
      required:
      - chunk
      - updateMask
      type: object
    GoogleSearch:
      description: |-
        GoogleSearch tool type.
        Tool to support Google Search in Model. Powered by Google.
      properties:
        timeRangeFilter:
          allOf:
          - $ref: '#/components/schemas/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).
      type: object
    PredictResponse:
      description: "Response message for [PredictionService.Predict]."
      example:
        predictions:
        - ""
        - ""
      properties:
        predictions:
          description: The outputs of the prediction call.
          items: {}
          type: array
      type: object
    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:
          description: "The status code, which should be an enum value of google.rpc.Code."
          format: int32
          type: integer
        details:
          description: |-
            A list of messages that carry the error details.  There is a common set of
            message types for APIs to use.
          items:
            additionalProperties:
              description: Properties of the object. Contains field @type with type
                URL.
            type: object
          type: array
        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
      type: object
    Segment:
      description: Segment of the content.
      properties:
        partIndex:
          description: Output only. The index of a Part object within its parent Content
            object.
          format: int32
          readOnly: true
          type: integer
        startIndex:
          description: |-
            Output only. Start index in the given Part, measured in bytes. Offset from the start of
            the Part, inclusive, starting at zero.
          format: int32
          readOnly: true
          type: integer
        text:
          description: Output only. The text corresponding to the segment from the
            response.
          readOnly: true
          type: string
        endIndex:
          description: |-
            Output only. End index in the given Part, measured in bytes. Offset from the start of
            the Part, exclusive, starting at zero.
          format: int32
          readOnly: true
          type: integer
      type: object
  securitySchemes: {}