googleanalytics
/
lib
/
analytics-admin
/
vendor
/
google
/
common-protos
/
src
/
Api
/
Distribution
/
Exemplar.php
googleanalytics
/
lib
/
analytics-admin
/
vendor
/
google
/
common-protos
/
src
/
Api
/
Distribution
Last commit date
BucketOptions
3 years ago
BucketOptions.php
3 years ago
Exemplar.php
3 years ago
Range.php
3 years ago
Exemplar.php
171 lines
| 1 | <?php |
| 2 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 | # source: google/api/distribution.proto |
| 4 | |
| 5 | namespace Google\Api\Distribution; |
| 6 | |
| 7 | use Google\Protobuf\Internal\GPBType; |
| 8 | use Google\Protobuf\Internal\RepeatedField; |
| 9 | use Google\Protobuf\Internal\GPBUtil; |
| 10 | |
| 11 | /** |
| 12 | * Exemplars are example points that may be used to annotate aggregated |
| 13 | * distribution values. They are metadata that gives information about a |
| 14 | * particular value added to a Distribution bucket, such as a trace ID that |
| 15 | * was active when a value was added. They may contain further information, |
| 16 | * such as a example values and timestamps, origin, etc. |
| 17 | * |
| 18 | * Generated from protobuf message <code>google.api.Distribution.Exemplar</code> |
| 19 | */ |
| 20 | class Exemplar extends \Google\Protobuf\Internal\Message |
| 21 | { |
| 22 | /** |
| 23 | * Value of the exemplar point. This value determines to which bucket the |
| 24 | * exemplar belongs. |
| 25 | * |
| 26 | * Generated from protobuf field <code>double value = 1;</code> |
| 27 | */ |
| 28 | private $value = 0.0; |
| 29 | /** |
| 30 | * The observation (sampling) time of the above value. |
| 31 | * |
| 32 | * Generated from protobuf field <code>.google.protobuf.Timestamp timestamp = 2;</code> |
| 33 | */ |
| 34 | private $timestamp = null; |
| 35 | /** |
| 36 | * Contextual information about the example value. Examples are: |
| 37 | * Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.Trace |
| 38 | * Literal string: type.googleapis.com/google.protobuf.StringValue |
| 39 | * Labels dropped during aggregation: |
| 40 | * type.googleapis.com/google.monitoring.v3.DroppedLabels |
| 41 | * There may be only a single attachment of any given message type in a |
| 42 | * single exemplar, and this is enforced by the system. |
| 43 | * |
| 44 | * Generated from protobuf field <code>repeated .google.protobuf.Any attachments = 3;</code> |
| 45 | */ |
| 46 | private $attachments; |
| 47 | |
| 48 | /** |
| 49 | * Constructor. |
| 50 | * |
| 51 | * @param array $data { |
| 52 | * Optional. Data for populating the Message object. |
| 53 | * |
| 54 | * @type float $value |
| 55 | * Value of the exemplar point. This value determines to which bucket the |
| 56 | * exemplar belongs. |
| 57 | * @type \Google\Protobuf\Timestamp $timestamp |
| 58 | * The observation (sampling) time of the above value. |
| 59 | * @type \Google\Protobuf\Any[]|\Google\Protobuf\Internal\RepeatedField $attachments |
| 60 | * Contextual information about the example value. Examples are: |
| 61 | * Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.Trace |
| 62 | * Literal string: type.googleapis.com/google.protobuf.StringValue |
| 63 | * Labels dropped during aggregation: |
| 64 | * type.googleapis.com/google.monitoring.v3.DroppedLabels |
| 65 | * There may be only a single attachment of any given message type in a |
| 66 | * single exemplar, and this is enforced by the system. |
| 67 | * } |
| 68 | */ |
| 69 | public function __construct($data = NULL) { |
| 70 | \GPBMetadata\Google\Api\Distribution::initOnce(); |
| 71 | parent::__construct($data); |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * Value of the exemplar point. This value determines to which bucket the |
| 76 | * exemplar belongs. |
| 77 | * |
| 78 | * Generated from protobuf field <code>double value = 1;</code> |
| 79 | * @return float |
| 80 | */ |
| 81 | public function getValue() |
| 82 | { |
| 83 | return $this->value; |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Value of the exemplar point. This value determines to which bucket the |
| 88 | * exemplar belongs. |
| 89 | * |
| 90 | * Generated from protobuf field <code>double value = 1;</code> |
| 91 | * @param float $var |
| 92 | * @return $this |
| 93 | */ |
| 94 | public function setValue($var) |
| 95 | { |
| 96 | GPBUtil::checkDouble($var); |
| 97 | $this->value = $var; |
| 98 | |
| 99 | return $this; |
| 100 | } |
| 101 | |
| 102 | /** |
| 103 | * The observation (sampling) time of the above value. |
| 104 | * |
| 105 | * Generated from protobuf field <code>.google.protobuf.Timestamp timestamp = 2;</code> |
| 106 | * @return \Google\Protobuf\Timestamp |
| 107 | */ |
| 108 | public function getTimestamp() |
| 109 | { |
| 110 | return $this->timestamp; |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * The observation (sampling) time of the above value. |
| 115 | * |
| 116 | * Generated from protobuf field <code>.google.protobuf.Timestamp timestamp = 2;</code> |
| 117 | * @param \Google\Protobuf\Timestamp $var |
| 118 | * @return $this |
| 119 | */ |
| 120 | public function setTimestamp($var) |
| 121 | { |
| 122 | GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); |
| 123 | $this->timestamp = $var; |
| 124 | |
| 125 | return $this; |
| 126 | } |
| 127 | |
| 128 | /** |
| 129 | * Contextual information about the example value. Examples are: |
| 130 | * Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.Trace |
| 131 | * Literal string: type.googleapis.com/google.protobuf.StringValue |
| 132 | * Labels dropped during aggregation: |
| 133 | * type.googleapis.com/google.monitoring.v3.DroppedLabels |
| 134 | * There may be only a single attachment of any given message type in a |
| 135 | * single exemplar, and this is enforced by the system. |
| 136 | * |
| 137 | * Generated from protobuf field <code>repeated .google.protobuf.Any attachments = 3;</code> |
| 138 | * @return \Google\Protobuf\Internal\RepeatedField |
| 139 | */ |
| 140 | public function getAttachments() |
| 141 | { |
| 142 | return $this->attachments; |
| 143 | } |
| 144 | |
| 145 | /** |
| 146 | * Contextual information about the example value. Examples are: |
| 147 | * Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.Trace |
| 148 | * Literal string: type.googleapis.com/google.protobuf.StringValue |
| 149 | * Labels dropped during aggregation: |
| 150 | * type.googleapis.com/google.monitoring.v3.DroppedLabels |
| 151 | * There may be only a single attachment of any given message type in a |
| 152 | * single exemplar, and this is enforced by the system. |
| 153 | * |
| 154 | * Generated from protobuf field <code>repeated .google.protobuf.Any attachments = 3;</code> |
| 155 | * @param \Google\Protobuf\Any[]|\Google\Protobuf\Internal\RepeatedField $var |
| 156 | * @return $this |
| 157 | */ |
| 158 | public function setAttachments($var) |
| 159 | { |
| 160 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class); |
| 161 | $this->attachments = $arr; |
| 162 | |
| 163 | return $this; |
| 164 | } |
| 165 | |
| 166 | } |
| 167 | |
| 168 | // Adding a class alias for backwards compatibility with the previous class name. |
| 169 | class_alias(Exemplar::class, \Google\Api\Distribution_Exemplar::class); |
| 170 | |
| 171 |