<?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.BooleanQuery</code>
 */
class BooleanQuery extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional float boost = 1;</code>
     */
    protected $boost = null;
    /**
     * Generated from protobuf field <code>optional .couchbase.search.v1.ConjunctionQuery must = 2;</code>
     */
    protected $must = null;
    /**
     * Generated from protobuf field <code>optional .couchbase.search.v1.DisjunctionQuery must_not = 3;</code>
     */
    protected $must_not = null;
    /**
     * Generated from protobuf field <code>optional .couchbase.search.v1.DisjunctionQuery should = 4;</code>
     */
    protected $should = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $boost
     *     @type \Couchbase\Protostellar\Generated\Search\V1\ConjunctionQuery $must
     *     @type \Couchbase\Protostellar\Generated\Search\V1\DisjunctionQuery $must_not
     *     @type \Couchbase\Protostellar\Generated\Search\V1\DisjunctionQuery $should
     * }
     */
    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 .couchbase.search.v1.ConjunctionQuery must = 2;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\ConjunctionQuery|null
     */
    public function getMust()
    {
        return $this->must;
    }

    public function hasMust()
    {
        return isset($this->must);
    }

    public function clearMust()
    {
        unset($this->must);
    }

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

        return $this;
    }

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

    public function hasMustNot()
    {
        return isset($this->must_not);
    }

    public function clearMustNot()
    {
        unset($this->must_not);
    }

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

        return $this;
    }

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

    public function hasShould()
    {
        return isset($this->should);
    }

    public function clearShould()
    {
        unset($this->should);
    }

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

        return $this;
    }

}

