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

Represents configuration for a generic web service.

Dialogflow supports two mechanisms for authentications:

- Basic authentication with username and password.
- Authentication with additional authentication headers. More information could be found at: <https://cloud.google.com/dialogflow/docs/fulfillment-configure>.

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

## Namespace

Google \\ Cloud \\ Dialogflow \\ V2 \\ Fulfillment

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ uri` | `string` Required. The fulfillment URI for receiving POST requests. It must use https protocol. |
| `↳ username` | `string` Optional. The user name for HTTP Basic authentication. |
| `↳ password` | `string` Optional. The password for HTTP Basic authentication. |
| `↳ request_headers` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. The HTTP request headers to send together with fulfillment requests. |
| `↳ is_cloud_function` | `bool` Optional. Indicates if generic web service is created through Cloud Functions integration. Defaults to false. is_cloud_function is deprecated. Cloud functions can be configured by its uri as a regular web service now. |

### getUri

Required. The fulfillment URI for receiving POST requests.

It must use https protocol.

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

### setUri

Required. The fulfillment URI for receiving POST requests.

It must use https protocol.

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

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

### getUsername

Optional. The user name for HTTP Basic authentication.

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

### setUsername

Optional. The user name for HTTP Basic authentication.

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

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

### getPassword

Optional. The password for HTTP Basic authentication.

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

### setPassword

Optional. The password for HTTP Basic authentication.

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

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

### getRequestHeaders

Optional. The HTTP request headers to send together with fulfillment
requests.

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

### setRequestHeaders

Optional. The HTTP request headers to send together with fulfillment
requests.

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

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

### getIsCloudFunction

Optional. Indicates if generic web service is created through Cloud
Functions integration. Defaults to false.

is_cloud_function is deprecated. Cloud functions can be configured by
its uri as a regular web service now.

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

### setIsCloudFunction

Optional. Indicates if generic web service is created through Cloud
Functions integration. Defaults to false.

is_cloud_function is deprecated. Cloud functions can be configured by
its uri as a regular web service now.

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

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