google.api.servicecontrol.v1.MetricValue */ class MetricValue extends \Google\Protobuf\Internal\Message { /** * The labels describing the metric value. * See comments on * [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] * for the overriding relationship. * * Generated from protobuf field map labels = 1; */ private $labels; /** * The start of the time period over which this metric value's measurement * applies. The time period has different semantics for different metric * types (cumulative, delta, and gauge). See the metric definition * documentation in the service configuration for details. * * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; */ private $start_time = null; /** * The end of the time period over which this metric value's measurement * applies. * * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; */ private $end_time = null; protected $value; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type array|\Google\Protobuf\Internal\MapField $labels * The labels describing the metric value. * See comments on * [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] * for the overriding relationship. * @type \Google\Protobuf\Timestamp $start_time * The start of the time period over which this metric value's measurement * applies. The time period has different semantics for different metric * types (cumulative, delta, and gauge). See the metric definition * documentation in the service configuration for details. * @type \Google\Protobuf\Timestamp $end_time * The end of the time period over which this metric value's measurement * applies. * @type bool $bool_value * A boolean value. * @type int|string $int64_value * A signed 64-bit integer value. * @type float $double_value * A double precision floating point value. * @type string $string_value * A text string value. * @type \Google\Api\Servicecontrol\V1\Distribution $distribution_value * A distribution value. * } */ public function __construct($data = NULL) { \GPBMetadata\Google\Api\Servicecontrol\V1\MetricValue::initOnce(); parent::__construct($data); } /** * The labels describing the metric value. * See comments on * [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] * for the overriding relationship. * * Generated from protobuf field map labels = 1; * @return \Google\Protobuf\Internal\MapField */ public function getLabels() { return $this->labels; } /** * The labels describing the metric value. * See comments on * [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] * for the overriding relationship. * * Generated from protobuf field map labels = 1; * @param array|\Google\Protobuf\Internal\MapField $var * @return $this */ public function setLabels($var) { $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); $this->labels = $arr; return $this; } /** * The start of the time period over which this metric value's measurement * applies. The time period has different semantics for different metric * types (cumulative, delta, and gauge). See the metric definition * documentation in the service configuration for details. * * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; * @return \Google\Protobuf\Timestamp */ public function getStartTime() { return $this->start_time; } /** * The start of the time period over which this metric value's measurement * applies. The time period has different semantics for different metric * types (cumulative, delta, and gauge). See the metric definition * documentation in the service configuration for details. * * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; * @param \Google\Protobuf\Timestamp $var * @return $this */ public function setStartTime($var) { GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); $this->start_time = $var; return $this; } /** * The end of the time period over which this metric value's measurement * applies. * * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; * @return \Google\Protobuf\Timestamp */ public function getEndTime() { return $this->end_time; } /** * The end of the time period over which this metric value's measurement * applies. * * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; * @param \Google\Protobuf\Timestamp $var * @return $this */ public function setEndTime($var) { GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); $this->end_time = $var; return $this; } /** * A boolean value. * * Generated from protobuf field bool bool_value = 4; * @return bool */ public function getBoolValue() { return $this->readOneof(4); } /** * A boolean value. * * Generated from protobuf field bool bool_value = 4; * @param bool $var * @return $this */ public function setBoolValue($var) { GPBUtil::checkBool($var); $this->writeOneof(4, $var); return $this; } /** * A signed 64-bit integer value. * * Generated from protobuf field int64 int64_value = 5; * @return int|string */ public function getInt64Value() { return $this->readOneof(5); } /** * A signed 64-bit integer value. * * Generated from protobuf field int64 int64_value = 5; * @param int|string $var * @return $this */ public function setInt64Value($var) { GPBUtil::checkInt64($var); $this->writeOneof(5, $var); return $this; } /** * A double precision floating point value. * * Generated from protobuf field double double_value = 6; * @return float */ public function getDoubleValue() { return $this->readOneof(6); } /** * A double precision floating point value. * * Generated from protobuf field double double_value = 6; * @param float $var * @return $this */ public function setDoubleValue($var) { GPBUtil::checkDouble($var); $this->writeOneof(6, $var); return $this; } /** * A text string value. * * Generated from protobuf field string string_value = 7; * @return string */ public function getStringValue() { return $this->readOneof(7); } /** * A text string value. * * Generated from protobuf field string string_value = 7; * @param string $var * @return $this */ public function setStringValue($var) { GPBUtil::checkString($var, True); $this->writeOneof(7, $var); return $this; } /** * A distribution value. * * Generated from protobuf field .google.api.servicecontrol.v1.Distribution distribution_value = 8; * @return \Google\Api\Servicecontrol\V1\Distribution */ public function getDistributionValue() { return $this->readOneof(8); } /** * A distribution value. * * Generated from protobuf field .google.api.servicecontrol.v1.Distribution distribution_value = 8; * @param \Google\Api\Servicecontrol\V1\Distribution $var * @return $this */ public function setDistributionValue($var) { GPBUtil::checkMessage($var, \Google\Api\Servicecontrol\V1\Distribution::class); $this->writeOneof(8, $var); return $this; } /** * @return string */ public function getValue() { return $this->whichOneof("value"); } }