# Google Cloud Dialogflow V2 Client - Class Fulfillment (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 Fulfillment.

By default, your agent responds to a matched intent with a static response.

As an alternative, you can provide a more dynamic response by using
fulfillment. When you enable fulfillment for an intent, Dialogflow responds
to that intent by calling a service that you define. For example, if an
end-user wants to schedule a haircut on Friday, your service can check your
database and respond to the end-user with availability information for
Friday.
For more information, see the [fulfillment
guide](https://cloud.google.com/dialogflow/docs/fulfillment-overview).

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

## Namespace

Google \\ Cloud \\ Dialogflow \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The unique identifier of the fulfillment. Supported formats: - `projects/<Project ID>/agent/fulfillment` - `projects/<Project ID>/locations/<Location ID>/agent/fulfillment` This field is not used for Fulfillment in an Environment. |
| `↳ display_name` | `string` Optional. The human-readable name of the fulfillment, unique within the agent. This field is not used for Fulfillment in an Environment. |
| `↳ generic_web_service` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Fulfillment.GenericWebService` Configuration for a generic web service. |
| `↳ enabled` | `bool` Optional. Whether fulfillment is enabled. |
| `↳ features` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Fulfillment.Feature>` Optional. The field defines whether the fulfillment is enabled for certain features. |

### getName

Required. The unique identifier of the fulfillment.

Supported formats:

- `projects/<Project ID>/agent/fulfillment`
- `projects/<Project ID>/locations/<Location ID>/agent/fulfillment` This field is not used for Fulfillment in an Environment.

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

### setName

Required. The unique identifier of the fulfillment.

Supported formats:

- `projects/<Project ID>/agent/fulfillment`
- `projects/<Project ID>/locations/<Location ID>/agent/fulfillment` This field is not used for Fulfillment in an Environment.

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

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

### getDisplayName

Optional. The human-readable name of the fulfillment, unique within the
agent.

This field is not used for Fulfillment in an Environment.

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

### setDisplayName

Optional. The human-readable name of the fulfillment, unique within the
agent.

This field is not used for Fulfillment in an Environment.

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

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

### getGenericWebService

Configuration for a generic web service.

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

### hasGenericWebService

### setGenericWebService

Configuration for a generic web service.

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

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

### getEnabled

Optional. Whether fulfillment is enabled.

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

### setEnabled

Optional. Whether fulfillment is enabled.

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

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

### getFeatures

Optional. The field defines whether the fulfillment is enabled for certain
features.

| **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.Fulfillment.Feature>` |   |

### setFeatures

Optional. The field defines whether the fulfillment is enabled for certain
features.

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

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

### getFulfillment

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