google.api.servicecontrol.v1.MetricValueSet
*/
class MetricValueSet extends \Google\Protobuf\Internal\Message
{
/**
* The metric name defined in the service configuration.
*
* Generated from protobuf field string metric_name = 1;
*/
private $metric_name = '';
/**
* The values in this metric.
*
* Generated from protobuf field repeated .google.api.servicecontrol.v1.MetricValue metric_values = 2;
*/
private $metric_values;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $metric_name
* The metric name defined in the service configuration.
* @type \Google\Api\Servicecontrol\V1\MetricValue[]|\Google\Protobuf\Internal\RepeatedField $metric_values
* The values in this metric.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Api\Servicecontrol\V1\MetricValue::initOnce();
parent::__construct($data);
}
/**
* The metric name defined in the service configuration.
*
* Generated from protobuf field string metric_name = 1;
* @return string
*/
public function getMetricName()
{
return $this->metric_name;
}
/**
* The metric name defined in the service configuration.
*
* Generated from protobuf field string metric_name = 1;
* @param string $var
* @return $this
*/
public function setMetricName($var)
{
GPBUtil::checkString($var, True);
$this->metric_name = $var;
return $this;
}
/**
* The values in this metric.
*
* Generated from protobuf field repeated .google.api.servicecontrol.v1.MetricValue metric_values = 2;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getMetricValues()
{
return $this->metric_values;
}
/**
* The values in this metric.
*
* Generated from protobuf field repeated .google.api.servicecontrol.v1.MetricValue metric_values = 2;
* @param \Google\Api\Servicecontrol\V1\MetricValue[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setMetricValues($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\Servicecontrol\V1\MetricValue::class);
$this->metric_values = $arr;
return $this;
}
}