<?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.Query</code>
 */
class Query extends \Google\Protobuf\Internal\Message
{
    protected $query;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Couchbase\Protostellar\Generated\Search\V1\BooleanFieldQuery $boolean_field_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\BooleanQuery $boolean_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\ConjunctionQuery $conjunction_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\DateRangeQuery $date_range_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\DisjunctionQuery $disjunction_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\DocIdQuery $doc_id_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\GeoBoundingBoxQuery $geo_bounding_box_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\GeoDistanceQuery $geo_distance_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\GeoPolygonQuery $geo_polygon_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\MatchAllQuery $match_all_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\MatchNoneQuery $match_none_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\MatchPhraseQuery $match_phrase_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\MatchQuery $match_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\NumericRangeQuery $numeric_range_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\PhraseQuery $phrase_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\PrefixQuery $prefix_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\QueryStringQuery $query_string_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\RegexpQuery $regexp_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\TermQuery $term_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\TermRangeQuery $term_range_query
     *     @type \Couchbase\Protostellar\Generated\Search\V1\WildcardQuery $wildcard_query
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Couchbase\Search\V1\Search::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.BooleanFieldQuery boolean_field_query = 1;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\BooleanFieldQuery|null
     */
    public function getBooleanFieldQuery()
    {
        return $this->readOneof(1);
    }

    public function hasBooleanFieldQuery()
    {
        return $this->hasOneof(1);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.BooleanQuery boolean_query = 2;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\BooleanQuery|null
     */
    public function getBooleanQuery()
    {
        return $this->readOneof(2);
    }

    public function hasBooleanQuery()
    {
        return $this->hasOneof(2);
    }

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

        return $this;
    }

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

    public function hasConjunctionQuery()
    {
        return $this->hasOneof(3);
    }

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

        return $this;
    }

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

    public function hasDateRangeQuery()
    {
        return $this->hasOneof(4);
    }

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

        return $this;
    }

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

    public function hasDisjunctionQuery()
    {
        return $this->hasOneof(5);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.DocIdQuery doc_id_query = 6;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\DocIdQuery|null
     */
    public function getDocIdQuery()
    {
        return $this->readOneof(6);
    }

    public function hasDocIdQuery()
    {
        return $this->hasOneof(6);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.GeoBoundingBoxQuery geo_bounding_box_query = 7;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\GeoBoundingBoxQuery|null
     */
    public function getGeoBoundingBoxQuery()
    {
        return $this->readOneof(7);
    }

    public function hasGeoBoundingBoxQuery()
    {
        return $this->hasOneof(7);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.GeoDistanceQuery geo_distance_query = 8;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\GeoDistanceQuery|null
     */
    public function getGeoDistanceQuery()
    {
        return $this->readOneof(8);
    }

    public function hasGeoDistanceQuery()
    {
        return $this->hasOneof(8);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.GeoPolygonQuery geo_polygon_query = 9;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\GeoPolygonQuery|null
     */
    public function getGeoPolygonQuery()
    {
        return $this->readOneof(9);
    }

    public function hasGeoPolygonQuery()
    {
        return $this->hasOneof(9);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.MatchAllQuery match_all_query = 10;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\MatchAllQuery|null
     */
    public function getMatchAllQuery()
    {
        return $this->readOneof(10);
    }

    public function hasMatchAllQuery()
    {
        return $this->hasOneof(10);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.MatchNoneQuery match_none_query = 11;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\MatchNoneQuery|null
     */
    public function getMatchNoneQuery()
    {
        return $this->readOneof(11);
    }

    public function hasMatchNoneQuery()
    {
        return $this->hasOneof(11);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.MatchPhraseQuery match_phrase_query = 12;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\MatchPhraseQuery|null
     */
    public function getMatchPhraseQuery()
    {
        return $this->readOneof(12);
    }

    public function hasMatchPhraseQuery()
    {
        return $this->hasOneof(12);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.MatchQuery match_query = 13;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\MatchQuery|null
     */
    public function getMatchQuery()
    {
        return $this->readOneof(13);
    }

    public function hasMatchQuery()
    {
        return $this->hasOneof(13);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.NumericRangeQuery numeric_range_query = 14;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\NumericRangeQuery|null
     */
    public function getNumericRangeQuery()
    {
        return $this->readOneof(14);
    }

    public function hasNumericRangeQuery()
    {
        return $this->hasOneof(14);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.PhraseQuery phrase_query = 15;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\PhraseQuery|null
     */
    public function getPhraseQuery()
    {
        return $this->readOneof(15);
    }

    public function hasPhraseQuery()
    {
        return $this->hasOneof(15);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.PrefixQuery prefix_query = 16;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\PrefixQuery|null
     */
    public function getPrefixQuery()
    {
        return $this->readOneof(16);
    }

    public function hasPrefixQuery()
    {
        return $this->hasOneof(16);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.QueryStringQuery query_string_query = 17;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\QueryStringQuery|null
     */
    public function getQueryStringQuery()
    {
        return $this->readOneof(17);
    }

    public function hasQueryStringQuery()
    {
        return $this->hasOneof(17);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.RegexpQuery regexp_query = 18;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\RegexpQuery|null
     */
    public function getRegexpQuery()
    {
        return $this->readOneof(18);
    }

    public function hasRegexpQuery()
    {
        return $this->hasOneof(18);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.TermQuery term_query = 19;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\TermQuery|null
     */
    public function getTermQuery()
    {
        return $this->readOneof(19);
    }

    public function hasTermQuery()
    {
        return $this->hasOneof(19);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.TermRangeQuery term_range_query = 20;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\TermRangeQuery|null
     */
    public function getTermRangeQuery()
    {
        return $this->readOneof(20);
    }

    public function hasTermRangeQuery()
    {
        return $this->hasOneof(20);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.search.v1.WildcardQuery wildcard_query = 21;</code>
     * @return \Couchbase\Protostellar\Generated\Search\V1\WildcardQuery|null
     */
    public function getWildcardQuery()
    {
        return $this->readOneof(21);
    }

    public function hasWildcardQuery()
    {
        return $this->hasOneof(21);
    }

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

        return $this;
    }

    /**
     * @return string
     */
    public function getQuery()
    {
        return $this->whichOneof("query");
    }

}

