# Google Cloud Discovery Engine V1 Client - Class ServiceTerms (1.11.1)

1.11.1 (latest) 1.11.0 1.10.1 1.9.1 1.8.0 1.7.0 1.6.1 1.5.1 1.4.0 1.3.3 1.2.0 1.1.0 1.0.0 0.11.3 0.8.0 0.7.1 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class ServiceTerms.

Metadata about the terms of service.

Generated from protobuf message `google.cloud.discoveryengine.v1.Project.ServiceTerms`

## Namespace

Google \\ Cloud \\ DiscoveryEngine \\ V1 \\ Project

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ id` | `string` The unique identifier of this terms of service. Available terms: \* \* `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable [version](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Project.ServiceTerms#_Google_Cloud_DiscoveryEngine_V1_Project_ServiceTerms__getVersion__) to provide is `2022-11-23`. |
| `↳ version` | `string` The version string of the terms of service. For acceptable values, see the comments for [id](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Project.ServiceTerms#_Google_Cloud_DiscoveryEngine_V1_Project_ServiceTerms__getId__) above. |
| `↳ state` | `int` Whether the project has accepted/rejected the service terms or it is still pending. |
| `↳ accept_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The last time when the project agreed to the terms of service. |
| `↳ decline_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The last time when the project declined or revoked the agreement to terms of service. |

### getId

The unique identifier of this terms of service.

Available terms:

- `GA_DATA_USE_TERMS`: [Terms for data
  use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable [version](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Project.ServiceTerms#_Google_Cloud_DiscoveryEngine_V1_Project_ServiceTerms__getVersion__) to provide is `2022-11-23`.

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

### setId

The unique identifier of this terms of service.

Available terms:

- `GA_DATA_USE_TERMS`: [Terms for data
  use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable [version](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Project.ServiceTerms#_Google_Cloud_DiscoveryEngine_V1_Project_ServiceTerms__getVersion__) to provide is `2022-11-23`.

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

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

### getVersion

The version string of the terms of service.

For acceptable values, see the comments for
[id](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Project.ServiceTerms#_Google_Cloud_DiscoveryEngine_V1_Project_ServiceTerms__getId__) above.

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

### setVersion

The version string of the terms of service.

For acceptable values, see the comments for
[id](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Project.ServiceTerms#_Google_Cloud_DiscoveryEngine_V1_Project_ServiceTerms__getId__) above.

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

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

### getState

Whether the project has accepted/rejected the service terms or it is
still pending.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Project.ServiceTerms.State). |

### setState

Whether the project has accepted/rejected the service terms or it is
still pending.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Project.ServiceTerms.State). |

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

### getAcceptTime

The last time when the project agreed to the terms of service.

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

### hasAcceptTime

### clearAcceptTime

### setAcceptTime

The last time when the project agreed to the terms of service.

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

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

### getDeclineTime

The last time when the project declined or revoked the agreement to terms
of service.

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

### hasDeclineTime

### clearDeclineTime

### setDeclineTime

The last time when the project declined or revoked the agreement to terms
of service.

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

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