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

namespace Couchbase\Protostellar\Generated\Query\V1\QueryRequest;

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

/**
 * Generated from protobuf message <code>couchbase.query.v1.QueryRequest.TuningOptions</code>
 */
class TuningOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional uint32 max_parallelism = 1;</code>
     */
    protected $max_parallelism = null;
    /**
     * Generated from protobuf field <code>optional uint32 pipeline_batch = 2;</code>
     */
    protected $pipeline_batch = null;
    /**
     * Generated from protobuf field <code>optional uint32 pipeline_cap = 3;</code>
     */
    protected $pipeline_cap = null;
    /**
     * Generated from protobuf field <code>optional .google.protobuf.Duration scan_wait = 4;</code>
     */
    protected $scan_wait = null;
    /**
     * Generated from protobuf field <code>optional uint32 scan_cap = 5;</code>
     */
    protected $scan_cap = null;
    /**
     * Generated from protobuf field <code>optional bool disable_metrics = 6;</code>
     */
    protected $disable_metrics = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $max_parallelism
     *     @type int $pipeline_batch
     *     @type int $pipeline_cap
     *     @type \Google\Protobuf\Duration $scan_wait
     *     @type int $scan_cap
     *     @type bool $disable_metrics
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Couchbase\Query\V1\Query::initOnce();
        parent::__construct($data);
    }

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

    public function hasMaxParallelism()
    {
        return isset($this->max_parallelism);
    }

    public function clearMaxParallelism()
    {
        unset($this->max_parallelism);
    }

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

        return $this;
    }

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

    public function hasPipelineBatch()
    {
        return isset($this->pipeline_batch);
    }

    public function clearPipelineBatch()
    {
        unset($this->pipeline_batch);
    }

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

        return $this;
    }

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

    public function hasPipelineCap()
    {
        return isset($this->pipeline_cap);
    }

    public function clearPipelineCap()
    {
        unset($this->pipeline_cap);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .google.protobuf.Duration scan_wait = 4;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getScanWait()
    {
        return $this->scan_wait;
    }

    public function hasScanWait()
    {
        return isset($this->scan_wait);
    }

    public function clearScanWait()
    {
        unset($this->scan_wait);
    }

    /**
     * Generated from protobuf field <code>optional .google.protobuf.Duration scan_wait = 4;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setScanWait($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->scan_wait = $var;

        return $this;
    }

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

    public function hasScanCap()
    {
        return isset($this->scan_cap);
    }

    public function clearScanCap()
    {
        unset($this->scan_cap);
    }

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

        return $this;
    }

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

    public function hasDisableMetrics()
    {
        return isset($this->disable_metrics);
    }

    public function clearDisableMetrics()
    {
        unset($this->disable_metrics);
    }

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

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TuningOptions::class, \Couchbase\Protostellar\Generated\Query\V1\QueryRequest_TuningOptions::class);

