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

namespace Couchbase\Protostellar\Generated\View\V1;

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

/**
 * Generated from protobuf message <code>couchbase.view.v1.ViewQueryRequest</code>
 */
class ViewQueryRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string bucket_name = 8;</code>
     */
    protected $bucket_name = '';
    /**
     * Generated from protobuf field <code>string design_document_name = 1;</code>
     */
    protected $design_document_name = '';
    /**
     * Generated from protobuf field <code>string view_name = 2;</code>
     */
    protected $view_name = '';
    /**
     * Generated from protobuf field <code>optional uint32 skip = 3;</code>
     */
    protected $skip = null;
    /**
     * Generated from protobuf field <code>optional uint32 limit = 4;</code>
     */
    protected $limit = null;
    /**
     * Generated from protobuf field <code>optional .couchbase.view.v1.ViewQueryRequest.ScanConsistency scan_consistency = 5;</code>
     */
    protected $scan_consistency = null;
    /**
     * Generated from protobuf field <code>optional bool reduce = 6;</code>
     */
    protected $reduce = null;
    /**
     * Generated from protobuf field <code>optional bool group = 7;</code>
     */
    protected $group = null;
    /**
     * Generated from protobuf field <code>optional uint32 group_level = 9;</code>
     */
    protected $group_level = null;
    /**
     * Generated from protobuf field <code>optional bytes key = 10;</code>
     */
    protected $key = null;
    /**
     * Generated from protobuf field <code>repeated bytes keys = 11;</code>
     */
    private $keys;
    /**
     * Generated from protobuf field <code>optional bytes start_key = 12;</code>
     */
    protected $start_key = null;
    /**
     * Generated from protobuf field <code>optional bytes end_key = 13;</code>
     */
    protected $end_key = null;
    /**
     * Generated from protobuf field <code>optional bool inclusive_end = 14;</code>
     */
    protected $inclusive_end = null;
    /**
     * Generated from protobuf field <code>optional string start_key_doc_id = 15;</code>
     */
    protected $start_key_doc_id = null;
    /**
     * Generated from protobuf field <code>optional string end_key_doc_id = 16;</code>
     */
    protected $end_key_doc_id = null;
    /**
     * Generated from protobuf field <code>optional .couchbase.view.v1.ViewQueryRequest.ErrorMode on_error = 17;</code>
     */
    protected $on_error = null;
    /**
     * Generated from protobuf field <code>optional bool debug = 18;</code>
     */
    protected $debug = null;
    /**
     * Generated from protobuf field <code>optional .couchbase.view.v1.ViewQueryRequest.Namespace namespace = 19;</code>
     */
    protected $namespace = null;
    /**
     * Generated from protobuf field <code>optional .couchbase.view.v1.ViewQueryRequest.Order order = 20;</code>
     */
    protected $order = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $bucket_name
     *     @type string $design_document_name
     *     @type string $view_name
     *     @type int $skip
     *     @type int $limit
     *     @type int $scan_consistency
     *     @type bool $reduce
     *     @type bool $group
     *     @type int $group_level
     *     @type string $key
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $keys
     *     @type string $start_key
     *     @type string $end_key
     *     @type bool $inclusive_end
     *     @type string $start_key_doc_id
     *     @type string $end_key_doc_id
     *     @type int $on_error
     *     @type bool $debug
     *     @type int $namespace
     *     @type int $order
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Couchbase\View\V1\View::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string bucket_name = 8;</code>
     * @return string
     */
    public function getBucketName()
    {
        return $this->bucket_name;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string design_document_name = 1;</code>
     * @return string
     */
    public function getDesignDocumentName()
    {
        return $this->design_document_name;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string view_name = 2;</code>
     * @return string
     */
    public function getViewName()
    {
        return $this->view_name;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 skip = 3;</code>
     * @return int
     */
    public function getSkip()
    {
        return isset($this->skip) ? $this->skip : 0;
    }

    public function hasSkip()
    {
        return isset($this->skip);
    }

    public function clearSkip()
    {
        unset($this->skip);
    }

    /**
     * Generated from protobuf field <code>optional uint32 skip = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setSkip($var)
    {
        GPBUtil::checkUint32($var);
        $this->skip = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 limit = 4;</code>
     * @return int
     */
    public function getLimit()
    {
        return isset($this->limit) ? $this->limit : 0;
    }

    public function hasLimit()
    {
        return isset($this->limit);
    }

    public function clearLimit()
    {
        unset($this->limit);
    }

    /**
     * Generated from protobuf field <code>optional uint32 limit = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setLimit($var)
    {
        GPBUtil::checkUint32($var);
        $this->limit = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .couchbase.view.v1.ViewQueryRequest.ScanConsistency scan_consistency = 5;</code>
     * @return int
     */
    public function getScanConsistency()
    {
        return isset($this->scan_consistency) ? $this->scan_consistency : 0;
    }

    public function hasScanConsistency()
    {
        return isset($this->scan_consistency);
    }

    public function clearScanConsistency()
    {
        unset($this->scan_consistency);
    }

    /**
     * Generated from protobuf field <code>optional .couchbase.view.v1.ViewQueryRequest.ScanConsistency scan_consistency = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setScanConsistency($var)
    {
        GPBUtil::checkEnum($var, \Couchbase\Protostellar\Generated\View\V1\ViewQueryRequest\ScanConsistency::class);
        $this->scan_consistency = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool reduce = 6;</code>
     * @return bool
     */
    public function getReduce()
    {
        return isset($this->reduce) ? $this->reduce : false;
    }

    public function hasReduce()
    {
        return isset($this->reduce);
    }

    public function clearReduce()
    {
        unset($this->reduce);
    }

    /**
     * Generated from protobuf field <code>optional bool reduce = 6;</code>
     * @param bool $var
     * @return $this
     */
    public function setReduce($var)
    {
        GPBUtil::checkBool($var);
        $this->reduce = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool group = 7;</code>
     * @return bool
     */
    public function getGroup()
    {
        return isset($this->group) ? $this->group : false;
    }

    public function hasGroup()
    {
        return isset($this->group);
    }

    public function clearGroup()
    {
        unset($this->group);
    }

    /**
     * Generated from protobuf field <code>optional bool group = 7;</code>
     * @param bool $var
     * @return $this
     */
    public function setGroup($var)
    {
        GPBUtil::checkBool($var);
        $this->group = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 group_level = 9;</code>
     * @return int
     */
    public function getGroupLevel()
    {
        return isset($this->group_level) ? $this->group_level : 0;
    }

    public function hasGroupLevel()
    {
        return isset($this->group_level);
    }

    public function clearGroupLevel()
    {
        unset($this->group_level);
    }

    /**
     * Generated from protobuf field <code>optional uint32 group_level = 9;</code>
     * @param int $var
     * @return $this
     */
    public function setGroupLevel($var)
    {
        GPBUtil::checkUint32($var);
        $this->group_level = $var;

        return $this;
    }

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

    public function hasKey()
    {
        return isset($this->key);
    }

    public function clearKey()
    {
        unset($this->key);
    }

    /**
     * Generated from protobuf field <code>optional bytes key = 10;</code>
     * @param string $var
     * @return $this
     */
    public function setKey($var)
    {
        GPBUtil::checkString($var, False);
        $this->key = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated bytes keys = 11;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getKeys()
    {
        return $this->keys;
    }

    /**
     * Generated from protobuf field <code>repeated bytes keys = 11;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setKeys($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES);
        $this->keys = $arr;

        return $this;
    }

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

    public function hasStartKey()
    {
        return isset($this->start_key);
    }

    public function clearStartKey()
    {
        unset($this->start_key);
    }

    /**
     * Generated from protobuf field <code>optional bytes start_key = 12;</code>
     * @param string $var
     * @return $this
     */
    public function setStartKey($var)
    {
        GPBUtil::checkString($var, False);
        $this->start_key = $var;

        return $this;
    }

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

    public function hasEndKey()
    {
        return isset($this->end_key);
    }

    public function clearEndKey()
    {
        unset($this->end_key);
    }

    /**
     * Generated from protobuf field <code>optional bytes end_key = 13;</code>
     * @param string $var
     * @return $this
     */
    public function setEndKey($var)
    {
        GPBUtil::checkString($var, False);
        $this->end_key = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool inclusive_end = 14;</code>
     * @return bool
     */
    public function getInclusiveEnd()
    {
        return isset($this->inclusive_end) ? $this->inclusive_end : false;
    }

    public function hasInclusiveEnd()
    {
        return isset($this->inclusive_end);
    }

    public function clearInclusiveEnd()
    {
        unset($this->inclusive_end);
    }

    /**
     * Generated from protobuf field <code>optional bool inclusive_end = 14;</code>
     * @param bool $var
     * @return $this
     */
    public function setInclusiveEnd($var)
    {
        GPBUtil::checkBool($var);
        $this->inclusive_end = $var;

        return $this;
    }

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

    public function hasStartKeyDocId()
    {
        return isset($this->start_key_doc_id);
    }

    public function clearStartKeyDocId()
    {
        unset($this->start_key_doc_id);
    }

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

        return $this;
    }

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

    public function hasEndKeyDocId()
    {
        return isset($this->end_key_doc_id);
    }

    public function clearEndKeyDocId()
    {
        unset($this->end_key_doc_id);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .couchbase.view.v1.ViewQueryRequest.ErrorMode on_error = 17;</code>
     * @return int
     */
    public function getOnError()
    {
        return isset($this->on_error) ? $this->on_error : 0;
    }

    public function hasOnError()
    {
        return isset($this->on_error);
    }

    public function clearOnError()
    {
        unset($this->on_error);
    }

    /**
     * Generated from protobuf field <code>optional .couchbase.view.v1.ViewQueryRequest.ErrorMode on_error = 17;</code>
     * @param int $var
     * @return $this
     */
    public function setOnError($var)
    {
        GPBUtil::checkEnum($var, \Couchbase\Protostellar\Generated\View\V1\ViewQueryRequest\ErrorMode::class);
        $this->on_error = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool debug = 18;</code>
     * @return bool
     */
    public function getDebug()
    {
        return isset($this->debug) ? $this->debug : false;
    }

    public function hasDebug()
    {
        return isset($this->debug);
    }

    public function clearDebug()
    {
        unset($this->debug);
    }

    /**
     * Generated from protobuf field <code>optional bool debug = 18;</code>
     * @param bool $var
     * @return $this
     */
    public function setDebug($var)
    {
        GPBUtil::checkBool($var);
        $this->debug = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .couchbase.view.v1.ViewQueryRequest.Namespace namespace = 19;</code>
     * @return int
     */
    public function getNamespace()
    {
        return isset($this->namespace) ? $this->namespace : 0;
    }

    public function hasNamespace()
    {
        return isset($this->namespace);
    }

    public function clearNamespace()
    {
        unset($this->namespace);
    }

    /**
     * Generated from protobuf field <code>optional .couchbase.view.v1.ViewQueryRequest.Namespace namespace = 19;</code>
     * @param int $var
     * @return $this
     */
    public function setNamespace($var)
    {
        GPBUtil::checkEnum($var, \Couchbase\Protostellar\Generated\View\V1\ViewQueryRequest\PBNamespace::class);
        $this->namespace = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .couchbase.view.v1.ViewQueryRequest.Order order = 20;</code>
     * @return int
     */
    public function getOrder()
    {
        return isset($this->order) ? $this->order : 0;
    }

    public function hasOrder()
    {
        return isset($this->order);
    }

    public function clearOrder()
    {
        unset($this->order);
    }

    /**
     * Generated from protobuf field <code>optional .couchbase.view.v1.ViewQueryRequest.Order order = 20;</code>
     * @param int $var
     * @return $this
     */
    public function setOrder($var)
    {
        GPBUtil::checkEnum($var, \Couchbase\Protostellar\Generated\View\V1\ViewQueryRequest\Order::class);
        $this->order = $var;

        return $this;
    }

}

