<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto

namespace Google\Cloud\ErrorReporting\V1beta1;

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

/**
 * Requests might be rejected or the resulting timed count durations might be
 * adjusted for lower durations.
 *
 * Generated from protobuf message <code>google.devtools.clouderrorreporting.v1beta1.QueryTimeRange</code>
 */
class QueryTimeRange extends \Google\Protobuf\Internal\Message
{
    /**
     * Restricts the query to the specified time range.
     *
     * Generated from protobuf field <code>.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1;</code>
     */
    private $period = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $period
     *           Restricts the query to the specified time range.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce();
        parent::__construct($data);
    }

    /**
     * Restricts the query to the specified time range.
     *
     * Generated from protobuf field <code>.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1;</code>
     * @return int
     */
    public function getPeriod()
    {
        return $this->period;
    }

    /**
     * Restricts the query to the specified time range.
     *
     * Generated from protobuf field <code>.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setPeriod($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange\Period::class);
        $this->period = $var;

        return $this;
    }

}

