# Google Analytics Data V1beta Client - Class Filter (0.24.0)

0.24.0 (latest) 0.23.3 0.22.3 0.21.1 0.20.1 0.19.0 0.18.0 0.17.1 0.16.4 0.14.0 0.13.0 0.12.0 0.11.2 0.10.1 0.9.5

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Analytics Data V1beta Client class Filter.

An expression to filter dimension or metric values.

Generated from protobuf message `google.analytics.data.v1beta.Filter`

## Namespace

Google \\ Analytics \\ Data \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ field_name` | `string` The dimension name or metric name. In most methods, dimensions \& metrics can be used for the first time in this field. However in a RunPivotReportRequest, this field must be additionally specified by name in the RunPivotReportRequest's dimensions or metrics. |
| `↳ string_filter` | `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Filter.StringFilter` Strings related filter. |
| `↳ in_list_filter` | `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Filter.InListFilter` A filter for in list values. |
| `↳ numeric_filter` | `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Filter.NumericFilter` A filter for numeric or date values. |
| `↳ between_filter` | `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Filter.BetweenFilter` A filter for two values. |
| `↳ empty_filter` | `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Filter.EmptyFilter` A filter for empty values such as "(not set)" and "" values. |

### getFieldName

The dimension name or metric name.

In most methods, dimensions \& metrics can be used for the first time in
this field. However in a RunPivotReportRequest, this field must be
additionally specified by name in the RunPivotReportRequest's dimensions or
metrics.

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

### setFieldName

The dimension name or metric name.

In most methods, dimensions \& metrics can be used for the first time in
this field. However in a RunPivotReportRequest, this field must be
additionally specified by name in the RunPivotReportRequest's dimensions or
metrics.

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

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

### getStringFilter

Strings related filter.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Filter.StringFilter|null` |   |

### hasStringFilter

### setStringFilter

Strings related filter.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Filter.StringFilter` |

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

### getInListFilter

A filter for in list values.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Filter.InListFilter|null` |   |

### hasInListFilter

### setInListFilter

A filter for in list values.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Filter.InListFilter` |

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

### getNumericFilter

A filter for numeric or date values.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Filter.NumericFilter|null` |   |

### hasNumericFilter

### setNumericFilter

A filter for numeric or date values.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Filter.NumericFilter` |

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

### getBetweenFilter

A filter for two values.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Filter.BetweenFilter|null` |   |

### hasBetweenFilter

### setBetweenFilter

A filter for two values.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Filter.BetweenFilter` |

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

### getEmptyFilter

A filter for empty values such as "(not set)" and "" values.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Filter.EmptyFilter|null` |   |

### hasEmptyFilter

### setEmptyFilter

A filter for empty values such as "(not set)" and "" values.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.Filter.EmptyFilter` |

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

### getOneFilter

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