- [Resource: AssistAnswer](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.SCHEMA_REPRESENTATION)
  - [State](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.State)
  - [Reply](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Reply)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Reply.SCHEMA_REPRESENTATION)
  - [AssistantGroundedContent](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.AssistantGroundedContent)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.AssistantGroundedContent.SCHEMA_REPRESENTATION)
  - [TextGroundingMetadata](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.TextGroundingMetadata)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.TextGroundingMetadata.SCHEMA_REPRESENTATION)
  - [Segment](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Segment)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Segment.SCHEMA_REPRESENTATION)
  - [VisualSegment](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.VisualSegment)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.VisualSegment.SCHEMA_REPRESENTATION)
  - [Reference](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Reference)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Reference.SCHEMA_REPRESENTATION)
  - [DocumentMetadata](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.DocumentMetadata)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.DocumentMetadata.SCHEMA_REPRESENTATION)
  - [Language](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Language)
  - [AssistantContent](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.AssistantContent)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.AssistantContent.SCHEMA_REPRESENTATION)
  - [Blob](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Blob)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Blob.SCHEMA_REPRESENTATION)
  - [File](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.File)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.File.SCHEMA_REPRESENTATION)
  - [ExecutableCode](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ExecutableCode)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ExecutableCode.SCHEMA_REPRESENTATION)
  - [CodeExecutionResult](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.CodeExecutionResult)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.CodeExecutionResult.SCHEMA_REPRESENTATION)
  - [Outcome](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Outcome)
  - [CitationMetadata](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.CitationMetadata)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.CitationMetadata.SCHEMA_REPRESENTATION)
  - [Citation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Citation)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Citation.SCHEMA_REPRESENTATION)
  - [ContentMetadata](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ContentMetadata)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ContentMetadata.SCHEMA_REPRESENTATION)
  - [ContentKind](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ContentKind)
  - [AssistSkippedReason](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.AssistSkippedReason)
  - [CustomerPolicyEnforcementResult](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.CustomerPolicyEnforcementResult)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.CustomerPolicyEnforcementResult.SCHEMA_REPRESENTATION)
  - [Verdict](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Verdict)
  - [PolicyEnforcementResult](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.PolicyEnforcementResult)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.PolicyEnforcementResult.SCHEMA_REPRESENTATION)
  - [BannedPhraseEnforcementResult](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.BannedPhraseEnforcementResult)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.BannedPhraseEnforcementResult.SCHEMA_REPRESENTATION)
  - [ModelArmorEnforcementResult](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ModelArmorEnforcementResult)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ModelArmorEnforcementResult.SCHEMA_REPRESENTATION)
  - [ViolationSource](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ViolationSource)
