<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/bigtable/v2/request_stats.proto

namespace Google\Cloud\Bigtable\V2;

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

/**
 * RequestStats is the container for additional information pertaining to a
 * single request, helpful for evaluating the performance of the sent request.
 * Currently, there are the following supported methods:
 *   * google.bigtable.v2.ReadRows
 *
 * Generated from protobuf message <code>google.bigtable.v2.RequestStats</code>
 */
class RequestStats extends \Google\Protobuf\Internal\Message
{
    protected $stats_view;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Bigtable\V2\FullReadStatsView $full_read_stats_view
     *           Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
     *           view, see package google.bigtable.v2.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\V2\RequestStats::initOnce();
        parent::__construct($data);
    }

    /**
     * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
     * view, see package google.bigtable.v2.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.FullReadStatsView full_read_stats_view = 1;</code>
     * @return \Google\Cloud\Bigtable\V2\FullReadStatsView|null
     */
    public function getFullReadStatsView()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
     * view, see package google.bigtable.v2.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.FullReadStatsView full_read_stats_view = 1;</code>
     * @param \Google\Cloud\Bigtable\V2\FullReadStatsView $var
     * @return $this
     */
    public function setFullReadStatsView($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\FullReadStatsView::class);
        $this->writeOneof(1, $var);

        return $this;
    }

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

}

