> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apowerb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Session



## OpenAPI

````yaml /api-reference/openapi.json get /apps/{app_name}/users/{user_id}/sessions/{session_id}
openapi: 3.1.0
info:
  title: apowerb API
  description: REST API of the apowerb agentic framework (open-source edition).
  version: 0.1.2
  license:
    name: MIT
    url: https://github.com/apowerb/apowerb/blob/main/LICENSE
servers:
  - url: https://api.example.com
    description: Your apowerb instance
  - url: http://localhost:8000
    description: Local stack
security: []
paths:
  /apps/{app_name}/users/{user_id}/sessions/{session_id}:
    get:
      summary: Get Session
      operationId: get_session_apps__app_name__users__user_id__sessions__session_id__get
      parameters:
        - name: app_name
          in: path
          required: true
          schema:
            type: string
            title: App Name
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            title: User Id
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Session:
      properties:
        id:
          type: string
          title: Id
        appName:
          type: string
          title: Appname
        userId:
          type: string
          title: Userid
        state:
          additionalProperties: true
          type: object
          title: State
        events:
          items:
            $ref: '#/components/schemas/Event-Output'
          type: array
          title: Events
        lastUpdateTime:
          type: number
          title: Lastupdatetime
          default: 0
      additionalProperties: false
      type: object
      required:
        - id
        - appName
        - userId
      title: Session
      description: Represents a series of interactions between a user and agents.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Event-Output:
      properties:
        modelVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Modelversion
        content:
          anyOf:
            - $ref: '#/components/schemas/Content-Output'
            - type: 'null'
        groundingMetadata:
          anyOf:
            - $ref: '#/components/schemas/GroundingMetadata-Output'
            - type: 'null'
        partial:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Partial
        turnComplete:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Turncomplete
        turnCompleteReason:
          anyOf:
            - $ref: '#/components/schemas/TurnCompleteReason'
            - type: 'null'
        finishReason:
          anyOf:
            - $ref: '#/components/schemas/FinishReason'
            - type: 'null'
        errorCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Errorcode
        errorMessage:
          anyOf:
            - type: string
            - type: 'null'
          title: Errormessage
        interrupted:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Interrupted
        customMetadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Custommetadata
        usageMetadata:
          anyOf:
            - $ref: '#/components/schemas/GenerateContentResponseUsageMetadata-Output'
            - type: 'null'
        liveSessionResumptionUpdate:
          anyOf:
            - $ref: '#/components/schemas/LiveServerSessionResumptionUpdate'
            - type: 'null'
        liveSessionId:
          anyOf:
            - type: string
            - type: 'null'
          title: Livesessionid
        goAway:
          anyOf:
            - $ref: '#/components/schemas/LiveServerGoAway'
            - type: 'null'
        inputTranscription:
          anyOf:
            - $ref: '#/components/schemas/Transcription'
            - type: 'null'
        outputTranscription:
          anyOf:
            - $ref: '#/components/schemas/Transcription'
            - type: 'null'
        avgLogprobs:
          anyOf:
            - type: number
            - type: 'null'
          title: Avglogprobs
        logprobsResult:
          anyOf:
            - $ref: '#/components/schemas/LogprobsResult-Output'
            - type: 'null'
        cacheMetadata:
          anyOf:
            - $ref: '#/components/schemas/CacheMetadata'
            - type: 'null'
        citationMetadata:
          anyOf:
            - $ref: '#/components/schemas/CitationMetadata-Output'
            - type: 'null'
        interactionId:
          anyOf:
            - type: string
            - type: 'null'
          title: Interactionid
        invocationId:
          type: string
          title: Invocationid
          default: ''
        author:
          type: string
          title: Author
        actions:
          $ref: '#/components/schemas/EventActions-Output'
        longRunningToolIds:
          anyOf:
            - items:
                type: string
              type: array
              uniqueItems: true
            - type: 'null'
          title: Longrunningtoolids
        branch:
          anyOf:
            - type: string
            - type: 'null'
          title: Branch
        id:
          type: string
          title: Id
          default: ''
        timestamp:
          type: number
          title: Timestamp
      type: object
      required:
        - author
      title: Event
      description: >-
        Represents an event in a conversation between agents and users.


        It is used to store the content of the conversation, as well as the
        actions

        taken by the agents like function calls, etc.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Content-Output:
      properties:
        parts:
          anyOf:
            - items:
                $ref: '#/components/schemas/Part-Output'
              type: array
            - type: 'null'
          title: Parts
          description: |-
            List of parts that constitute a single message. Each part may have
                  a different IANA MIME type.
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
          description: >-
            Optional. The producer of the content. Must be either 'user' or
            'model'. If not set, the service will default to 'user'.
      additionalProperties: false
      type: object
      title: Content
      description: Contains the multi-part content of a message.
    GroundingMetadata-Output:
      properties:
        imageSearchQueries:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Imagesearchqueries
          description: >-
            Optional. The image search queries that were used to generate the
            content. This field is populated only when the grounding source is
            Google Search with the Image Search search_type enabled.
        groundingChunks:
          anyOf:
            - items:
                $ref: '#/components/schemas/GroundingChunk-Output'
              type: array
            - type: 'null'
          title: Groundingchunks
          description: |-
            A list of supporting references retrieved from the grounding
                  source. This field is populated when the grounding source is Google
                  Search, Vertex AI Search, or Google Maps.
                  
        groundingSupports:
          anyOf:
            - items:
                $ref: '#/components/schemas/GroundingSupport'
              type: array
            - type: 'null'
          title: Groundingsupports
          description: List of grounding support.
        retrievalMetadata:
          anyOf:
            - $ref: '#/components/schemas/RetrievalMetadata'
            - type: 'null'
          description: Metadata related to retrieval in the grounding flow.
        searchEntryPoint:
          anyOf:
            - $ref: '#/components/schemas/SearchEntryPoint'
            - type: 'null'
          description: |-
            Optional. Google search entry for the following-up web
                  searches.
        webSearchQueries:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Websearchqueries
          description: Web search queries for the following-up web search.
        googleMapsWidgetContextToken:
          anyOf:
            - type: string
            - type: 'null'
          title: Googlemapswidgetcontexttoken
          description: >-
            Optional. Output only. Deprecated: The Google Maps contextual widget
            behavior in Grounding with Google Maps is being deprecated; this
            field is planned for removal and will no longer be populated once
            removed. A token that can be used to render a Google Maps widget
            with the contextual data. This field is populated only when the
            grounding source is Google Maps.
        retrievalQueries:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Retrievalqueries
          description: >-
            Optional. The queries that were executed by the retrieval tools.
            This field is populated only when the grounding source is a
            retrieval tool, such as Vertex AI Search. This field is not
            supported in Gemini API.
        sourceFlaggingUris:
          anyOf:
            - items:
                $ref: '#/components/schemas/GroundingMetadataSourceFlaggingUri'
              type: array
            - type: 'null'
          title: Sourceflagginguris
          description: >-
            Optional. Output only. A list of URIs that can be used to flag a
            place or review for inappropriate content. This field is populated
            only when the grounding source is Google Maps. This field is not
            supported in Gemini API.
      additionalProperties: false
      type: object
      title: GroundingMetadata
      description: Information for various kinds of grounding.
    TurnCompleteReason:
      type: string
      enum:
        - TURN_COMPLETE_REASON_UNSPECIFIED
        - MALFORMED_FUNCTION_CALL
        - RESPONSE_REJECTED
        - NEED_MORE_INPUT
        - PROHIBITED_INPUT_CONTENT
        - IMAGE_PROHIBITED_INPUT_CONTENT
        - INPUT_TEXT_CONTAIN_PROMINENT_PERSON_PROHIBITED
        - INPUT_IMAGE_CELEBRITY
        - INPUT_IMAGE_PHOTO_REALISTIC_CHILD_PROHIBITED
        - INPUT_TEXT_NCII_PROHIBITED
        - INPUT_OTHER
        - INPUT_IP_PROHIBITED
        - BLOCKLIST
        - UNSAFE_PROMPT_FOR_IMAGE_GENERATION
        - GENERATED_IMAGE_SAFETY
        - GENERATED_CONTENT_SAFETY
        - GENERATED_AUDIO_SAFETY
        - GENERATED_VIDEO_SAFETY
        - GENERATED_CONTENT_PROHIBITED
        - GENERATED_CONTENT_BLOCKLIST
        - GENERATED_IMAGE_PROHIBITED
        - GENERATED_IMAGE_CELEBRITY
        - GENERATED_IMAGE_PROMINENT_PEOPLE_DETECTED_BY_REWRITER
        - GENERATED_IMAGE_IDENTIFIABLE_PEOPLE
        - GENERATED_IMAGE_MINORS
        - OUTPUT_IMAGE_IP_PROHIBITED
        - GENERATED_OTHER
        - MAX_REGENERATION_REACHED
      title: TurnCompleteReason
      description: The reason why the turn is complete.
    FinishReason:
      type: string
      enum:
        - FINISH_REASON_UNSPECIFIED
        - STOP
        - MAX_TOKENS
        - SAFETY
        - RECITATION
        - LANGUAGE
        - OTHER
        - BLOCKLIST
        - PROHIBITED_CONTENT
        - SPII
        - MALFORMED_FUNCTION_CALL
        - IMAGE_SAFETY
        - UNEXPECTED_TOOL_CALL
        - IMAGE_PROHIBITED_CONTENT
        - NO_IMAGE
        - IMAGE_RECITATION
        - IMAGE_OTHER
      title: FinishReason
      description: |-
        Output only. The reason why the model stopped generating tokens.

        If empty, the model has not stopped generating the tokens.
    GenerateContentResponseUsageMetadata-Output:
      properties:
        cacheTokensDetails:
          anyOf:
            - items:
                $ref: '#/components/schemas/ModalityTokenCount'
              type: array
            - type: 'null'
          title: Cachetokensdetails
          description: >-
            Output only. A detailed breakdown of the token count for each
            modality in the cached content.
        cachedContentTokenCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cachedcontenttokencount
          description: >-
            Output only. The number of tokens in the cached content that was
            used for this request.
        candidatesTokenCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Candidatestokencount
          description: The total number of tokens in the generated candidates.
        candidatesTokensDetails:
          anyOf:
            - items:
                $ref: '#/components/schemas/ModalityTokenCount'
              type: array
            - type: 'null'
          title: Candidatestokensdetails
          description: >-
            Output only. A detailed breakdown of the token count for each
            modality in the generated candidates.
        promptTokenCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Prompttokencount
          description: >-
            The total number of tokens in the prompt. This includes any text,
            images, or other media provided in the request. When
            `cached_content` is set, this also includes the number of tokens in
            the cached content.
        promptTokensDetails:
          anyOf:
            - items:
                $ref: '#/components/schemas/ModalityTokenCount'
              type: array
            - type: 'null'
          title: Prompttokensdetails
          description: >-
            Output only. A detailed breakdown of the token count for each
            modality in the prompt.
        thoughtsTokenCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Thoughtstokencount
          description: >-
            Output only. The number of tokens that were part of the model's
            generated "thoughts" output, if applicable.
        toolUsePromptTokenCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tooluseprompttokencount
          description: >-
            Output only. The number of tokens in the results from tool
            executions, which are provided back to the model as input, if
            applicable.
        toolUsePromptTokensDetails:
          anyOf:
            - items:
                $ref: '#/components/schemas/ModalityTokenCount'
              type: array
            - type: 'null'
          title: Tooluseprompttokensdetails
          description: >-
            Output only. A detailed breakdown by modality of the token counts
            from the results of tool executions, which are provided back to the
            model as input.
        totalTokenCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totaltokencount
          description: >-
            The total number of tokens for the entire request. This is the sum
            of `prompt_token_count`, `candidates_token_count`,
            `tool_use_prompt_token_count`, and `thoughts_token_count`.
        trafficType:
          anyOf:
            - $ref: '#/components/schemas/TrafficType'
            - type: 'null'
          description: Output only. The traffic type for this request.
      additionalProperties: false
      type: object
      title: GenerateContentResponseUsageMetadata
      description: >-
        Usage metadata about the content generation request and response.


        This message provides a detailed breakdown of token usage and other
        relevant

        metrics. This data type is not supported in Gemini API.
    LiveServerSessionResumptionUpdate:
      properties:
        newHandle:
          anyOf:
            - type: string
            - type: 'null'
          title: Newhandle
          description: >-
            New handle that represents state that can be resumed. Empty if
            `resumable`=false.
        resumable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Resumable
          description: >-
            True if session can be resumed at this point. It might be not
            possible to resume session at some points. In that case we send
            update empty new_handle and resumable=false. Example of such case
            could be model executing function calls or just generating. Resuming
            session (using previous session token) in such state will result in
            some data loss.
        lastConsumedClientMessageIndex:
          anyOf:
            - type: integer
            - type: 'null'
          title: Lastconsumedclientmessageindex
          description: >-
            Index of last message sent by client that is included in state
            represented by this SessionResumptionToken. Only sent when
            `SessionResumptionConfig.transparent` is set.


            Presence of this index allows users to transparently reconnect and
            avoid issue of losing some part of realtime audio input/video. If
            client wishes to temporarily disconnect (for example as result of
            receiving GoAway) they can do it without losing state by buffering
            messages sent since last `SessionResumptionTokenUpdate`. This field
            will enable them to limit buffering (avoid keeping all requests in
            RAM).


            Note: This should not be used for when resuming a session at some
            time later -- in those cases partial audio and video frames are
            likely not needed.
      additionalProperties: false
      type: object
      title: LiveServerSessionResumptionUpdate
      description: |-
        Update of the session resumption state.

        Only sent if `session_resumption` was set in the connection config.
    LiveServerGoAway:
      properties:
        timeLeft:
          anyOf:
            - type: string
            - type: 'null'
          title: Timeleft
          description: >-
            The remaining time before the connection will be terminated as
            ABORTED. The minimal time returned here is specified differently
            together with the rate limits for a given model.
      additionalProperties: false
      type: object
      title: LiveServerGoAway
      description: Server will not be able to service client soon.
    Transcription:
      properties:
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
          description: Optional. Transcription text.
        finished:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Finished
          description: Optional. The bool indicates the end of the transcription.
        languageCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Languagecode
          description: The BCP-47 language code of the transcription.
        speakerLabel:
          anyOf:
            - type: string
            - type: 'null'
          title: Speakerlabel
          description: >-
            A label identifying the speaker of this audio segment (e.g. "spk_1",
            "spk_2").
                  
        words:
          anyOf:
            - items:
                $ref: '#/components/schemas/WordInfo'
              type: array
            - type: 'null'
          title: Words
          description: |-
            Detailed word-level transcriptions and timing details.
                  
      additionalProperties: false
      type: object
      title: Transcription
      description: Audio transcription in Server Content.
    LogprobsResult-Output:
      properties:
        chosenCandidates:
          anyOf:
            - items:
                $ref: '#/components/schemas/LogprobsResultCandidate'
              type: array
            - type: 'null'
          title: Chosencandidates
          description: >-
            A list of the chosen candidate tokens at each decoding step. The
            length of this list is equal to the total number of decoding steps.
            Note that the chosen candidate might not be in `top_candidates`.
        topCandidates:
          anyOf:
            - items:
                $ref: '#/components/schemas/LogprobsResultTopCandidates'
              type: array
            - type: 'null'
          title: Topcandidates
          description: >-
            A list of the top candidate tokens at each decoding step. The length
            of this list is equal to the total number of decoding steps.
        logProbabilitySum:
          anyOf:
            - type: number
            - type: 'null'
          title: Logprobabilitysum
          description: >-
            Sum of log probabilities for all tokens. This field is not supported
            in Vertex AI.
      additionalProperties: false
      type: object
      title: LogprobsResult
      description: >-
        The log probabilities of the tokens generated by the model.


        This is useful for understanding the model's confidence in its
        predictions and

        for debugging. For example, you can use log probabilities to identify
        when the

        model is making a less confident prediction or to explore alternative

        responses that the model considered. A low log probability can also
        indicate

        that the model is "hallucinating" or generating factually incorrect

        information.
    CacheMetadata:
      properties:
        cache_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Cache Name
          description: Full resource name of the cached content (None if no active cache)
        expire_time:
          anyOf:
            - type: number
            - type: 'null'
          title: Expire Time
          description: Unix timestamp when cache expires (None if no active cache)
        fingerprint:
          type: string
          title: Fingerprint
          description: Hash of cacheable contents used to detect changes
        invocations_used:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Invocations Used
          description: >-
            Number of invocations this cache has been used for (None if no
            active cache)
        contents_count:
          type: integer
          minimum: 0
          title: Contents Count
          description: >-
            Number of contents (cached contents when active cache exists, total
            contents in request when no active cache)
        created_at:
          anyOf:
            - type: number
            - type: 'null'
          title: Created At
          description: Unix timestamp when cache was created (None if no active cache)
      additionalProperties: false
      type: object
      required:
        - fingerprint
        - contents_count
      title: CacheMetadata
      description: >-
        Metadata for context cache associated with LLM responses.


        This class stores cache identification, usage tracking, and lifecycle

        information for a particular cache instance. It can be in two states:


        1. Active cache state: cache_name is set, all fields populated

        2. Fingerprint-only state: cache_name is None, only fingerprint and
           contents_count are set for prefix matching

        Token counts (cached and total) are available in the
        LlmResponse.usage_metadata

        and should be accessed from there to avoid duplication.


        Attributes:
            cache_name: The full resource name of the cached content (e.g.,
                'projects/123/locations/us-central1/cachedContents/456').
                None when no active cache exists (fingerprint-only state).
            expire_time: Unix timestamp when the cache expires. None when no
                active cache exists.
            fingerprint: Hash of cacheable contents (instruction + tools + contents).
                Always present for prefix matching.
            invocations_used: Number of invocations this cache has been used for.
                None when no active cache exists.
            contents_count: Number of contents. When active cache exists, this is
                the count of cached contents. When no active cache exists, this is
                the total count of contents in the request.
            created_at: Unix timestamp when the cache was created. None when
                no active cache exists.
    CitationMetadata-Output:
      properties:
        citations:
          anyOf:
            - items:
                $ref: '#/components/schemas/Citation'
              type: array
            - type: 'null'
          title: Citations
          description: |-
            Contains citation information when the model directly quotes, at
                  length, from another source. Can include traditional websites and code
                  repositories.
                  
      additionalProperties: false
      type: object
      title: CitationMetadata
      description: Citation information when the model quotes another source.
    EventActions-Output:
      properties:
        skipSummarization:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Skipsummarization
        stateDelta:
          additionalProperties: true
          type: object
          title: Statedelta
        artifactDelta:
          additionalProperties:
            type: integer
          type: object
          title: Artifactdelta
        transferToAgent:
          anyOf:
            - type: string
            - type: 'null'
          title: Transfertoagent
        escalate:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Escalate
        requestedAuthConfigs:
          additionalProperties:
            $ref: >-
              #/components/schemas/google__adk__auth__auth_tool__AuthConfig-Output
          type: object
          title: Requestedauthconfigs
        requestedToolConfirmations:
          additionalProperties:
            $ref: '#/components/schemas/ToolConfirmation'
          type: object
          title: Requestedtoolconfirmations
        compaction:
          anyOf:
            - $ref: '#/components/schemas/EventCompaction-Output'
            - type: 'null'
        endOfAgent:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Endofagent
        agentState:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Agentstate
        rewindBeforeInvocationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Rewindbeforeinvocationid
        renderUiWidgets:
          anyOf:
            - items:
                $ref: '#/components/schemas/UiWidget'
              type: array
            - type: 'null'
          title: Renderuiwidgets
      additionalProperties: false
      type: object
      title: EventActions
      description: Represents the actions attached to an event.
    Part-Output:
      properties:
        mediaResolution:
          anyOf:
            - $ref: '#/components/schemas/PartMediaResolution'
            - type: 'null'
          description: |-
            Media resolution for the input media.
                
        codeExecutionResult:
          anyOf:
            - $ref: '#/components/schemas/CodeExecutionResult'
            - type: 'null'
          description: Optional. The result of executing the ExecutableCode.
        executableCode:
          anyOf:
            - $ref: '#/components/schemas/ExecutableCode'
            - type: 'null'
          description: >-
            Optional. Code generated by the model that is intended to be
            executed.
        fileData:
          anyOf:
            - $ref: '#/components/schemas/FileData'
            - type: 'null'
          description: >-
            Optional. The URI-based data of the part. This can be used to
            include files from Google Cloud Storage.
        functionCall:
          anyOf:
            - $ref: '#/components/schemas/FunctionCall'
            - type: 'null'
          description: >-
            Optional. A predicted function call returned from the model. This
            contains the name of the function to call and the arguments to pass
            to the function.
        functionResponse:
          anyOf:
            - $ref: '#/components/schemas/FunctionResponse-Output'
            - type: 'null'
          description: >-
            Optional. The result of a function call. This is used to provide the
            model with the result of a function call that it predicted.
        inlineData:
          anyOf:
            - $ref: '#/components/schemas/Blob'
            - type: 'null'
          description: >-
            Optional. The inline data content of the part. This can be used to
            include images, audio, or video in a request.
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
          description: >-
            Optional. The text content of the part. When sent from the VSCode
            Gemini Code Assist extension, references to @mentioned items will be
            converted to markdown boldface text. For example `@my-repo` will be
            converted to and sent as `**my-repo**` by the IDE agent.
        thought:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Thought
          description: >-
            Optional. Indicates whether the `part` represents the model's
            thought process or reasoning.
        thoughtSignature:
          anyOf:
            - type: string
              contentEncoding: base64
              contentMediaType: application/octet-stream
            - type: 'null'
          title: Thoughtsignature
          description: >-
            Optional. An opaque signature for the thought so it can be reused in
            subsequent requests.
        videoMetadata:
          anyOf:
            - $ref: '#/components/schemas/VideoMetadata'
            - type: 'null'
          description: >-
            Optional. Video metadata. The metadata should only be specified
            while the video data is presented in inline_data or file_data.
        toolCall:
          anyOf:
            - $ref: '#/components/schemas/ToolCall'
            - type: 'null'
          description: >-
            Server-side tool call. This field is populated when the model
            predicts a tool invocation that should be executed on the server.
            The client is expected to echo this message back to the API.
        toolResponse:
          anyOf:
            - $ref: '#/components/schemas/ToolResponse'
            - type: 'null'
          description: >-
            The output from a server-side ToolCall execution. This field is
            populated by the client with the results of executing the
            corresponding ToolCall.
        partMetadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Partmetadata
          description: >-
            Custom metadata associated with the Part. Agents using genai.Part as
            content representation may need to keep track of the additional
            information. For example it can be name of a file/source from which
            the Part originates or a way to multiplex multiple Part streams.
            This field is not supported in Vertex AI.
        audioTranscription:
          anyOf:
            - $ref: '#/components/schemas/Transcription'
            - type: 'null'
          description: Output only. The transcription of the audio part.
      additionalProperties: false
      type: object
      title: Part
      description: >-
        A datatype containing media content.


        Exactly one field within a Part should be set, representing the specific
        type

        of content being conveyed. Using multiple fields within the same `Part`

        instance is considered invalid.
    GroundingChunk-Output:
      properties:
        image:
          anyOf:
            - $ref: '#/components/schemas/GroundingChunkImage'
            - type: 'null'
          description: >-
            A grounding chunk from an image search result. See the `Image`
            message for details.
        maps:
          anyOf:
            - $ref: '#/components/schemas/GroundingChunkMaps-Output'
            - type: 'null'
          description: |-
            A `Maps` chunk is a piece of evidence that comes from Google Maps.

                  It contains information about a place, such as its name, address, and
                  reviews. This is used to provide the user with rich, location-based
                  information.
        retrievedContext:
          anyOf:
            - $ref: '#/components/schemas/GroundingChunkRetrievedContext-Output'
            - type: 'null'
          description: >-
            A grounding chunk from a data source retrieved by a retrieval tool,
            such as Vertex AI Search. See the `RetrievedContext` message for
            details
        web:
          anyOf:
            - $ref: '#/components/schemas/GroundingChunkWeb'
            - type: 'null'
          description: >-
            A grounding chunk from a web page, typically from Google Search. See
            the `Web` message for details.
      additionalProperties: false
      type: object
      title: GroundingChunk
      description: >-
        A piece of evidence that supports a claim made by the model.


        This is used to show a citation for a claim made by the model. When
        grounding

        is enabled, the model returns a `GroundingChunk` that contains a
        reference to

        the source of the information.
    GroundingSupport:
      properties:
        confidenceScores:
          anyOf:
            - items:
                type: number
              type: array
            - type: 'null'
          title: 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.
        groundingChunkIndices:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: 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.
        segment:
          anyOf:
            - $ref: '#/components/schemas/Segment'
            - type: 'null'
          description: Segment of the content this support belongs to.
        renderedParts:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Renderedparts
          description: >-
            Indices into the `rendered_parts` field of the `GroundingMetadata`
            message. These indices specify which rendered parts are associated
            with this support message.
      additionalProperties: false
      type: object
      title: GroundingSupport
      description: Grounding support.
    RetrievalMetadata:
      properties:
        googleSearchDynamicRetrievalScore:
          anyOf:
            - type: number
            - type: 'null'
          title: 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.
      additionalProperties: false
      type: object
      title: RetrievalMetadata
      description: Metadata returned to client when grounding is enabled.
    SearchEntryPoint:
      properties:
        renderedContent:
          anyOf:
            - type: string
            - type: 'null'
          title: Renderedcontent
          description: |-
            Optional. Web content snippet that can be embedded in a web page
                  or an app webview.
        sdkBlob:
          anyOf:
            - type: string
              contentEncoding: base64
              contentMediaType: application/octet-stream
            - type: 'null'
          title: Sdkblob
          description: Optional. JSON representing array of tuples.
      additionalProperties: false
      type: object
      title: SearchEntryPoint
      description: The entry point used to search for grounding sources.
    GroundingMetadataSourceFlaggingUri:
      properties:
        flagContentUri:
          anyOf:
            - type: string
            - type: 'null'
          title: Flagcontenturi
          description: The URI that can be used to flag the content.
        sourceId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourceid
          description: The ID of the place or review.
      additionalProperties: false
      type: object
      title: GroundingMetadataSourceFlaggingUri
      description: >-
        A URI that can be used to flag a place or review for inappropriate
        content.


        This is populated only when the grounding source is Google Maps. This
        data

        type is not supported in Gemini API.
    ModalityTokenCount:
      properties:
        modality:
          anyOf:
            - $ref: '#/components/schemas/MediaModality'
            - type: 'null'
          description: The modality that this token count applies to.
        tokenCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tokencount
          description: The number of tokens counted for this modality.
      additionalProperties: false
      type: object
      title: ModalityTokenCount
      description: >-
        Represents a breakdown of token usage by modality.


        This message is used in CountTokensResponse and

        GenerateContentResponse.UsageMetadata to provide a detailed view of how
        many

        tokens are used by each modality (e.g., text, image, video) in a
        request. This

        is particularly useful for multimodal models, allowing you to track and
        manage

        token consumption for billing and quota purposes.
    TrafficType:
      type: string
      enum:
        - TRAFFIC_TYPE_UNSPECIFIED
        - ON_DEMAND
        - ON_DEMAND_PRIORITY
        - ON_DEMAND_FLEX
        - PROVISIONED_THROUGHPUT
      title: TrafficType
      description: >-
        Output only.


        The traffic type for this request. This enum is not supported in Gemini
        API.
    WordInfo:
      properties:
        word:
          anyOf:
            - type: string
            - type: 'null'
          title: Word
          description: |-
            Transcript of the word.
                  
        startOffset:
          anyOf:
            - type: string
            - type: 'null'
          title: Startoffset
          description: |-
            Start offset in time of the word relative to the start of the audio.
                  
        endOffset:
          anyOf:
            - type: string
            - type: 'null'
          title: Endoffset
          description: |-
            End offset in time of the word relative to the start of the audio.
                  
      additionalProperties: false
      type: object
      title: WordInfo
      description: Information about a single recognized word.
    LogprobsResultCandidate:
      properties:
        logProbability:
          anyOf:
            - type: number
            - type: 'null'
          title: Logprobability
          description: >-
            The log probability of this token. A higher value indicates that the
            model was more confident in this token. The log probability can be
            used to assess the relative likelihood of different tokens and to
            identify when the model is uncertain.
        token:
          anyOf:
            - type: string
            - type: 'null'
          title: Token
          description: The token's string representation.
        tokenId:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tokenid
          description: >-
            The token's numerical ID. While the `token` field provides the
            string representation of the token, the `token_id` is the numerical
            representation that the model uses internally. This can be useful
            for developers who want to build custom logic based on the model's
            vocabulary.
      additionalProperties: false
      type: object
      title: LogprobsResultCandidate
      description: A single token and its associated log probability.
    LogprobsResultTopCandidates:
      properties:
        candidates:
          anyOf:
            - items:
                $ref: '#/components/schemas/LogprobsResultCandidate'
              type: array
            - type: 'null'
          title: Candidates
          description: >-
            The list of candidate tokens, sorted by log probability in
            descending order.
      additionalProperties: false
      type: object
      title: LogprobsResultTopCandidates
      description: >-
        A list of the top candidate tokens and their log probabilities at each
        decoding step.


        This can be used to see what other tokens the model considered.
    Citation:
      properties:
        endIndex:
          anyOf:
            - type: integer
            - type: 'null'
          title: Endindex
          description: Output only. The end index of the citation in the content.
        license:
          anyOf:
            - type: string
            - type: 'null'
          title: License
          description: Output only. The license of the source of the citation.
        publicationDate:
          anyOf:
            - $ref: '#/components/schemas/GoogleTypeDate'
            - type: 'null'
          description: Output only. The publication date of the source of the citation.
        startIndex:
          anyOf:
            - type: integer
            - type: 'null'
          title: Startindex
          description: Output only. The start index of the citation in the content.
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: Output only. The title of the source of the citation.
        uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Uri
          description: Output only. The URI of the source of the citation.
      additionalProperties: false
      type: object
      title: Citation
      description: |-
        A citation for a piece of generatedcontent.

        This data type is not supported in Gemini API.
    google__adk__auth__auth_tool__AuthConfig-Output:
      properties:
        authScheme:
          anyOf:
            - $ref: '#/components/schemas/APIKey'
            - $ref: '#/components/schemas/HTTPBase'
            - $ref: '#/components/schemas/OAuth2-Output'
            - $ref: '#/components/schemas/OpenIdConnect'
            - $ref: '#/components/schemas/HTTPBearer'
            - $ref: '#/components/schemas/OpenIdConnectWithConfig'
            - $ref: '#/components/schemas/CustomAuthScheme'
          title: Authscheme
        rawAuthCredential:
          anyOf:
            - $ref: '#/components/schemas/AuthCredential-Output'
            - type: 'null'
        exchangedAuthCredential:
          anyOf:
            - $ref: '#/components/schemas/AuthCredential-Output'
            - type: 'null'
        credentialKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Credentialkey
      additionalProperties: true
      type: object
      required:
        - authScheme
      title: AuthConfig
      description: >-
        The auth config sent by tool asking client to collect auth credentials
        and


        adk and client will help to fill in the response
    ToolConfirmation:
      properties:
        hint:
          type: string
          title: Hint
          default: ''
        confirmed:
          type: boolean
          title: Confirmed
          default: false
        payload:
          anyOf:
            - {}
            - type: 'null'
          title: Payload
      additionalProperties: false
      type: object
      title: ToolConfirmation
      description: Represents a tool confirmation configuration.
    EventCompaction-Output:
      properties:
        startTimestamp:
          type: number
          title: Starttimestamp
        endTimestamp:
          type: number
          title: Endtimestamp
        compactedContent:
          $ref: '#/components/schemas/Content-Output'
      additionalProperties: false
      type: object
      required:
        - startTimestamp
        - endTimestamp
        - compactedContent
      title: EventCompaction
      description: The compaction of the events.
    UiWidget:
      properties:
        id:
          type: string
          title: Id
        provider:
          type: string
          title: Provider
        payload:
          additionalProperties: true
          type: object
          title: Payload
      additionalProperties: false
      type: object
      required:
        - id
        - provider
      title: UiWidget
      description: |-
        Rendering metadata for a UI widget associated with an event.

        When present on an Event.actions, the UI renders the widget using the
        specified provider's renderer component.
    PartMediaResolution:
      properties:
        level:
          anyOf:
            - $ref: '#/components/schemas/PartMediaResolutionLevel'
            - type: 'null'
          description: |-
            The tokenization quality used for given media.
                
        numTokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Numtokens
          description: |-
            Specifies the required sequence length for media tokenization.
                
      additionalProperties: false
      type: object
      title: PartMediaResolution
      description: Media resolution for the input media.
    CodeExecutionResult:
      properties:
        outcome:
          anyOf:
            - $ref: '#/components/schemas/Outcome'
            - type: 'null'
          description: Required. Outcome of the code execution.
        output:
          anyOf:
            - type: string
            - type: 'null'
          title: Output
          description: >-
            Optional. Contains stdout when code execution is successful, stderr
            or other description otherwise.
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: >-
            Optional. The identifier of the `ExecutableCode` part this result is
            for. Only populated if the corresponding `ExecutableCode` has an id.
            This field is not supported in Vertex AI.
      additionalProperties: false
      type: object
      title: CodeExecutionResult
      description: |-
        Result of executing the ExecutableCode.

        Generated only when the `CodeExecution` tool is used.
    ExecutableCode:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
          description: Required. The code to be executed.
        language:
          anyOf:
            - $ref: '#/components/schemas/Language'
            - type: 'null'
          description: Required. Programming language of the `code`.
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: >-
            Optional. Unique identifier of the `ExecutableCode` part. The server
            returns the `CodeExecutionResult` with the matching `id`. This field
            is not supported in Vertex AI.
      additionalProperties: false
      type: object
      title: ExecutableCode
      description: >-
        Code generated by the model that is meant to be executed, and the result
        returned to the model.


        Generated when using the `CodeExecution` tool, in which the code will be

        automatically executed, and a corresponding CodeExecutionResult will
        also be

        generated.
    FileData:
      properties:
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
          description: >-
            Optional. The display name of the file. Used to provide a label or
            filename to distinguish files. This field is only returned in
            `PromptMessage` for prompt management. It is used in the Gemini
            calls only when server side tools (`code_execution`,
            `google_search`, and `url_context`) are enabled. This field is not
            supported in Gemini API.
        fileUri:
          anyOf:
            - type: string
            - type: 'null'
          title: Fileuri
          description: Required. The URI of the file in Google Cloud Storage.
        mimeType:
          anyOf:
            - type: string
            - type: 'null'
          title: Mimetype
          description: Required. The IANA standard MIME type of the source data.
      additionalProperties: false
      type: object
      title: FileData
      description: >-
        URI-based data.


        A FileData message contains a URI pointing to data of a specific media
        type.

        It is used to represent images, audio, and video stored in Google Cloud

        Storage.
    FunctionCall:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: 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`.
        args:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Args
          description: >-
            Optional. The function parameters and values in JSON object format.
            See FunctionDeclaration.parameters for parameter details.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: >-
            Optional. The name of the function to call. Matches
            FunctionDeclaration.name.
        partialArgs:
          anyOf:
            - items:
                $ref: '#/components/schemas/PartialArg'
              type: array
            - type: 'null'
          title: Partialargs
          description: >-
            Optional. The partial argument value of the function call. If
            provided, represents the arguments/fields that are streamed
            incrementally. This field is not supported in Gemini API.
        willContinue:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Willcontinue
          description: >-
            Optional. Whether this is the last part of the FunctionCall. If
            true, another partial message for the current FunctionCall is
            expected to follow. This field is not supported in Gemini API.
      additionalProperties: false
      type: object
      title: FunctionCall
      description: >-
        A predicted FunctionCall returned from the model that contains a string
        representing the FunctionDeclaration.name and a structured JSON object
        containing the parameters and their values.
    FunctionResponse-Output:
      properties:
        willContinue:
          anyOf:
            - type: boolean
            - type: 'null'
          title: 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`. This
            field is not supported in Vertex AI.
        scheduling:
          anyOf:
            - $ref: '#/components/schemas/FunctionResponseScheduling'
            - type: 'null'
          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.
        parts:
          anyOf:
            - items:
                $ref: '#/components/schemas/FunctionResponsePart'
              type: array
            - type: 'null'
          title: Parts
          description: >-
            Optional. Ordered `Parts` that constitute a function response. Parts
            may have different IANA MIME types.
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: >-
            Optional. The id of the function call this response is for.
            Populated by the client to match the corresponding function call
            `id`.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: >-
            Required. The name of the function to call. Matches
            FunctionDeclaration.name and FunctionCall.name.
        response:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Response
          description: >-
            Required. The function response in JSON object format. Use "output"
            key to specify function output and "error" key to specify error
            details (if any). If "output" and "error" keys are not specified,
            then whole "response" is treated as function output.
      additionalProperties: false
      type: object
      title: 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.
    Blob:
      properties:
        data:
          anyOf:
            - type: string
              contentEncoding: base64
              contentMediaType: application/octet-stream
            - type: 'null'
          title: Data
          description: Required. The raw bytes of the data.
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
          description: >-
            Optional. The display name of the blob. Used to provide a label or
            filename to distinguish blobs. This field is only returned in
            `PromptMessage` for prompt management. It is used in the Gemini
            calls only when server-side tools (`code_execution`,
            `google_search`, and `url_context`) are enabled. This field is not
            supported in Gemini API.
        mimeType:
          anyOf:
            - type: string
            - type: 'null'
          title: Mimetype
          description: Required. The IANA standard MIME type of the source data.
      additionalProperties: false
      type: object
      title: Blob
      description: >-
        A content blob.


        A Blob contains data of a specific media type. It is used to represent
        images,

        audio, and video.
    VideoMetadata:
      properties:
        endOffset:
          anyOf:
            - type: string
            - type: 'null'
          title: Endoffset
          description: Optional. The end offset of the video.
        fps:
          anyOf:
            - type: number
            - type: 'null'
          title: Fps
          description: >-
            Optional. The frame rate of the video sent to the model. If not
            specified, the default value is 1.0. The valid range is (0.0, 24.0].
        startOffset:
          anyOf:
            - type: string
            - type: 'null'
          title: Startoffset
          description: Optional. The start offset of the video.
      additionalProperties: false
      type: object
      title: VideoMetadata
      description: >-
        Provides metadata for a video, including the start and end offsets for
        clipping and the frame rate.
    ToolCall:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: >-
            Unique identifier of the tool call. The server returns the tool
            response with the matching `id`.
        toolType:
          anyOf:
            - $ref: '#/components/schemas/ToolType'
            - type: 'null'
          description: The type of tool that was called.
        args:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Args
          description: >-
            The tool call arguments. Example: {"arg1": "value1", "arg2":
            "value2"}.
      additionalProperties: false
      type: object
      title: ToolCall
      description: >-
        A predicted server-side `ToolCall` returned from the model.


        This message contains information about a tool that the model wants to
        invoke.

        The client is NOT expected to execute this `ToolCall`. Instead, the

        client should pass this `ToolCall` back to the API in a subsequent turn

        within a `Content` message, along with the corresponding `ToolResponse`.
    ToolResponse:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: The identifier of the tool call this response is for.
        toolType:
          anyOf:
            - $ref: '#/components/schemas/ToolType'
            - type: 'null'
          description: >-
            The type of tool that was called, matching the tool_type in the
            corresponding ToolCall.
        response:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Response
          description: The tool response.
      additionalProperties: false
      type: object
      title: ToolResponse
      description: >-
        The output from a server-side `ToolCall` execution.


        This message contains the results of a tool invocation that was
        initiated by a

        `ToolCall` from the model. The client should pass this `ToolResponse`
        back to

        the API in a subsequent turn within a `Content` message, along with the

        corresponding `ToolCall`.
    GroundingChunkImage:
      properties:
        sourceUri:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourceuri
          description: The URI of the image search result page.
        imageUri:
          anyOf:
            - type: string
            - type: 'null'
          title: Imageuri
          description: The URI of the image.
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: The title of the image search result page.
        domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Domain
          description: The domain of the image search result page.
      additionalProperties: false
      type: object
      title: GroundingChunkImage
      description: >-
        An `Image` chunk is a piece of evidence that comes from an image search
        result.


        It contains the URI of the image search result and the URI of the image.
        This

        is used to provide the user with a link to the source of the
        information.
    GroundingChunkMaps-Output:
      properties:
        placeAnswerSources:
          anyOf:
            - $ref: '#/components/schemas/GroundingChunkMapsPlaceAnswerSources-Output'
            - type: 'null'
          description: |-
            The sources that were used to generate the place answer.

                  This includes review snippets and photos that were used to generate the
                  answer, as well as URIs to flag content.
        placeId:
          anyOf:
            - type: string
            - type: 'null'
          title: Placeid
          description: |-
            This Place's resource name, in `places/{place_id}` format.

                  This can be used to look up the place in the Google Maps API.
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
          description: The text of the place answer.
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: The title of the place.
        uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Uri
          description: The URI of the place.
        route:
          anyOf:
            - $ref: '#/components/schemas/GroundingChunkMapsRoute'
            - type: 'null'
          description: Output only. Route information.
      additionalProperties: false
      type: object
      title: GroundingChunkMaps
      description: >-
        A `Maps` chunk is a piece of evidence that comes from Google Maps.


        It contains information about a place, such as its name, address, and
        reviews.

        This is used to provide the user with rich, location-based information.
    GroundingChunkRetrievedContext-Output:
      properties:
        documentName:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentname
          description: >-
            Output only. The full resource name of the referenced Vertex AI
            Search document. This is used to identify the specific document that
            was retrieved. The format is
            `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
            This field is not supported in Gemini API.
        ragChunk:
          anyOf:
            - $ref: '#/components/schemas/RagChunk'
            - type: 'null'
          description: >-
            Additional context for a Retrieval-Augmented Generation (RAG)
            retrieval result. This is populated only when the RAG retrieval tool
            is used. This field is not supported in Gemini API.
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
          description: The content of the retrieved data source.
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: The title of the retrieved data source.
        uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Uri
          description: The URI of the retrieved data source.
        customMetadata:
          anyOf:
            - items:
                $ref: '#/components/schemas/GroundingChunkCustomMetadata'
              type: array
            - type: 'null'
          title: Custommetadata
          description: >-
            Optional. User-provided metadata about the retrieved context. This
            field is not supported in Vertex AI.
        fileSearchStore:
          anyOf:
            - type: string
            - type: 'null'
          title: Filesearchstore
          description: >-
            Optional. Name of the `FileSearchStore` containing the document.
            Example: `fileSearchStores/123`. This field is not supported in
            Vertex AI.
        pageNumber:
          anyOf:
            - type: integer
            - type: 'null'
          title: Pagenumber
          description: >-
            Optional. Page number of the retrieved context, if applicable. This
            field is not supported in Vertex AI.
        mediaId:
          anyOf:
            - type: string
            - type: 'null'
          title: Mediaid
          description: >-
            Optional. The media blob resource name for multimodal file search
            results. Format:
            fileSearchStores/{file_search_store_id}/media/{blob_id}. This field
            is not supported in Vertex AI.
      additionalProperties: false
      type: object
      title: GroundingChunkRetrievedContext
      description: >-
        Context retrieved from a data source to ground the model's response.


        This is used when a retrieval tool fetches information from a
        user-provided

        corpus or a public dataset.
    GroundingChunkWeb:
      properties:
        domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Domain
          description: >-
            The domain of the web page that contains the evidence. This can be
            used to filter out low-quality sources. This field is not supported
            in Gemini API.
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: The title of the web page that contains the evidence.
        uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Uri
          description: The URI of the web page that contains the evidence.
      additionalProperties: false
      type: object
      title: GroundingChunkWeb
      description: >-
        A `Web` chunk is a piece of evidence that comes from a web page.


        It contains the URI of the web page, the title of the page, and the
        domain of

        the page. This is used to provide the user with a link to the source of
        the

        information.
    Segment:
      properties:
        startIndex:
          anyOf:
            - type: integer
            - type: 'null'
          title: Startindex
          description: |-
            Output only. Start index in the given Part, measured in bytes.

                  Offset from the start of the Part, inclusive, starting at zero.
        endIndex:
          anyOf:
            - type: integer
            - type: 'null'
          title: Endindex
          description: |-
            Output only. End index in the given Part, measured in bytes.

                  Offset from the start of the Part, exclusive, starting at zero.
        partIndex:
          anyOf:
            - type: integer
            - type: 'null'
          title: Partindex
          description: |-
            Output only. The index of a Part object within its parent
                  Content object.
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
          description: |-
            Output only. The text corresponding to the segment from the
                  response.
      additionalProperties: false
      type: object
      title: Segment
      description: Segment of the content this support belongs to.
    MediaModality:
      type: string
      enum:
        - MODALITY_UNSPECIFIED
        - TEXT
        - IMAGE
        - VIDEO
        - AUDIO
        - DOCUMENT
      title: MediaModality
      description: The modality that this token count applies to.
    GoogleTypeDate:
      properties:
        day:
          anyOf:
            - type: integer
            - type: 'null'
          title: Day
          description: >-
            Day of a month. Must be from 1 to 31 and valid for the year and
            month, or 0 to specify a year by itself or a year and month where
            the day isn't significant.
        month:
          anyOf:
            - type: integer
            - type: 'null'
          title: Month
          description: >-
            Month of a year. Must be from 1 to 12, or 0 to specify a year
            without a month and day.
        year:
          anyOf:
            - type: integer
            - type: 'null'
          title: Year
          description: >-
            Year of the date. Must be from 1 to 9999, or 0 to specify a date
            without a year.
      additionalProperties: false
      type: object
      title: GoogleTypeDate
      description: >-
        Represents a whole or partial calendar date, such as a birthday.


        The time of day and time zone are either specified elsewhere or are

        insignificant. The date is relative to the Gregorian Calendar. This can

        represent one of the following: * A full date, with non-zero year,
        month, and

        day values. * A month and day, with a zero year (for example, an
        anniversary).

        * A year on its own, with a zero month and a zero day. * A year and
        month,

        with a zero day (for example, a credit card expiration date). Related
        types: *

        google.type.TimeOfDay * google.type.DateTime *
        google.protobuf.Timestamp. This

        data type is not supported in Gemini API.
    APIKey:
      properties:
        type:
          $ref: '#/components/schemas/SecuritySchemeType'
          default: apiKey
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        in:
          $ref: '#/components/schemas/APIKeyIn'
        name:
          type: string
          title: Name
      additionalProperties: true
      type: object
      required:
        - in
        - name
      title: APIKey
    HTTPBase:
      properties:
        type:
          $ref: '#/components/schemas/SecuritySchemeType'
          default: http
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        scheme:
          type: string
          title: Scheme
      additionalProperties: true
      type: object
      required:
        - scheme
      title: HTTPBase
    OAuth2-Output:
      properties:
        type:
          $ref: '#/components/schemas/SecuritySchemeType'
          default: oauth2
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        flows:
          $ref: '#/components/schemas/OAuthFlows'
      additionalProperties: true
      type: object
      required:
        - flows
      title: OAuth2
    OpenIdConnect:
      properties:
        type:
          $ref: '#/components/schemas/SecuritySchemeType'
          default: openIdConnect
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        openIdConnectUrl:
          type: string
          title: Openidconnecturl
      additionalProperties: true
      type: object
      required:
        - openIdConnectUrl
      title: OpenIdConnect
    HTTPBearer:
      properties:
        type:
          $ref: '#/components/schemas/SecuritySchemeType'
          default: http
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        scheme:
          type: string
          const: bearer
          title: Scheme
          default: bearer
        bearerFormat:
          anyOf:
            - type: string
            - type: 'null'
          title: Bearerformat
      additionalProperties: true
      type: object
      title: HTTPBearer
    OpenIdConnectWithConfig:
      properties:
        type:
          $ref: '#/components/schemas/SecuritySchemeType'
          default: openIdConnect
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        authorization_endpoint:
          type: string
          title: Authorization Endpoint
        token_endpoint:
          type: string
          title: Token Endpoint
        userinfo_endpoint:
          anyOf:
            - type: string
            - type: 'null'
          title: Userinfo Endpoint
        revocation_endpoint:
          anyOf:
            - type: string
            - type: 'null'
          title: Revocation Endpoint
        token_endpoint_auth_methods_supported:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Token Endpoint Auth Methods Supported
        grant_types_supported:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Grant Types Supported
        scopes:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Scopes
      additionalProperties: true
      type: object
      required:
        - authorization_endpoint
        - token_endpoint
      title: OpenIdConnectWithConfig
    CustomAuthScheme:
      properties:
        type:
          type: string
          title: Type
      additionalProperties: true
      type: object
      required:
        - type
      title: CustomAuthScheme
      description: >-
        A flexible model for custom authentication schemes.


        The subclasses must define a `default` for the `type_` field, if using
        OAuth2

        user consent flow, to ensure correct rehydration.
    AuthCredential-Output:
      properties:
        authType:
          $ref: '#/components/schemas/AuthCredentialTypes'
        resourceRef:
          anyOf:
            - type: string
            - type: 'null'
          title: Resourceref
        apiKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Apikey
        http:
          anyOf:
            - $ref: '#/components/schemas/HttpAuth'
            - type: 'null'
        serviceAccount:
          anyOf:
            - $ref: '#/components/schemas/ServiceAccount'
            - type: 'null'
        oauth2:
          anyOf:
            - $ref: '#/components/schemas/OAuth2Auth'
            - type: 'null'
      additionalProperties: true
      type: object
      required:
        - authType
      title: AuthCredential
      description: |-
        Data class representing an authentication credential.

        To exchange for the actual credential, please use
        CredentialExchanger.exchange_credential().

        Examples: API Key Auth
        AuthCredential(
            auth_type=AuthCredentialTypes.API_KEY,
            api_key="1234",
        )

        Example: HTTP Auth
        AuthCredential(
            auth_type=AuthCredentialTypes.HTTP,
            http=HttpAuth(
                scheme="basic",
                credentials=HttpCredentials(username="user", password="password"),
            ),
        )

        Example: OAuth2 Bearer Token in HTTP Header
        AuthCredential(
            auth_type=AuthCredentialTypes.HTTP,
            http=HttpAuth(
                scheme="bearer",
                credentials=HttpCredentials(token="eyAkaknabna...."),
            ),
        )

        Example: OAuth2 Auth with Authorization Code Flow
        AuthCredential(
            auth_type=AuthCredentialTypes.OAUTH2,
            oauth2=OAuth2Auth(
                client_id="1234",
                client_secret="secret",
            ),
        )

        Example: OpenID Connect Auth
        AuthCredential(
            auth_type=AuthCredentialTypes.OPEN_ID_CONNECT,
            oauth2=OAuth2Auth(
                client_id="1234",
                client_secret="secret",
                redirect_uri="https://example.com",
                scopes=["scope1", "scope2"],
            ),
        )

        Example: Auth with resource reference
        AuthCredential(
            auth_type=AuthCredentialTypes.API_KEY,
            resource_ref="projects/1234/locations/us-central1/resources/resource1",
        )
    PartMediaResolutionLevel:
      type: string
      enum:
        - MEDIA_RESOLUTION_UNSPECIFIED
        - MEDIA_RESOLUTION_LOW
        - MEDIA_RESOLUTION_MEDIUM
        - MEDIA_RESOLUTION_HIGH
        - MEDIA_RESOLUTION_ULTRA_HIGH
      title: PartMediaResolutionLevel
      description: The tokenization quality used for given media.
    Outcome:
      type: string
      enum:
        - OUTCOME_UNSPECIFIED
        - OUTCOME_OK
        - OUTCOME_FAILED
        - OUTCOME_DEADLINE_EXCEEDED
      title: Outcome
      description: Outcome of the code execution.
    Language:
      type: string
      enum:
        - LANGUAGE_UNSPECIFIED
        - PYTHON
      title: Language
      description: Programming language of the `code`.
    PartialArg:
      properties:
        boolValue:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Boolvalue
          description: Optional. Represents a boolean value.
        jsonPath:
          anyOf:
            - type: string
            - type: 'null'
          title: Jsonpath
          description: >-
            Required. A JSON Path (RFC 9535) to the argument being streamed.
            https://datatracker.ietf.org/doc/html/rfc9535. e.g.
            "$.foo.bar[0].data".
        nullValue:
          anyOf:
            - type: string
              const: NULL_VALUE
            - type: 'null'
          title: Nullvalue
          description: Optional. Represents a null value.
        numberValue:
          anyOf:
            - type: number
            - type: 'null'
          title: Numbervalue
          description: Optional. Represents a double value.
        stringValue:
          anyOf:
            - type: string
            - type: 'null'
          title: Stringvalue
          description: Optional. Represents a string value.
        willContinue:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Willcontinue
          description: >-
            Optional. Whether this is not the last part of the same json_path.
            If true, another PartialArg message for the current json_path is
            expected to follow.
      additionalProperties: false
      type: object
      title: PartialArg
      description: |-
        Partial argument value of the function call.

        This data type is not supported in Gemini API.
    FunctionResponseScheduling:
      type: string
      enum:
        - SCHEDULING_UNSPECIFIED
        - SILENT
        - WHEN_IDLE
        - INTERRUPT
      title: FunctionResponseScheduling
      description: >-
        Specifies how the response should be scheduled in the conversation.


        Only applicable to NON_BLOCKING function calls, is ignored otherwise.
        Defaults

        to WHEN_IDLE.
    FunctionResponsePart:
      properties:
        inlineData:
          anyOf:
            - $ref: '#/components/schemas/FunctionResponseBlob'
            - type: 'null'
          description: Inline media bytes.
        fileData:
          anyOf:
            - $ref: '#/components/schemas/FunctionResponseFileData'
            - type: 'null'
          description: URI based data. This field is not supported in Gemini API.
      additionalProperties: false
      type: object
      title: FunctionResponsePart
      description: >-
        A datatype containing media that is part of a `FunctionResponse`
        message.


        A `FunctionResponsePart` consists of data which has an associated
        datatype. A

        `FunctionResponsePart` can only contain one of the accepted types in

        `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed
        IANA

        MIME type identifying the type and subtype of the media if the
        `inline_data`

        field is filled with raw bytes.
    ToolType:
      type: string
      enum:
        - TOOL_TYPE_UNSPECIFIED
        - GOOGLE_SEARCH_WEB
        - GOOGLE_SEARCH_IMAGE
        - URL_CONTEXT
        - GOOGLE_MAPS
        - FILE_SEARCH
      title: ToolType
      description: The type of tool in the function call.
    GroundingChunkMapsPlaceAnswerSources-Output:
      properties:
        reviewSnippet:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/GroundingChunkMapsPlaceAnswerSourcesReviewSnippet
              type: array
            - type: 'null'
          title: Reviewsnippet
          description: Snippets of reviews that were used to generate the answer.
        flagContentUri:
          anyOf:
            - type: string
            - type: 'null'
          title: Flagcontenturi
          description: A link where users can flag a problem with the generated answer.
        reviewSnippets:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/GroundingChunkMapsPlaceAnswerSourcesReviewSnippet
              type: array
            - type: 'null'
          title: Reviewsnippets
          description: Snippets of reviews that were used to generate the answer.
      additionalProperties: false
      type: object
      title: GroundingChunkMapsPlaceAnswerSources
      description: |-
        The sources that were used to generate the place answer.

        This includes review snippets and photos that were used to generate the
        answer, as well as URIs to flag content.
    GroundingChunkMapsRoute:
      properties:
        distanceMeters:
          anyOf:
            - type: integer
            - type: 'null'
          title: Distancemeters
          description: The total distance of the route, in meters.
        duration:
          anyOf:
            - type: string
            - type: 'null'
          title: Duration
          description: The total duration of the route.
        encodedPolyline:
          anyOf:
            - type: string
            - type: 'null'
          title: Encodedpolyline
          description: >-
            An encoded polyline of the route. See
            https://developers.google.com/maps/documentation/utilities/polylinealgorithm
      additionalProperties: false
      type: object
      title: GroundingChunkMapsRoute
      description: |-
        Route information from Google Maps.

        This data type is not supported in Gemini API.
    RagChunk:
      properties:
        pageSpan:
          anyOf:
            - $ref: '#/components/schemas/RagChunkPageSpan'
            - type: 'null'
          description: >-
            If populated, represents where the chunk starts and ends in the
            document.
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
          description: The content of the chunk.
        chunkId:
          anyOf:
            - type: string
            - type: 'null'
          title: Chunkid
          description: The ID of the chunk.
        fileId:
          anyOf:
            - type: string
            - type: 'null'
          title: Fileid
          description: The ID of the file that the chunk belongs to.
      additionalProperties: false
      type: object
      title: RagChunk
      description: >-
        A RagChunk includes the content of a chunk of a RagFile, and associated
        metadata.


        This data type is not supported in Gemini API.
    GroundingChunkCustomMetadata:
      properties:
        key:
          anyOf:
            - type: string
            - type: 'null'
          title: Key
          description: The key of the metadata.
        numericValue:
          anyOf:
            - type: number
            - type: 'null'
          title: Numericvalue
          description: >-
            Optional. The numeric value of the metadata. The expected range for
            this value depends on the specific `key` used.
        stringListValue:
          anyOf:
            - $ref: '#/components/schemas/GroundingChunkStringList'
            - type: 'null'
          description: Optional. A list of string values for the metadata.
        stringValue:
          anyOf:
            - type: string
            - type: 'null'
          title: Stringvalue
          description: Optional. The string value of the metadata.
      additionalProperties: false
      type: object
      title: GroundingChunkCustomMetadata
      description: |-
        User provided metadata about the GroundingFact.

        This data type is not supported in Vertex AI.
    SecuritySchemeType:
      type: string
      enum:
        - apiKey
        - http
        - oauth2
        - openIdConnect
      title: SecuritySchemeType
    APIKeyIn:
      type: string
      enum:
        - query
        - header
        - cookie
      title: APIKeyIn
    OAuthFlows:
      properties:
        implicit:
          anyOf:
            - $ref: '#/components/schemas/OAuthFlowImplicit'
            - type: 'null'
        password:
          anyOf:
            - $ref: '#/components/schemas/OAuthFlowPassword'
            - type: 'null'
        clientCredentials:
          anyOf:
            - $ref: '#/components/schemas/OAuthFlowClientCredentials'
            - type: 'null'
        authorizationCode:
          anyOf:
            - $ref: '#/components/schemas/OAuthFlowAuthorizationCode'
            - type: 'null'
      additionalProperties: true
      type: object
      title: OAuthFlows
    AuthCredentialTypes:
      type: string
      enum:
        - apiKey
        - http
        - oauth2
        - openIdConnect
        - serviceAccount
      title: AuthCredentialTypes
      description: Represents the type of authentication credential.
    HttpAuth:
      properties:
        scheme:
          type: string
          title: Scheme
        credentials:
          $ref: '#/components/schemas/HttpCredentials'
        additionalHeaders:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Additionalheaders
      additionalProperties: true
      type: object
      required:
        - scheme
        - credentials
      title: HttpAuth
      description: The credentials and metadata for HTTP authentication.
    ServiceAccount:
      properties:
        serviceAccountCredential:
          anyOf:
            - $ref: '#/components/schemas/ServiceAccountCredential'
            - type: 'null'
        scopes:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Scopes
        useDefaultCredential:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Usedefaultcredential
          default: false
        useIdToken:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Useidtoken
          default: false
        audience:
          anyOf:
            - type: string
            - type: 'null'
          title: Audience
      additionalProperties: true
      type: object
      title: ServiceAccount
      description: |-
        Represents Google Service Account configuration.

        Attributes:
          service_account_credential: The service account credential (JSON key).
          scopes: The OAuth2 scopes to request. Optional; when omitted with
              ``use_default_credential=True``, defaults to the cloud-platform scope.
          use_default_credential: Whether to use Application Default Credentials.
          use_id_token: Whether to exchange for an ID token instead of an access
              token. Required for service-to-service authentication with Cloud Run,
              Cloud Functions, and other Google Cloud services that require identity
              verification. When True, ``audience`` must also be set.
          audience: The target audience for the ID token, typically the URL of the
              receiving service (e.g. ``https://my-service-xyz.run.app``). Required
              when ``use_id_token`` is True.
    OAuth2Auth:
      properties:
        clientId:
          anyOf:
            - type: string
            - type: 'null'
          title: Clientid
        clientSecret:
          anyOf:
            - type: string
            - type: 'null'
          title: Clientsecret
        authUri:
          anyOf:
            - type: string
            - type: 'null'
          title: Authuri
        nonce:
          anyOf:
            - type: string
            - type: 'null'
          title: Nonce
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        redirectUri:
          anyOf:
            - type: string
            - type: 'null'
          title: Redirecturi
        authResponseUri:
          anyOf:
            - type: string
            - type: 'null'
          title: Authresponseuri
        authCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Authcode
        accessToken:
          anyOf:
            - type: string
            - type: 'null'
          title: Accesstoken
        refreshToken:
          anyOf:
            - type: string
            - type: 'null'
          title: Refreshtoken
        idToken:
          anyOf:
            - type: string
            - type: 'null'
          title: Idtoken
        expiresAt:
          anyOf:
            - type: integer
            - type: 'null'
          title: Expiresat
        expiresIn:
          anyOf:
            - type: integer
            - type: 'null'
          title: Expiresin
        audience:
          anyOf:
            - type: string
            - type: 'null'
          title: Audience
        codeVerifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Codeverifier
        codeChallengeMethod:
          anyOf:
            - type: string
            - type: 'null'
          title: Codechallengemethod
        tokenEndpointAuthMethod:
          anyOf:
            - type: string
              enum:
                - client_secret_basic
                - client_secret_post
                - client_secret_jwt
                - private_key_jwt
            - type: 'null'
          title: Tokenendpointauthmethod
          default: client_secret_basic
      additionalProperties: true
      type: object
      title: OAuth2Auth
      description: Represents credential value and its metadata for a OAuth2 credential.
    FunctionResponseBlob:
      properties:
        mimeType:
          anyOf:
            - type: string
            - type: 'null'
          title: Mimetype
          description: Required. The IANA standard MIME type of the source data.
        data:
          anyOf:
            - type: string
              contentEncoding: base64
              contentMediaType: application/octet-stream
            - type: 'null'
          title: Data
          description: Required. Raw bytes.
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
          description: >-
            Optional. Display name of the blob. Used to provide a label or
            filename to distinguish blobs. This field is only returned in
            PromptMessage for prompt management. It is currently used in the
            Gemini GenerateContent calls only when server side tools
            (code_execution, google_search, and url_context) are enabled. This
            field is not supported in Gemini API.
      additionalProperties: false
      type: object
      title: FunctionResponseBlob
      description: |-
        Raw media bytes for function response.

        Text should not be sent as raw bytes, use the 'text' field.
    FunctionResponseFileData:
      properties:
        fileUri:
          anyOf:
            - type: string
            - type: 'null'
          title: Fileuri
          description: Required. URI.
        mimeType:
          anyOf:
            - type: string
            - type: 'null'
          title: Mimetype
          description: Required. The IANA standard MIME type of the source data.
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
          description: >-
            Optional. Display name of the file data. Used to provide a label or
            filename to distinguish file datas. This field is only returned in
            PromptMessage for prompt management. It is currently used in the
            Gemini GenerateContent calls only when server side tools
            (code_execution, google_search, and url_context) are enabled.
      additionalProperties: false
      type: object
      title: FunctionResponseFileData
      description: |-
        URI based data for function response.

        This data type is not supported in Gemini API.
    GroundingChunkMapsPlaceAnswerSourcesReviewSnippet:
      properties:
        authorAttribution:
          anyOf:
            - $ref: >-
                #/components/schemas/GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution
            - type: 'null'
          description: This review's author.
        flagContentUri:
          anyOf:
            - type: string
            - type: 'null'
          title: Flagcontenturi
          description: A link where users can flag a problem with the review.
        googleMapsUri:
          anyOf:
            - type: string
            - type: 'null'
          title: Googlemapsuri
          description: A link to show the review on Google Maps.
        relativePublishTimeDescription:
          anyOf:
            - type: string
            - type: 'null'
          title: Relativepublishtimedescription
          description: >-
            A string of formatted recent time, expressing the review time
            relative to the current time in a form appropriate for the language
            and country.
        review:
          anyOf:
            - type: string
            - type: 'null'
          title: Review
          description: >-
            A reference representing this place review which may be used to look
            up this place review again.
        reviewId:
          anyOf:
            - type: string
            - type: 'null'
          title: Reviewid
          description: Id of the review referencing the place.
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: Title of the review.
      additionalProperties: false
      type: object
      title: GroundingChunkMapsPlaceAnswerSourcesReviewSnippet
      description: Encapsulates a review snippet.
    RagChunkPageSpan:
      properties:
        firstPage:
          anyOf:
            - type: integer
            - type: 'null'
          title: Firstpage
          description: Page where chunk starts in the document. Inclusive. 1-indexed.
        lastPage:
          anyOf:
            - type: integer
            - type: 'null'
          title: Lastpage
          description: Page where chunk ends in the document. Inclusive. 1-indexed.
      additionalProperties: false
      type: object
      title: RagChunkPageSpan
      description: |-
        Represents where the chunk starts and ends in the document.

        This data type is not supported in Gemini API.
    GroundingChunkStringList:
      properties:
        values:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Values
          description: The string values of the list.
      additionalProperties: false
      type: object
      title: GroundingChunkStringList
      description: A list of string values. This data type is not supported in Vertex AI.
    OAuthFlowImplicit:
      properties:
        refreshUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Refreshurl
        scopes:
          additionalProperties:
            type: string
          type: object
          title: Scopes
          default: {}
        authorizationUrl:
          type: string
          title: Authorizationurl
      additionalProperties: true
      type: object
      required:
        - authorizationUrl
      title: OAuthFlowImplicit
    OAuthFlowPassword:
      properties:
        refreshUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Refreshurl
        scopes:
          additionalProperties:
            type: string
          type: object
          title: Scopes
          default: {}
        tokenUrl:
          type: string
          title: Tokenurl
      additionalProperties: true
      type: object
      required:
        - tokenUrl
      title: OAuthFlowPassword
    OAuthFlowClientCredentials:
      properties:
        refreshUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Refreshurl
        scopes:
          additionalProperties:
            type: string
          type: object
          title: Scopes
          default: {}
        tokenUrl:
          type: string
          title: Tokenurl
      additionalProperties: true
      type: object
      required:
        - tokenUrl
      title: OAuthFlowClientCredentials
    OAuthFlowAuthorizationCode:
      properties:
        refreshUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Refreshurl
        scopes:
          additionalProperties:
            type: string
          type: object
          title: Scopes
          default: {}
        authorizationUrl:
          type: string
          title: Authorizationurl
        tokenUrl:
          type: string
          title: Tokenurl
      additionalProperties: true
      type: object
      required:
        - authorizationUrl
        - tokenUrl
      title: OAuthFlowAuthorizationCode
    HttpCredentials:
      properties:
        username:
          anyOf:
            - type: string
            - type: 'null'
          title: Username
        password:
          anyOf:
            - type: string
            - type: 'null'
          title: Password
        token:
          anyOf:
            - type: string
            - type: 'null'
          title: Token
      additionalProperties: true
      type: object
      title: HttpCredentials
      description: >-
        Represents the secret token value for HTTP authentication, like user
        name, password, oauth token, etc.
    ServiceAccountCredential:
      properties:
        type:
          type: string
          title: Type
          default: ''
        projectId:
          type: string
          title: Projectid
        privateKeyId:
          type: string
          title: Privatekeyid
        privateKey:
          type: string
          title: Privatekey
        clientEmail:
          type: string
          title: Clientemail
        clientId:
          type: string
          title: Clientid
        authUri:
          type: string
          title: Authuri
        tokenUri:
          type: string
          title: Tokenuri
        authProviderX509CertUrl:
          type: string
          title: Authproviderx509Certurl
        clientX509CertUrl:
          type: string
          title: Clientx509Certurl
        universeDomain:
          type: string
          title: Universedomain
      additionalProperties: true
      type: object
      required:
        - projectId
        - privateKeyId
        - privateKey
        - clientEmail
        - clientId
        - authUri
        - tokenUri
        - authProviderX509CertUrl
        - clientX509CertUrl
        - universeDomain
      title: ServiceAccountCredential
      description: |-
        Represents Google Service Account configuration.

        Attributes:
          type: The type should be "service_account".
          project_id: The project ID.
          private_key_id: The ID of the private key.
          private_key: The private key.
          client_email: The client email.
          client_id: The client ID.
          auth_uri: The authorization URI.
          token_uri: The token URI.
          auth_provider_x509_cert_url: URL for auth provider's X.509 cert.
          client_x509_cert_url: URL for the client's X.509 cert.
          universe_domain: The universe domain.

        Example:

            config = ServiceAccountCredential(
                type_="service_account",
                project_id="your_project_id",
                private_key_id="your_private_key_id",
                private_key="-----BEGIN PRIVATE KEY-----...",
                client_email="...@....iam.gserviceaccount.com",
                client_id="your_client_id",
                auth_uri="https://accounts.google.com/o/oauth2/auth",
                token_uri="https://oauth2.googleapis.com/token",
                auth_provider_x509_cert_url="https://www.googleapis.com/oauth2/v1/certs",
                client_x509_cert_url="https://www.googleapis.com/robot/v1/metadata/x509/...",
                universe_domain="googleapis.com"
            )


            config = ServiceAccountConfig.model_construct(**{
                ...service account config dict
            })
    GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution:
      properties:
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
          description: Name of the author of the Photo or Review.
        photoUri:
          anyOf:
            - type: string
            - type: 'null'
          title: Photouri
          description: Profile photo URI of the author of the Photo or Review.
        uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Uri
          description: URI of the author of the Photo or Review.
      additionalProperties: false
      type: object
      title: GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution
      description: Author attribution for a photo or review.

````

## Related topics

- [Get Session History](/api-reference/adk/get-session-history.md)
- [Get Session Trace](/api-reference/adk/get-session-trace.md)
- [Sessions and runs](/concepts/sessions-and-runs.md)
- [List All Sessions](/api-reference/adk/list-all-sessions.md)
