# Google Cloud Dialogflow V2 Client - Class Generator (2.4.0)

2.4.0 (latest) 2.3.1 2.2.1 2.1.2 2.0.1 1.17.2 1.16.0 1.15.1 1.14.0 1.13.0 1.12.3 1.11.0 1.10.2 1.9.0 1.8.0 1.7.2 1.6.0 1.5.0 1.4.0 1.3.2 1.2.0 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class Generator.

LLM generator.

Generated from protobuf message `google.cloud.dialogflow.v2.Generator`

## Namespace

Google \\ Cloud \\ Dialogflow \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. Identifier. The resource name of the generator. Format: `projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>` |
| `↳ description` | `string` Optional. Human readable description of the generator. |
| `↳ free_form_context` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.FreeFormContext` Input of free from generator to LLM. |
| `↳ agent_coaching_context` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.AgentCoachingContext` Input of prebuilt Agent Coaching feature. |
| `↳ summarization_context` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SummarizationContext` Input of prebuilt Summarization feature. |
| `↳ inference_parameter` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.InferenceParameter` Optional. Inference parameters for this generator. |
| `↳ trigger_event` | `int` Optional. The trigger event of the generator. It defines when the generator is triggered in a conversation. |
| `↳ published_model` | `string` Optional. The published Large Language Model name. \* \* To use the latest model version, specify the model name without version number. Example: `text-bison` \* \* To use a stable model version, specify the version number as well. Example: `text-bison\@002`. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Creation time of this generator. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Update time of this generator. |
| `↳ tools` | `string[]` Optional. Resource names of the tools that the generator can choose from. Format: `projects/<Project ID>/locations/<Location ID>/tools/<tool ID>`. |
| `↳ suggestion_deduping_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SuggestionDedupingConfig` Optional. Configuration for suggestion deduping. This is only applicable to AI Coach feature. |
| `↳ toolset_tools` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.ToolsetTool>` Optional. List of CES toolset specs that the generator can choose from. |
| `↳ ces_tool_specs` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.CesToolSpec>` Optional. List of CES tool specs that the generator can choose from. |
| `↳ ces_app_specs` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.CesAppSpec>` Optional. List of CES app specs that the generator can choose from. |

### getName

Output only. Identifier. The resource name of the generator. Format:
`projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>`

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

### setName

Output only. Identifier. The resource name of the generator. Format:
`projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>`

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

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

### getDescription

Optional. Human readable description of the generator.

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

### setDescription

Optional. Human readable description of the generator.

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

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

### getFreeFormContext

Input of free from generator to LLM.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.FreeFormContext|null` |   |

### hasFreeFormContext

### setFreeFormContext

Input of free from generator to LLM.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.FreeFormContext` |

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

### getAgentCoachingContext

Input of prebuilt Agent Coaching feature.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.AgentCoachingContext|null` |   |

### hasAgentCoachingContext

### setAgentCoachingContext

Input of prebuilt Agent Coaching feature.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.AgentCoachingContext` |

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

### getSummarizationContext

Input of prebuilt Summarization feature.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SummarizationContext|null` |   |

### hasSummarizationContext

### setSummarizationContext

Input of prebuilt Summarization feature.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SummarizationContext` |

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

### getInferenceParameter

Optional. Inference parameters for this generator.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.InferenceParameter|null` |   |

### hasInferenceParameter

### clearInferenceParameter

### setInferenceParameter

Optional. Inference parameters for this generator.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.InferenceParameter` |

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

### getTriggerEvent

Optional. The trigger event of the generator. It defines when the generator
is triggered in a conversation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [TriggerEvent](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.TriggerEvent). |

### setTriggerEvent

Optional. The trigger event of the generator. It defines when the generator
is triggered in a conversation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [TriggerEvent](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.TriggerEvent). |

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

### getPublishedModel

Optional. The published Large Language Model name.

- To use the latest model version, specify the model name without version number. Example: `text-bison`
- To use a stable model version, specify the version number as well. Example: `text-bison\@002`.

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

### hasPublishedModel

### setPublishedModel

Optional. The published Large Language Model name.

- To use the latest model version, specify the model name without version number. Example: `text-bison`
- To use a stable model version, specify the version number as well. Example: `text-bison\@002`.

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

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

### getCreateTime

Output only. Creation time of this generator.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Creation time of this generator.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getUpdateTime

Output only. Update time of this generator.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Update time of this generator.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getTools

Optional. Resource names of the tools that the generator can choose from.

Format: `projects/<Project ID>/locations/<Location ID>/tools/<tool ID>`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setTools

Optional. Resource names of the tools that the generator can choose from.

Format: `projects/<Project ID>/locations/<Location ID>/tools/<tool ID>`.

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

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

### getSuggestionDedupingConfig

Optional. Configuration for suggestion deduping. This is only applicable to
AI Coach feature.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SuggestionDedupingConfig|null` |   |

### hasSuggestionDedupingConfig

### clearSuggestionDedupingConfig

### setSuggestionDedupingConfig

Optional. Configuration for suggestion deduping. This is only applicable to
AI Coach feature.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SuggestionDedupingConfig` |

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

### getToolsetTools

Optional. List of CES toolset specs that the generator can choose from.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.ToolsetTool>` |   |

### setToolsetTools

Optional. List of CES toolset specs that the generator can choose from.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.ToolsetTool>` |

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

### getCesToolSpecs

Optional. List of CES tool specs that the generator can choose from.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.CesToolSpec>` |   |

### setCesToolSpecs

Optional. List of CES tool specs that the generator can choose from.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.CesToolSpec>` |

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

### getCesAppSpecs

Optional. List of CES app specs that the generator can choose from.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.CesAppSpec>` |   |

### setCesAppSpecs

Optional. List of CES app specs that the generator can choose from.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.CesAppSpec>` |

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

### getContext

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

### getFoundationModel

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