google.api.Quota
*/
class Quota extends \Google\Protobuf\Internal\Message
{
/**
* List of `QuotaLimit` definitions for the service.
* Used by metric-based quotas only.
*
* Generated from protobuf field repeated .google.api.QuotaLimit limits = 3;
*/
private $limits;
/**
* List of `MetricRule` definitions, each one mapping a selected method to one
* or more metrics.
* Used by metric-based quotas only.
*
* Generated from protobuf field repeated .google.api.MetricRule metric_rules = 4;
*/
private $metric_rules;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Google\Api\QuotaLimit[]|\Google\Protobuf\Internal\RepeatedField $limits
* List of `QuotaLimit` definitions for the service.
* Used by metric-based quotas only.
* @type \Google\Api\MetricRule[]|\Google\Protobuf\Internal\RepeatedField $metric_rules
* List of `MetricRule` definitions, each one mapping a selected method to one
* or more metrics.
* Used by metric-based quotas only.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Api\Quota::initOnce();
parent::__construct($data);
}
/**
* List of `QuotaLimit` definitions for the service.
* Used by metric-based quotas only.
*
* Generated from protobuf field repeated .google.api.QuotaLimit limits = 3;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getLimits()
{
return $this->limits;
}
/**
* List of `QuotaLimit` definitions for the service.
* Used by metric-based quotas only.
*
* Generated from protobuf field repeated .google.api.QuotaLimit limits = 3;
* @param \Google\Api\QuotaLimit[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setLimits($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\QuotaLimit::class);
$this->limits = $arr;
return $this;
}
/**
* List of `MetricRule` definitions, each one mapping a selected method to one
* or more metrics.
* Used by metric-based quotas only.
*
* Generated from protobuf field repeated .google.api.MetricRule metric_rules = 4;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getMetricRules()
{
return $this->metric_rules;
}
/**
* List of `MetricRule` definitions, each one mapping a selected method to one
* or more metrics.
* Used by metric-based quotas only.
*
* Generated from protobuf field repeated .google.api.MetricRule metric_rules = 4;
* @param \Google\Api\MetricRule[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setMetricRules($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MetricRule::class);
$this->metric_rules = $arr;
return $this;
}
}