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

The expression denoting the filter that was extracted from the input
query.

Generated from protobuf message `google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression`

## Namespace

Google \\ Cloud \\ DiscoveryEngine \\ V1 \\ SearchResponse \\ NaturalLanguageQueryUnderstandingInfo \\ StructuredExtractedFilter

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ string_constraint` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint` String constraint expression. |
| `↳ number_constraint` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint` Numerical constraint expression. |
| `↳ geolocation_constraint` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint` Geolocation constraint expression. |
| `↳ and_expr` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression` Logical "And" compound operator connecting multiple expressions. |
| `↳ or_expr` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression` Logical "Or" compound operator connecting multiple expressions. |

### getStringConstraint

String constraint expression.

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

### hasStringConstraint

### setStringConstraint

String constraint expression.

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

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

### getNumberConstraint

Numerical constraint expression.

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

### hasNumberConstraint

### setNumberConstraint

Numerical constraint expression.

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

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

### getGeolocationConstraint

Geolocation constraint expression.

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

### hasGeolocationConstraint

### setGeolocationConstraint

Geolocation constraint expression.

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

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

### getAndExpr

Logical "And" compound operator connecting multiple expressions.

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

### hasAndExpr

### setAndExpr

Logical "And" compound operator connecting multiple expressions.

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

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

### getOrExpr

Logical "Or" compound operator connecting multiple expressions.

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

### hasOrExpr

### setOrExpr

Logical "Or" compound operator connecting multiple expressions.

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

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

### getExpr

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