0.6.0 (latest) 0.5.0 0.4.4 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Ces V1 Client class SessionOutput.

Output for the session.

Generated from protobuf message `google.cloud.ces.v1.SessionOutput`

## Namespace

Google \\ Cloud \\ Ces \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ text` | `string` Output text from the CES agent. |
| `↳ audio` | `string` Output audio from the CES agent. |
| `↳ tool_calls` | `ToolCalls` Request for the client to execute the tools. |
| `↳ citations` | `Citations` Citations that provide the source information for the agent's generated text. |
| `↳ google_search_suggestions` | `GoogleSearchSuggestions` The suggestions returned from Google Search as a result of invoking the [GoogleSearchTool](https://docs.cloud.google.com/php/docs/reference/cloud-ces/latest/V1.GoogleSearchTool.md.txt). |
| `↳ end_session` | `EndSession` Indicates the session has ended. |
| `↳ payload` | `Google\Protobuf\Struct` Custom payload with structured output from the CES agent. |
| `↳ turn_index` | `int` Indicates the sequential order of conversation turn to which this output belongs to, starting from 1. |
| `↳ turn_completed` | `bool` If true, the CES agent has detected the end of the current conversation turn and will provide no further output for this turn. |
| `↳ diagnostic_info` | `SessionOutput\DiagnosticInfo` Optional. Diagnostic information contains execution details during the processing of the input. Only populated in the last SessionOutput (with `turn_completed=true`) for each turn. |
| `↳ context` | `array<Google\Protobuf\Any>` Context messages for external supervision guardrails. |

### getText

Output text from the CES agent.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasText

### setText

Output text from the CES agent.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAudio

Output audio from the CES agent.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasAudio

### setAudio

Output audio from the CES agent.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getToolCalls

Request for the client to execute the tools.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ToolCalls|null` |   |

### hasToolCalls

### setToolCalls

Request for the client to execute the tools.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `ToolCalls` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCitations

Citations that provide the source information for the agent's generated
text.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Citations|null` |   |

### hasCitations

### setCitations

Citations that provide the source information for the agent's generated
text.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Citations` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getGoogleSearchSuggestions

The suggestions returned from Google Search as a result of invoking the
[GoogleSearchTool](https://docs.cloud.google.com/php/docs/reference/cloud-ces/latest/V1.GoogleSearchTool.md.txt).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GoogleSearchSuggestions|null` |   |

### hasGoogleSearchSuggestions

### setGoogleSearchSuggestions

The suggestions returned from Google Search as a result of invoking the
[GoogleSearchTool](https://docs.cloud.google.com/php/docs/reference/cloud-ces/latest/V1.GoogleSearchTool.md.txt).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `GoogleSearchSuggestions` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getEndSession

Indicates the session has ended.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `EndSession|null` |   |

### hasEndSession

### setEndSession

Indicates the session has ended.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `EndSession` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPayload

Custom payload with structured output from the CES agent.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Struct|null` |   |

### hasPayload

### setPayload

Custom payload with structured output from the CES agent.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Struct` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTurnIndex

Indicates the sequential order of conversation turn to which this output
belongs to, starting from 1.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setTurnIndex

Indicates the sequential order of conversation turn to which this output
belongs to, starting from 1.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTurnCompleted

If true, the CES agent has detected the end of the current conversation
turn and will provide no further output for this turn.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setTurnCompleted

If true, the CES agent has detected the end of the current conversation
turn and will provide no further output for this turn.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDiagnosticInfo

Optional. Diagnostic information contains execution details during the
processing of the input. Only populated in the last SessionOutput (with
`turn_completed=true`) for each turn.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `SessionOutput\DiagnosticInfo|null` |   |

### hasDiagnosticInfo

### clearDiagnosticInfo

### setDiagnosticInfo

Optional. Diagnostic information contains execution details during the
processing of the input. Only populated in the last SessionOutput (with
`turn_completed=true`) for each turn.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `SessionOutput\DiagnosticInfo` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getContext

Context messages for external supervision guardrails.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<Google\Protobuf\Any>` |   |

### setContext

Context messages for external supervision guardrails.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<Google\Protobuf\Any>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getOutputType

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |