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

Constraint of a geolocation field.

Name of the geolocation field as defined in the schema.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ field_name` | `string` The name of the geolocation field as defined in the schema. |
| `↳ address` | `string` The reference address that was inferred from the input query. The proximity of the reference address to the geolocation field will be used to filter the results. |
| `↳ latitude` | `float` The latitude of the geolocation inferred from the input query. |
| `↳ longitude` | `float` The longitude of the geolocation inferred from the input query. |
| `↳ radius_in_meters` | `float` The radius in meters around the address. The record is returned if the location of the geolocation field is within the radius. |

### getFieldName

The name of the geolocation field as defined in the schema.

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

### setFieldName

The name of the geolocation field as defined in the schema.

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

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

### getAddress

The reference address that was inferred from the input query. The
proximity of the reference address to the geolocation field will be
used to filter the results.

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

### setAddress

The reference address that was inferred from the input query. The
proximity of the reference address to the geolocation field will be
used to filter the results.

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

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

### getLatitude

The latitude of the geolocation inferred from the input query.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setLatitude

The latitude of the geolocation inferred from the input query.

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

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

### getLongitude

The longitude of the geolocation inferred from the input query.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setLongitude

The longitude of the geolocation inferred from the input query.

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

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

### getRadiusInMeters

The radius in meters around the address. The record is returned if
the location of the geolocation field is within the radius.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setRadiusInMeters

The radius in meters around the address. The record is returned if
the location of the geolocation field is within the radius.

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

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