- [Methods](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#METHODS_SUMMARY)

## Resource: AssistAnswer

AssistAnswer resource, main part of `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.assistants/assist#body.AssistResponse`.

| JSON representation |
|---|
| ``` { "name": string, "state": enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.State`), "connectorDisplayNames": { string: string, ... }, "replies": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Reply`) } ], "assistSkippedReasons": [ enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.AssistSkippedReason`) ], "customerPolicyEnforcementResult": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.CustomerPolicyEnforcementResult`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Immutable. Identifier. Resource name of the `AssistAnswer`. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assistAnswer}` This field must be a UTF-8 encoded string with a length limit of 1024 characters. |
| `state` | ``enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.State`)`` State of the answer generation. |
| `connectorDisplayNames` | `map (key: string, value: string)` Output only. Maps an internal connector agent name (the machine identifier embedded in tool names, e.g. `custom_mcp_<fingerprint>_agent`) to the connector's human-readable display name. Populated at serving time for custom MCP / agent gateway connectors so user-facing surfaces (e.g. the tool-call chip) can show the connector name instead of its internal identifier. Empty when there are no such connectors. |
| `replies[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Reply`)`` Replies of the assistant. |
| `assistSkippedReasons[]` | ``enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.AssistSkippedReason`)`` Reasons for not answering the assist call. |
| `customerPolicyEnforcementResult` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.CustomerPolicyEnforcementResult`)`` Optional. The field contains information about the various policy checks' results like the banned phrases or the Model Armor checks. This field is populated only if the assist call was skipped due to a policy violation. |

### State

State of the answer generation.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Unknown. |
| `IN_PROGRESS` | Assist operation is currently in progress. |
| `FAILED` | Assist operation has failed. |
| `SUCCEEDED` | Assist operation has succeeded. |
| `SKIPPED` | Assist operation has been skipped. |
| `CANCELLED` | Assist operation has been cancelled (e.g. client closed the stream). May contain a partial response. |

### Reply

One part of the multi-part response of the assist call.

| JSON representation |
|---|
| ``` { "createTime": string, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "groundedContent": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.AssistantGroundedContent`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` The time when the reply was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| Alternatives for the assistant reply. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `groundedContent` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.AssistantGroundedContent`)`` Possibly grounded response text or media from the assistant. |
| End of mutually exclusive fields. ||

### AssistantGroundedContent

A piece of content and possibly its grounding information.

Not all content needs grounding. Phrases like "Of course, I will gladly search it for you." do not need grounding.

| JSON representation |
|---|
| ``` { "content": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.AssistantContent`) }, "citationMetadata": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.CitationMetadata`) }, "contentMetadata": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ContentMetadata`) }, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "textGroundingMetadata": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.TextGroundingMetadata`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `content` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.AssistantContent`)`` The content. |
| `citationMetadata` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.CitationMetadata`)`` Source attribution of the generated content. See also <https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check> |
| `contentMetadata` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ContentMetadata`)`` Optional. metadata for the content. Currently only used for answers of research assistants. |
| Grounding metadata for various modals. It only supports text for now. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `textGroundingMetadata` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.TextGroundingMetadata`)`` Metadata for grounding based on text sources. |
| End of mutually exclusive fields. ||

### TextGroundingMetadata

Grounding details for text sources.

| JSON representation |
|---|
| ``` { "segments": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Segment`) } ], "visualSegments": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.VisualSegment`) } ], "references": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Reference`) } ] } ``` |

| Fields ||
|---|---|
| `segments[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Segment`)`` Grounding information for parts of the text. |
| `visualSegments[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.VisualSegment`)`` Grounding information for parts of the visual content. |
| `references[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Reference`)`` References for the grounded text. |

### Segment

Grounding information for a segment of the text.

| JSON representation |
|---|
| ``` { "startIndex": string, "endIndex": string, "referenceIndices": [ integer ], "groundingScore": number, "text": string } ``` |

| Fields ||
|---|---|
| `startIndex` | `string (https://developers.google.com/discovery/v1/type-format format)` Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one). |
| `endIndex` | `string (https://developers.google.com/discovery/v1/type-format format)` End of the segment, exclusive. |
| `referenceIndices[]` | `integer` References for the segment. |
| `groundingScore` | `number` Score for the segment. |
| `text` | `string` The text segment itself. |

### VisualSegment

Grounding information for a visual segment.

| JSON representation |
|---|
| ``` { "referenceIndices": [ integer ], "contentId": string } ``` |

| Fields ||
|---|---|
| `referenceIndices[]` | `integer` References for the visual segment. |
| `contentId` | `string` The content ID of the visual segment. In order to display the citation of the visual element, this contentId needs to match with the `groundedContent.content_metadata.content_id` field. |

### Reference

Referenced content and related document metadata.

| JSON representation |
|---|
| ``` { "content": string, "codeSnippet": string, "documentMetadata": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.DocumentMetadata`) }, "chunkMetadata": { object } } ``` |

| Fields ||
|---|---|
| `content` | `string` Referenced text content. |
| `codeSnippet` | `string` Chunk of code snippet from the referenced document. |
| `documentMetadata` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.DocumentMetadata`)`` Document metadata. |
| `chunkMetadata` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Output only. Generic structured chunk metadata from upstream data source connectors. |

### DocumentMetadata

Document metadata.

| JSON representation |
|---|
| ``` { "language": enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Language`), "document": string, "uri": string, "title": string, "pageIdentifier": string, "domain": string, "mimeType": string } ``` |

| Fields ||
|---|---|
| `language` | ``enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Language`)`` |
| `document` | `string` Document resource name. |
| `uri` | `string` URI for the document. It may contain a URL that redirects to the actual website. |
| `title` | `string` Title. |
| `pageIdentifier` | `string` Page identifier. |
| `domain` | `string` Domain name from the document URI. Note that the `uri` field may contain a URL that redirects to the actual website, in which case this will contain the domain name of the target site. |
| `mimeType` | `string` The mime type of the document. <https://www.iana.org/assignments/media-types/media-types.xhtml>. |

