<?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.DateRangeQuery</code>
 */
class DateRangeQuery 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>optional string date_time_parser = 3;</code>
     */
    protected $date_time_parser = null;
    /**
     * Generated from protobuf field <code>optional string start_date = 4;</code>
     */
    protected $start_date = null;
    /**
     * Generated from protobuf field <code>optional string end_date = 5;</code>
     */
    protected $end_date = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $boost
     *     @type string $field
     *     @type string $date_time_parser
     *     @type string $start_date
     *     @type string $end_date
     * }
     */
    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>optional string date_time_parser = 3;</code>
     * @return string
     */
    public function getDateTimeParser()
    {
        return isset($this->date_time_parser) ? $this->date_time_parser : '';
    }

    public function hasDateTimeParser()
    {
        return isset($this->date_time_parser);
    }

    public function clearDateTimeParser()
    {
        unset($this->date_time_parser);
    }

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

        return $this;
    }

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

    public function hasStartDate()
    {
        return isset($this->start_date);
    }

    public function clearStartDate()
    {
        unset($this->start_date);
    }

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

        return $this;
    }

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

    public function hasEndDate()
    {
        return isset($this->end_date);
    }

    public function clearEndDate()
    {
        unset($this->end_date);
    }

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

        return $this;
    }

}

