<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/discoveryengine/v1/search_service.proto

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

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Constraint of a geolocation field.
 * Name of the geolocation field as defined in the schema.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint</code>
 */
class GeolocationConstraint extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the geolocation field as defined in the schema.
     *
     * Generated from protobuf field <code>string field_name = 1;</code>
     */
    protected $field_name = '';
    /**
     * 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.
     *
     * Generated from protobuf field <code>string address = 2;</code>
     */
    protected $address = '';
    /**
     * The latitude of the geolocation inferred from the input query.
     *
     * Generated from protobuf field <code>double latitude = 4;</code>
     */
    protected $latitude = 0.0;
    /**
     * The longitude of the geolocation inferred from the input query.
     *
     * Generated from protobuf field <code>double longitude = 5;</code>
     */
    protected $longitude = 0.0;
    /**
     * The radius in meters around the address. The record is returned if
     * the location of the geolocation field is within the radius.
     *
     * Generated from protobuf field <code>float radius_in_meters = 3;</code>
     */
    protected $radius_in_meters = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $field_name
     *           The name of the geolocation field as defined in the schema.
     *     @type string $address
     *           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.
     *     @type float $latitude
     *           The latitude of the geolocation inferred from the input query.
     *     @type float $longitude
     *           The longitude of the geolocation inferred from the input query.
     *     @type float $radius_in_meters
     *           The radius in meters around the address. The record is returned if
     *           the location of the geolocation field is within the radius.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the geolocation field as defined in the schema.
     *
     * Generated from protobuf field <code>string field_name = 1;</code>
     * @return string
     */
    public function getFieldName()
    {
        return $this->field_name;
    }

    /**
     * The name of the geolocation field as defined in the schema.
     *
     * Generated from protobuf field <code>string field_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setFieldName($var)
    {
        GPBUtil::checkString($var, True);
        $this->field_name = $var;

        return $this;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>string address = 2;</code>
     * @return string
     */
    public function getAddress()
    {
        return $this->address;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>string address = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->address = $var;

        return $this;
    }

    /**
     * The latitude of the geolocation inferred from the input query.
     *
     * Generated from protobuf field <code>double latitude = 4;</code>
     * @return float
     */
    public function getLatitude()
    {
        return $this->latitude;
    }

    /**
     * The latitude of the geolocation inferred from the input query.
     *
     * Generated from protobuf field <code>double latitude = 4;</code>
     * @param float $var
     * @return $this
     */
    public function setLatitude($var)
    {
        GPBUtil::checkDouble($var);
        $this->latitude = $var;

        return $this;
    }

    /**
     * The longitude of the geolocation inferred from the input query.
     *
     * Generated from protobuf field <code>double longitude = 5;</code>
     * @return float
     */
    public function getLongitude()
    {
        return $this->longitude;
    }

    /**
     * The longitude of the geolocation inferred from the input query.
     *
     * Generated from protobuf field <code>double longitude = 5;</code>
     * @param float $var
     * @return $this
     */
    public function setLongitude($var)
    {
        GPBUtil::checkDouble($var);
        $this->longitude = $var;

        return $this;
    }

    /**
     * The radius in meters around the address. The record is returned if
     * the location of the geolocation field is within the radius.
     *
     * Generated from protobuf field <code>float radius_in_meters = 3;</code>
     * @return float
     */
    public function getRadiusInMeters()
    {
        return $this->radius_in_meters;
    }

    /**
     * The radius in meters around the address. The record is returned if
     * the location of the geolocation field is within the radius.
     *
     * Generated from protobuf field <code>float radius_in_meters = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setRadiusInMeters($var)
    {
        GPBUtil::checkFloat($var);
        $this->radius_in_meters = $var;

        return $this;
    }

}