### Language

Language of the referenced content. For now, it is only used for code.

| Enums ||
|---|---|
| `LANGUAGE_UNSPECIFIED` |   |
| `PYTHON` |   |
| `SQL` |   |

### AssistantContent

Multi-modal content.

| JSON representation |
|---|
| ``` { "role": string, "thought": boolean, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "text": string, "inlineData": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Blob`) }, "file": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.File`) }, "executableCode": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ExecutableCode`) }, "codeExecutionResult": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.CodeExecutionResult`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `role` | `string` The producer of the content. Can be "model" or "user". |
| `thought` | `boolean` Optional. Indicates if the part is thought from the model. |
| Contained data. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `text` | `string` Inline text. |
| `inlineData` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Blob`)`` Inline binary data. |
| `file` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.File`)`` A file, e.g., an audio summary. |
| `executableCode` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ExecutableCode`)`` code generated by the model that is meant to be executed. |
| `codeExecutionResult` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.CodeExecutionResult`)`` Result of executing an ExecutableCode. |
| End of mutually exclusive fields. ||

### Blob

Inline blob.

| JSON representation |
|---|
| ``` { "mimeType": string, "data": string } ``` |

| Fields ||
|---|---|
| `mimeType` | `string` Required. The media type (MIME type) of the generated data. |
| `data` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. Raw bytes. A base64-encoded string. |

### File

A file, e.g., an audio summary.

| JSON representation |
|---|
| ``` { "mimeType": string, "fileId": string } ``` |

| Fields ||
|---|---|
| `mimeType` | `string` Required. The media type (MIME type) of the file. |
| `fileId` | `string` Required. The file ID. |

### ExecutableCode

code generated by the model that is meant to be executed by the model.

| JSON representation |
|---|
| ``` { "code": string } ``` |

| Fields ||
|---|---|
| `code` | `string` Required. The code content. Currently only supports Python. |

### CodeExecutionResult

Result of executing ExecutableCode.

| JSON representation |
|---|
| ``` { "outcome": enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Outcome`), "output": string } ``` |

| Fields ||
|---|---|
| `outcome` | ``enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Outcome`)`` Required. Outcome of the code execution. |
| `output` | `string` Optional. Contains stdout when code execution is successful, stderr or other description otherwise. |

### Outcome

Enumeration of possible outcomes of the code execution.

| Enums ||
|---|---|
| `OUTCOME_UNSPECIFIED` | Unspecified status. This value should not be used. |
| `OUTCOME_OK` | code execution completed successfully. |
| `OUTCOME_FAILED` | code execution finished but with a failure. `stderr` should contain the reason. |
| `OUTCOME_DEADLINE_EXCEEDED` | code execution ran for too long, and was cancelled. There may or may not be a partial output present. |

### CitationMetadata

A collection of source attributions for a piece of content.

| JSON representation |
|---|
| ``` { "citations": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Citation`) } ] } ``` |

| Fields ||
|---|---|
| `citations[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Citation`)`` Output only. List of citations. |

### Citation

Source attributions for content.

| JSON representation |
|---|
| ``` { "startIndex": integer, "endIndex": integer, "uri": string, "title": string, "license": string, "publicationDate": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/Shared.Types/Date`) } } ``` |

| Fields ||
|---|---|
| `startIndex` | `integer` Output only. Start index into the content. |
| `endIndex` | `integer` Output only. End index into the content. |
| `uri` | `string` Output only. url reference of the attribution. |
| `title` | `string` Output only. title of the attribution. |
| `license` | `string` Output only. License of the attribution. |
| `publicationDate` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/Shared.Types/Date`)`` Output only. Publication date of the attribution. |

### ContentMetadata

metadata for the content.

