<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/analytics/data/v1beta/data.proto

namespace Google\Analytics\Data\V1beta;

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

/**
 * Current state of all quotas for this Analytics Property. If any quota for a
 * property is exhausted, all requests to that property will return Resource
 * Exhausted errors.
 *
 * Generated from protobuf message <code>google.analytics.data.v1beta.PropertyQuota</code>
 */
class PropertyQuota extends \Google\Protobuf\Internal\Message
{
    /**
     * Standard Analytics Properties can use up to 25,000 tokens per day;
     * Analytics 360 Properties can use 250,000 tokens per day. Most requests
     * consume fewer than 10 tokens.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1;</code>
     */
    private $tokens_per_day = null;
    /**
     * Standard Analytics Properties can use up to 5,000 tokens per hour;
     * Analytics 360 Properties can use 50,000 tokens per hour. An API request
     * consumes a single number of tokens, and that number is deducted from both
     * the hourly and daily quotas.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2;</code>
     */
    private $tokens_per_hour = null;
    /**
     * Standard Analytics Properties can send up to 10 concurrent requests;
     * Analytics 360 Properties can use up to 50 concurrent requests.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3;</code>
     */
    private $concurrent_requests = null;
    /**
     * Standard Analytics Properties and cloud project pairs can have up to 10
     * server errors per hour; Analytics 360 Properties and cloud project pairs
     * can have up to 50 server errors per hour.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4;</code>
     */
    private $server_errors_per_project_per_hour = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Analytics\Data\V1beta\QuotaStatus $tokens_per_day
     *           Standard Analytics Properties can use up to 25,000 tokens per day;
     *           Analytics 360 Properties can use 250,000 tokens per day. Most requests
     *           consume fewer than 10 tokens.
     *     @type \Google\Analytics\Data\V1beta\QuotaStatus $tokens_per_hour
     *           Standard Analytics Properties can use up to 5,000 tokens per hour;
     *           Analytics 360 Properties can use 50,000 tokens per hour. An API request
     *           consumes a single number of tokens, and that number is deducted from both
     *           the hourly and daily quotas.
     *     @type \Google\Analytics\Data\V1beta\QuotaStatus $concurrent_requests
     *           Standard Analytics Properties can send up to 10 concurrent requests;
     *           Analytics 360 Properties can use up to 50 concurrent requests.
     *     @type \Google\Analytics\Data\V1beta\QuotaStatus $server_errors_per_project_per_hour
     *           Standard Analytics Properties and cloud project pairs can have up to 10
     *           server errors per hour; Analytics 360 Properties and cloud project pairs
     *           can have up to 50 server errors per hour.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Analytics\Data\V1Beta\Data::initOnce();
        parent::__construct($data);
    }

    /**
     * Standard Analytics Properties can use up to 25,000 tokens per day;
     * Analytics 360 Properties can use 250,000 tokens per day. Most requests
     * consume fewer than 10 tokens.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1;</code>
     * @return \Google\Analytics\Data\V1beta\QuotaStatus|null
     */
    public function getTokensPerDay()
    {
        return isset($this->tokens_per_day) ? $this->tokens_per_day : null;
    }

    public function hasTokensPerDay()
    {
        return isset($this->tokens_per_day);
    }

    public function clearTokensPerDay()
    {
        unset($this->tokens_per_day);
    }

    /**
     * Standard Analytics Properties can use up to 25,000 tokens per day;
     * Analytics 360 Properties can use 250,000 tokens per day. Most requests
     * consume fewer than 10 tokens.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1;</code>
     * @param \Google\Analytics\Data\V1beta\QuotaStatus $var
     * @return $this
     */
    public function setTokensPerDay($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1beta\QuotaStatus::class);
        $this->tokens_per_day = $var;

        return $this;
    }

    /**
     * Standard Analytics Properties can use up to 5,000 tokens per hour;
     * Analytics 360 Properties can use 50,000 tokens per hour. An API request
     * consumes a single number of tokens, and that number is deducted from both
     * the hourly and daily quotas.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2;</code>
     * @return \Google\Analytics\Data\V1beta\QuotaStatus|null
     */
    public function getTokensPerHour()
    {
        return isset($this->tokens_per_hour) ? $this->tokens_per_hour : null;
    }

    public function hasTokensPerHour()
    {
        return isset($this->tokens_per_hour);
    }

    public function clearTokensPerHour()
    {
        unset($this->tokens_per_hour);
    }

    /**
     * Standard Analytics Properties can use up to 5,000 tokens per hour;
     * Analytics 360 Properties can use 50,000 tokens per hour. An API request
     * consumes a single number of tokens, and that number is deducted from both
     * the hourly and daily quotas.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2;</code>
     * @param \Google\Analytics\Data\V1beta\QuotaStatus $var
     * @return $this
     */
    public function setTokensPerHour($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1beta\QuotaStatus::class);
        $this->tokens_per_hour = $var;

        return $this;
    }

    /**
     * Standard Analytics Properties can send up to 10 concurrent requests;
     * Analytics 360 Properties can use up to 50 concurrent requests.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3;</code>
     * @return \Google\Analytics\Data\V1beta\QuotaStatus|null
     */
    public function getConcurrentRequests()
    {
        return isset($this->concurrent_requests) ? $this->concurrent_requests : null;
    }

    public function hasConcurrentRequests()
    {
        return isset($this->concurrent_requests);
    }

    public function clearConcurrentRequests()
    {
        unset($this->concurrent_requests);
    }

    /**
     * Standard Analytics Properties can send up to 10 concurrent requests;
     * Analytics 360 Properties can use up to 50 concurrent requests.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3;</code>
     * @param \Google\Analytics\Data\V1beta\QuotaStatus $var
     * @return $this
     */
    public function setConcurrentRequests($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1beta\QuotaStatus::class);
        $this->concurrent_requests = $var;

        return $this;
    }

    /**
     * Standard Analytics Properties and cloud project pairs can have up to 10
     * server errors per hour; Analytics 360 Properties and cloud project pairs
     * can have up to 50 server errors per hour.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4;</code>
     * @return \Google\Analytics\Data\V1beta\QuotaStatus|null
     */
    public function getServerErrorsPerProjectPerHour()
    {
        return isset($this->server_errors_per_project_per_hour) ? $this->server_errors_per_project_per_hour : null;
    }

    public function hasServerErrorsPerProjectPerHour()
    {
        return isset($this->server_errors_per_project_per_hour);
    }

    public function clearServerErrorsPerProjectPerHour()
    {
        unset($this->server_errors_per_project_per_hour);
    }

    /**
     * Standard Analytics Properties and cloud project pairs can have up to 10
     * server errors per hour; Analytics 360 Properties and cloud project pairs
     * can have up to 50 server errors per hour.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4;</code>
     * @param \Google\Analytics\Data\V1beta\QuotaStatus $var
     * @return $this
     */
    public function setServerErrorsPerProjectPerHour($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1beta\QuotaStatus::class);
        $this->server_errors_per_project_per_hour = $var;

        return $this;
    }

}

