<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: couchbase/search/v1/search.proto

namespace Couchbase\Protostellar\Generated\Search\V1;

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

/**
 * Generated from protobuf message <code>couchbase.search.v1.GeoBoundingBoxQuery</code>
 */
class GeoBoundingBoxQuery extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional float boost = 1;</code>
     */
    protected $boost = null;
    /**
     * Generated from protobuf field <code>optional string field = 2;</code>
     */
    protected $field = null;
    /**
     * Generated from protobuf field <code>.couchbase.search.v1.LatLng top_left = 3;</code>
     */
    protected $top_left = null;
    /**
     * Generated from protobuf field <code>.couchbase.search.v1.LatLng bottom_right = 4;</code>
     */
    protected $bottom_right = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $boost
     *     @type string $field
     *     @type \Couchbase\Protostellar\Generated\Search\V1\LatLng $top_left
     *     @type \Couchbase\Protostellar\Generated\Search\V1\LatLng $bottom_right
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Couchbase\Search\V1\Search::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional float boost = 1;</code>
     * @return float
     */
    public function getBoost()
    {
        return isset($this->boost) ? $this->boost : 0.0;
    }

    public function hasBoost()
    {
        return isset($this->boost);
    }

    public function clearBoost()
    {
        unset($this->boost);
    }

    /**
     * Generated from protobuf field <code>optional float boost = 1;</code>
     * @param float $var
     * @return $this
     */
    public function setBoost($var)
    {
        GPBUtil::checkFloat($var);
        $this->boost = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string field = 2;</code>
     * @return string
     */
    public function getField()
    {
        return isset($this->field) ? $this->field : '';
    }

    public function hasField()
    {
        return isset($this->field);
    }

    public function clearField()
    {
        unset($this->field);
    }

    /**
     * Generated from protobuf field <code>optional string field = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setField($var)
    {
        GPBUtil::checkString($var, True);
        $this->field = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.LatLng top_left = 3;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\LatLng|null
     */
    public function getTopLeft()
    {
        return $this->top_left;
    }

    public function hasTopLeft()
    {
        return isset($this->top_left);
    }

    public function clearTopLeft()
    {
        unset($this->top_left);
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.LatLng top_left = 3;</code>
     * @param \Couchbase\Protostellar\Generated\Search\V1\LatLng $var
     * @return $this
     */
    public function setTopLeft($var)
    {
        GPBUtil::checkMessage($var, \Couchbase\Protostellar\Generated\Search\V1\LatLng::class);
        $this->top_left = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.LatLng bottom_right = 4;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\LatLng|null
     */
    public function getBottomRight()
    {
        return $this->bottom_right;
    }

    public function hasBottomRight()
    {
        return isset($this->bottom_right);
    }

    public function clearBottomRight()
    {
        unset($this->bottom_right);
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.LatLng bottom_right = 4;</code>
     * @param \Couchbase\Protostellar\Generated\Search\V1\LatLng $var
     * @return $this
     */
    public function setBottomRight($var)
    {
        GPBUtil::checkMessage($var, \Couchbase\Protostellar\Generated\Search\V1\LatLng::class);
        $this->bottom_right = $var;

        return $this;
    }

}

