google.api.Distribution.Exemplar */ class Exemplar extends \Google\Protobuf\Internal\Message { /** * Value of the exemplar point. This value determines to which bucket the * exemplar belongs. * * Generated from protobuf field double value = 1; */ private $value = 0.0; /** * The observation (sampling) time of the above value. * * Generated from protobuf field .google.protobuf.Timestamp timestamp = 2; */ private $timestamp = null; /** * Contextual information about the example value. Examples are: * Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.Trace * Literal string: type.googleapis.com/google.protobuf.StringValue * Labels dropped during aggregation: * type.googleapis.com/google.monitoring.v3.DroppedLabels * There may be only a single attachment of any given message type in a * single exemplar, and this is enforced by the system. * * Generated from protobuf field repeated .google.protobuf.Any attachments = 3; */ private $attachments; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type float $value * Value of the exemplar point. This value determines to which bucket the * exemplar belongs. * @type \Google\Protobuf\Timestamp $timestamp * The observation (sampling) time of the above value. * @type \Google\Protobuf\Any[]|\Google\Protobuf\Internal\RepeatedField $attachments * Contextual information about the example value. Examples are: * Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.Trace * Literal string: type.googleapis.com/google.protobuf.StringValue * Labels dropped during aggregation: * type.googleapis.com/google.monitoring.v3.DroppedLabels * There may be only a single attachment of any given message type in a * single exemplar, and this is enforced by the system. * } */ public function __construct($data = NULL) { \GPBMetadata\Google\Api\Distribution::initOnce(); parent::__construct($data); } /** * Value of the exemplar point. This value determines to which bucket the * exemplar belongs. * * Generated from protobuf field double value = 1; * @return float */ public function getValue() { return $this->value; } /** * Value of the exemplar point. This value determines to which bucket the * exemplar belongs. * * Generated from protobuf field double value = 1; * @param float $var * @return $this */ public function setValue($var) { GPBUtil::checkDouble($var); $this->value = $var; return $this; } /** * The observation (sampling) time of the above value. * * Generated from protobuf field .google.protobuf.Timestamp timestamp = 2; * @return \Google\Protobuf\Timestamp */ public function getTimestamp() { return $this->timestamp; } /** * The observation (sampling) time of the above value. * * Generated from protobuf field .google.protobuf.Timestamp timestamp = 2; * @param \Google\Protobuf\Timestamp $var * @return $this */ public function setTimestamp($var) { GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); $this->timestamp = $var; return $this; } /** * Contextual information about the example value. Examples are: * Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.Trace * Literal string: type.googleapis.com/google.protobuf.StringValue * Labels dropped during aggregation: * type.googleapis.com/google.monitoring.v3.DroppedLabels * There may be only a single attachment of any given message type in a * single exemplar, and this is enforced by the system. * * Generated from protobuf field repeated .google.protobuf.Any attachments = 3; * @return \Google\Protobuf\Internal\RepeatedField */ public function getAttachments() { return $this->attachments; } /** * Contextual information about the example value. Examples are: * Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.Trace * Literal string: type.googleapis.com/google.protobuf.StringValue * Labels dropped during aggregation: * type.googleapis.com/google.monitoring.v3.DroppedLabels * There may be only a single attachment of any given message type in a * single exemplar, and this is enforced by the system. * * Generated from protobuf field repeated .google.protobuf.Any attachments = 3; * @param \Google\Protobuf\Any[]|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setAttachments($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class); $this->attachments = $arr; return $this; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(Exemplar::class, \Google\Api\Distribution_Exemplar::class);