| JSON representation |
|---|
| ``` { "contentKind": enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ContentKind`), "contentId": string } ``` |

| Fields ||
|---|---|
| `contentKind` | ``enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ContentKind`)`` type of the content. Shows which part of the answer of the research assistant this content belongs to. |
| `contentId` | `string` id of the content. It is used to connect research questions with answers to them. For example, the parts of the answer to a research question will have the same `contentId` as the question. |

### ContentKind

Possible content kinds. Currently only used for differentiating sections in the full answer of a research assistant.

| Enums ||
|---|---|
| `CONTENT_KIND_UNSPECIFIED` | Unknown. |
| `RESEARCH_PLAN` | Research plan. |
| `RESEARCH_QUESTION` | Research question. |
| `RESEARCH_ANSWER` | Research answer. |
| `RESEARCH_REPORT` | Research report. |
| `RESEARCH_AUDIO_SUMMARY` | Research audio summary. |

### AssistSkippedReason

Possible reasons for not answering an assist call.

| Enums ||
|---|---|
| `ASSIST_SKIPPED_REASON_UNSPECIFIED` | Default value. Skip reason is not specified. |
| `NON_ASSIST_SEEKING_QUERY_IGNORED` | The assistant ignored the query, because it did not appear to be answer-seeking. |
| `CUSTOMER_POLICY_VIOLATION` | The assistant ignored the query or refused to answer because of a customer policy violation (e.g., the query or the answer contained a banned phrase). |

### CustomerPolicyEnforcementResult

Customer policy enforcement results. Contains the results of the various policy checks, like the banned phrases or the Model Armor checks.

| JSON representation |
|---|
| ``` { "verdict": enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Verdict`), "policyResults": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.PolicyEnforcementResult`) } ], "violationSource": enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ViolationSource`) } ``` |

| Fields ||
|---|---|
| `verdict` | ``enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.Verdict`)`` Final verdict of the customer policy enforcement. If only one policy blocked the processing, the verdict is BLOCK. |
| `policyResults[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.PolicyEnforcementResult`)`` Customer policy enforcement results. Populated only if the assist call was skipped due to a policy violation. It contains results from those filters that blocked the processing of the query. |
| `violationSource` | ``enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ViolationSource`)`` Output only. The source of the violation. |

### Verdict

The verdict of the customer policy enforcement.

| Enums ||
|---|---|
| `UNSPECIFIED` | Unknown value. |
| `ALLOW` | There was no policy violation. |
| `BLOCK` | Processing was blocked by the customer policy. |

### PolicyEnforcementResult

Customer policy enforcement result for a single policy type.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "bannedPhraseEnforcementResult": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.BannedPhraseEnforcementResult`) }, "modelArmorEnforcementResult": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ModelArmorEnforcementResult`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| The policy type specific result. It can be either an error or a detailed information about the policy enforcement result. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `bannedPhraseEnforcementResult` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.BannedPhraseEnforcementResult`)`` The policy enforcement result for the banned phrase policy. |
| `modelArmorEnforcementResult` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer.ModelArmorEnforcementResult`)`` The policy enforcement result for the Model Armor policy. |
| End of mutually exclusive fields. ||

### BannedPhraseEnforcementResult

Customer policy enforcement result for the banned phrase policy.

| JSON representation |
|---|
| ``` { "bannedPhrases": [ string ] } ``` |

| Fields ||
|---|---|
| `bannedPhrases[]` | `string` The banned phrases that were found in the query or the answer. |

### ModelArmorEnforcementResult

Customer policy enforcement result for the Model Armor policy.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "modelArmorViolation": string, "error": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/Shared.Types/ListOperationsResponse#Status`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| The Model Armor policy result. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `modelArmorViolation` | `string` The Model Armor violation that was found. |
| `error` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/Shared.Types/ListOperationsResponse#Status`)`` The error returned by Model Armor if the policy enforcement failed for some reason. |
| End of mutually exclusive fields. ||

### ViolationSource

If the assist call was skipped due to a policy violation, this contains the source of the violation.

| Enums ||
|---|---|
| `VIOLATION_SOURCE_UNSPECIFIED` | Unknown value. |
| `SYSTEM` | Violation found in the system response. |
| `PROMPT` | Violation found in the user prompt. |
| `ATTACHMENT` | Violation found in the user attachment. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers/get` | Gets an `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.engines.sessions.assistAnswers#AssistAnswer`. |