# Google Cloud Discovery Engine V1 Client - Class FacetValue (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 FacetValue.

A facet value which contains value names and their count.

Generated from protobuf message `google.cloud.discoveryengine.v1.SearchResponse.Facet.FacetValue`

## Namespace

Google \\ Cloud \\ DiscoveryEngine \\ V1 \\ SearchResponse \\ Facet

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ value` | `string` Text value of a facet, such as "Black" for facet "colors". |
| `↳ interval` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Interval` Interval value for a facet, such as [10, 20) for facet "price". It matches \[SearchRequest.FacetSpec.FacetKey.intervals](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SearchRequest.FacetSpec.FacetKey#_Google_Cloud_DiscoveryEngine_V1_SearchRequest_FacetSpec_FacetKey__getIntervals__). |
| `↳ count` | `int|string` Number of items that have this facet value. |

### getValue

Text value of a facet, such as "Black" for facet "colors".

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

### hasValue

### setValue

Text value of a facet, such as "Black" for facet "colors".

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

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

### getInterval

Interval value for a facet, such as [10, 20) for facet "price". It
matches
\[SearchRequest.FacetSpec.FacetKey.intervals](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SearchRequest.FacetSpec.FacetKey#_Google_Cloud_DiscoveryEngine_V1_SearchRequest_FacetSpec_FacetKey__getIntervals__).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Interval|null` |   |

### hasInterval

### setInterval

Interval value for a facet, such as [10, 20) for facet "price". It
matches
\[SearchRequest.FacetSpec.FacetKey.intervals](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SearchRequest.FacetSpec.FacetKey#_Google_Cloud_DiscoveryEngine_V1_SearchRequest_FacetSpec_FacetKey__getIntervals__).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Interval` |

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

### getCount

Number of items that have this facet value.

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

### setCount

Number of items that have this facet value.

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

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

### getFacetValue

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