PluginProbe
Media Cloud Sync / 1.1.0
Media Cloud Sync v1.1.0
1.4.2 1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 All 36 releases
media-cloud-sync / includes / sdk / google / google / common-protos / src / Api / MetricDescriptor.php

MetricDescriptor.php in Media Cloud Sync 1.1.0, at includes/sdk/google/google/common-protos/src/Api/MetricDescriptor.php

794 lines 35.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 # Generated by the protocol buffer compiler. DO NOT EDIT!
4 # source: google/api/metric.proto
5 namespace Dudlewebs\WPMCS\Google\Api;
6
7 use Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType;
8 use Dudlewebs\WPMCS\Google\Protobuf\Internal\RepeatedField;
9 use Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBUtil;
10 /**
11 * Defines a metric type and its schema. Once a metric descriptor is created,
12 * deleting or altering it stops data collection and makes the metric type's
13 * existing data unusable.
14 *
15 * Generated from protobuf message <code>google.api.MetricDescriptor</code>
16 */
17 class MetricDescriptor extends \Dudlewebs\WPMCS\Google\Protobuf\Internal\Message
18 {
19 /**
20 * The resource name of the metric descriptor.
21 *
22 * Generated from protobuf field <code>string name = 1;</code>
23 */
24 protected $name = '';
25 /**
26 * The metric type, including its DNS name prefix. The type is not
27 * URL-encoded. All user-defined metric types have the DNS name
28 * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
29 * use a natural hierarchical grouping. For example:
30 * "custom.googleapis.com/invoice/paid/amount"
31 * "external.googleapis.com/prometheus/up"
32 * "appengine.googleapis.com/http/server/response_latencies"
33 *
34 * Generated from protobuf field <code>string type = 8;</code>
35 */
36 protected $type = '';
37 /**
38 * The set of labels that can be used to describe a specific
39 * instance of this metric type. For example, the
40 * `appengine.googleapis.com/http/server/response_latencies` metric
41 * type has a label for the HTTP response code, `response_code`, so
42 * you can look at latencies for successful responses or just
43 * for responses that failed.
44 *
45 * Generated from protobuf field <code>repeated .google.api.LabelDescriptor labels = 2;</code>
46 */
47 private $labels;
48 /**
49 * Whether the metric records instantaneous values, changes to a value, etc.
50 * Some combinations of `metric_kind` and `value_type` might not be supported.
51 *
52 * Generated from protobuf field <code>.google.api.MetricDescriptor.MetricKind metric_kind = 3;</code>
53 */
54 protected $metric_kind = 0;
55 /**
56 * Whether the measurement is an integer, a floating-point number, etc.
57 * Some combinations of `metric_kind` and `value_type` might not be supported.
58 *
59 * Generated from protobuf field <code>.google.api.MetricDescriptor.ValueType value_type = 4;</code>
60 */
61 protected $value_type = 0;
62 /**
63 * The units in which the metric value is reported. It is only applicable
64 * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
65 * defines the representation of the stored metric values.
66 * Different systems might scale the values to be more easily displayed (so a
67 * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
68 * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
69 * `kBy`, then the value of the metric is always in thousands of bytes, no
70 * matter how it might be displayed.
71 * If you want a custom metric to record the exact number of CPU-seconds used
72 * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
73 * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
74 * CPU-seconds, then the value is written as `12005`.
75 * Alternatively, if you want a custom metric to record data in a more
76 * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
77 * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
78 * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
79 * The supported units are a subset of [The Unified Code for Units of
80 * Measure](https://unitsofmeasure.org/ucum.html) standard:
81 * **Basic units (UNIT)**
82 * * `bit` bit
83 * * `By` byte
84 * * `s` second
85 * * `min` minute
86 * * `h` hour
87 * * `d` day
88 * * `1` dimensionless
89 * **Prefixes (PREFIX)**
90 * * `k` kilo (10^3)
91 * * `M` mega (10^6)
92 * * `G` giga (10^9)
93 * * `T` tera (10^12)
94 * * `P` peta (10^15)
95 * * `E` exa (10^18)
96 * * `Z` zetta (10^21)
97 * * `Y` yotta (10^24)
98 * * `m` milli (10^-3)
99 * * `u` micro (10^-6)
100 * * `n` nano (10^-9)
101 * * `p` pico (10^-12)
102 * * `f` femto (10^-15)
103 * * `a` atto (10^-18)
104 * * `z` zepto (10^-21)
105 * * `y` yocto (10^-24)
106 * * `Ki` kibi (2^10)
107 * * `Mi` mebi (2^20)
108 * * `Gi` gibi (2^30)
109 * * `Ti` tebi (2^40)
110 * * `Pi` pebi (2^50)
111 * **Grammar**
112 * The grammar also includes these connectors:
113 * * `/` division or ratio (as an infix operator). For examples,
114 * `kBy/{email}` or `MiBy/10ms` (although you should almost never
115 * have `/s` in a metric `unit`; rates should always be computed at
116 * query time from the underlying cumulative or delta value).
117 * * `.` multiplication or composition (as an infix operator). For
118 * examples, `GBy.d` or `k{watt}.h`.
119 * The grammar for a unit is as follows:
120 * Expression = Component { "." Component } { "/" Component } ;
121 * Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
122 * | Annotation
123 * | "1"
124 * ;
125 * Annotation = "{" NAME "}" ;
126 * Notes:
127 * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
128 * is used alone, then the unit is equivalent to `1`. For examples,
129 * `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
130 * * `NAME` is a sequence of non-blank printable ASCII characters not
131 * containing `{` or `}`.
132 * * `1` represents a unitary [dimensionless
133 * unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
134 * as in `1/s`. It is typically used when none of the basic units are
135 * appropriate. For example, "new users per day" can be represented as
136 * `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
137 * users). Alternatively, "thousands of page views per day" would be
138 * represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
139 * value of `5.3` would mean "5300 page views per day").
140 * * `%` represents dimensionless value of 1/100, and annotates values giving
141 * a percentage (so the metric values are typically in the range of 0..100,
142 * and a metric value `3` means "3 percent").
143 * * `10^2.%` indicates a metric contains a ratio, typically in the range
144 * 0..1, that will be multiplied by 100 and displayed as a percentage
145 * (so a metric value `0.03` means "3 percent").
146 *
147 * Generated from protobuf field <code>string unit = 5;</code>
148 */
149 protected $unit = '';
150 /**
151 * A detailed description of the metric, which can be used in documentation.
152 *
153 * Generated from protobuf field <code>string description = 6;</code>
154 */
155 protected $description = '';
156 /**
157 * A concise name for the metric, which can be displayed in user interfaces.
158 * Use sentence case without an ending period, for example "Request count".
159 * This field is optional but it is recommended to be set for any metrics
160 * associated with user-visible concepts, such as Quota.
161 *
162 * Generated from protobuf field <code>string display_name = 7;</code>
163 */
164 protected $display_name = '';
165 /**
166 * Optional. Metadata which can be used to guide usage of the metric.
167 *
168 * Generated from protobuf field <code>.google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10;</code>
169 */
170 protected $metadata = null;
171 /**
172 * Optional. The launch stage of the metric definition.
173 *
174 * Generated from protobuf field <code>.google.api.LaunchStage launch_stage = 12;</code>
175 */
176 protected $launch_stage = 0;
177 /**
178 * Read-only. If present, then a [time
179 * series][google.monitoring.v3.TimeSeries], which is identified partially by
180 * a metric type and a
181 * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
182 * is associated with this metric type can only be associated with one of the
183 * monitored resource types listed here.
184 *
185 * Generated from protobuf field <code>repeated string monitored_resource_types = 13;</code>
186 */
187 private $monitored_resource_types;
188 /**
189 * Constructor.
190 *
191 * @param array $data {
192 * Optional. Data for populating the Message object.
193 *
194 * @type string $name
195 * The resource name of the metric descriptor.
196 * @type string $type
197 * The metric type, including its DNS name prefix. The type is not
198 * URL-encoded. All user-defined metric types have the DNS name
199 * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
200 * use a natural hierarchical grouping. For example:
201 * "custom.googleapis.com/invoice/paid/amount"
202 * "external.googleapis.com/prometheus/up"
203 * "appengine.googleapis.com/http/server/response_latencies"
204 * @type array<\Google\Api\LabelDescriptor>|\Google\Protobuf\Internal\RepeatedField $labels
205 * The set of labels that can be used to describe a specific
206 * instance of this metric type. For example, the
207 * `appengine.googleapis.com/http/server/response_latencies` metric
208 * type has a label for the HTTP response code, `response_code`, so
209 * you can look at latencies for successful responses or just
210 * for responses that failed.
211 * @type int $metric_kind
212 * Whether the metric records instantaneous values, changes to a value, etc.
213 * Some combinations of `metric_kind` and `value_type` might not be supported.
214 * @type int $value_type
215 * Whether the measurement is an integer, a floating-point number, etc.
216 * Some combinations of `metric_kind` and `value_type` might not be supported.
217 * @type string $unit
218 * The units in which the metric value is reported. It is only applicable
219 * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
220 * defines the representation of the stored metric values.
221 * Different systems might scale the values to be more easily displayed (so a
222 * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
223 * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
224 * `kBy`, then the value of the metric is always in thousands of bytes, no
225 * matter how it might be displayed.
226 * If you want a custom metric to record the exact number of CPU-seconds used
227 * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
228 * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
229 * CPU-seconds, then the value is written as `12005`.
230 * Alternatively, if you want a custom metric to record data in a more
231 * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
232 * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
233 * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
234 * The supported units are a subset of [The Unified Code for Units of
235 * Measure](https://unitsofmeasure.org/ucum.html) standard:
236 * **Basic units (UNIT)**
237 * * `bit` bit
238 * * `By` byte
239 * * `s` second
240 * * `min` minute
241 * * `h` hour
242 * * `d` day
243 * * `1` dimensionless
244 * **Prefixes (PREFIX)**
245 * * `k` kilo (10^3)
246 * * `M` mega (10^6)
247 * * `G` giga (10^9)
248 * * `T` tera (10^12)
249 * * `P` peta (10^15)
250 * * `E` exa (10^18)
251 * * `Z` zetta (10^21)
252 * * `Y` yotta (10^24)
253 * * `m` milli (10^-3)
254 * * `u` micro (10^-6)
255 * * `n` nano (10^-9)
256 * * `p` pico (10^-12)
257 * * `f` femto (10^-15)
258 * * `a` atto (10^-18)
259 * * `z` zepto (10^-21)
260 * * `y` yocto (10^-24)
261 * * `Ki` kibi (2^10)
262 * * `Mi` mebi (2^20)
263 * * `Gi` gibi (2^30)
264 * * `Ti` tebi (2^40)
265 * * `Pi` pebi (2^50)
266 * **Grammar**
267 * The grammar also includes these connectors:
268 * * `/` division or ratio (as an infix operator). For examples,
269 * `kBy/{email}` or `MiBy/10ms` (although you should almost never
270 * have `/s` in a metric `unit`; rates should always be computed at
271 * query time from the underlying cumulative or delta value).
272 * * `.` multiplication or composition (as an infix operator). For
273 * examples, `GBy.d` or `k{watt}.h`.
274 * The grammar for a unit is as follows:
275 * Expression = Component { "." Component } { "/" Component } ;
276 * Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
277 * | Annotation
278 * | "1"
279 * ;
280 * Annotation = "{" NAME "}" ;
281 * Notes:
282 * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
283 * is used alone, then the unit is equivalent to `1`. For examples,
284 * `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
285 * * `NAME` is a sequence of non-blank printable ASCII characters not
286 * containing `{` or `}`.
287 * * `1` represents a unitary [dimensionless
288 * unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
289 * as in `1/s`. It is typically used when none of the basic units are
290 * appropriate. For example, "new users per day" can be represented as
291 * `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
292 * users). Alternatively, "thousands of page views per day" would be
293 * represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
294 * value of `5.3` would mean "5300 page views per day").
295 * * `%` represents dimensionless value of 1/100, and annotates values giving
296 * a percentage (so the metric values are typically in the range of 0..100,
297 * and a metric value `3` means "3 percent").
298 * * `10^2.%` indicates a metric contains a ratio, typically in the range
299 * 0..1, that will be multiplied by 100 and displayed as a percentage
300 * (so a metric value `0.03` means "3 percent").
301 * @type string $description
302 * A detailed description of the metric, which can be used in documentation.
303 * @type string $display_name
304 * A concise name for the metric, which can be displayed in user interfaces.
305 * Use sentence case without an ending period, for example "Request count".
306 * This field is optional but it is recommended to be set for any metrics
307 * associated with user-visible concepts, such as Quota.
308 * @type \Google\Api\MetricDescriptor\MetricDescriptorMetadata $metadata
309 * Optional. Metadata which can be used to guide usage of the metric.
310 * @type int $launch_stage
311 * Optional. The launch stage of the metric definition.
312 * @type array<string>|\Google\Protobuf\Internal\RepeatedField $monitored_resource_types
313 * Read-only. If present, then a [time
314 * series][google.monitoring.v3.TimeSeries], which is identified partially by
315 * a metric type and a
316 * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
317 * is associated with this metric type can only be associated with one of the
318 * monitored resource types listed here.
319 * }
320 */
321 public function __construct($data = NULL)
322 {
323 \Dudlewebs\WPMCS\GPBMetadata\Google\Api\Metric::initOnce();
324 parent::__construct($data);
325 }
326 /**
327 * The resource name of the metric descriptor.
328 *
329 * Generated from protobuf field <code>string name = 1;</code>
330 * @return string
331 */
332 public function getName()
333 {
334 return $this->name;
335 }
336 /**
337 * The resource name of the metric descriptor.
338 *
339 * Generated from protobuf field <code>string name = 1;</code>
340 * @param string $var
341 * @return $this
342 */
343 public function setName($var)
344 {
345 GPBUtil::checkString($var, True);
346 $this->name = $var;
347 return $this;
348 }
349 /**
350 * The metric type, including its DNS name prefix. The type is not
351 * URL-encoded. All user-defined metric types have the DNS name
352 * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
353 * use a natural hierarchical grouping. For example:
354 * "custom.googleapis.com/invoice/paid/amount"
355 * "external.googleapis.com/prometheus/up"
356 * "appengine.googleapis.com/http/server/response_latencies"
357 *
358 * Generated from protobuf field <code>string type = 8;</code>
359 * @return string
360 */
361 public function getType()
362 {
363 return $this->type;
364 }
365 /**
366 * The metric type, including its DNS name prefix. The type is not
367 * URL-encoded. All user-defined metric types have the DNS name
368 * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
369 * use a natural hierarchical grouping. For example:
370 * "custom.googleapis.com/invoice/paid/amount"
371 * "external.googleapis.com/prometheus/up"
372 * "appengine.googleapis.com/http/server/response_latencies"
373 *
374 * Generated from protobuf field <code>string type = 8;</code>
375 * @param string $var
376 * @return $this
377 */
378 public function setType($var)
379 {
380 GPBUtil::checkString($var, True);
381 $this->type = $var;
382 return $this;
383 }
384 /**
385 * The set of labels that can be used to describe a specific
386 * instance of this metric type. For example, the
387 * `appengine.googleapis.com/http/server/response_latencies` metric
388 * type has a label for the HTTP response code, `response_code`, so
389 * you can look at latencies for successful responses or just
390 * for responses that failed.
391 *
392 * Generated from protobuf field <code>repeated .google.api.LabelDescriptor labels = 2;</code>
393 * @return \Google\Protobuf\Internal\RepeatedField
394 */
395 public function getLabels()
396 {
397 return $this->labels;
398 }
399 /**
400 * The set of labels that can be used to describe a specific
401 * instance of this metric type. For example, the
402 * `appengine.googleapis.com/http/server/response_latencies` metric
403 * type has a label for the HTTP response code, `response_code`, so
404 * you can look at latencies for successful responses or just
405 * for responses that failed.
406 *
407 * Generated from protobuf field <code>repeated .google.api.LabelDescriptor labels = 2;</code>
408 * @param array<\Google\Api\LabelDescriptor>|\Google\Protobuf\Internal\RepeatedField $var
409 * @return $this
410 */
411 public function setLabels($var)
412 {
413 $arr = GPBUtil::checkRepeatedField($var, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::MESSAGE, \Dudlewebs\WPMCS\Google\Api\LabelDescriptor::class);
414 $this->labels = $arr;
415 return $this;
416 }
417 /**
418 * Whether the metric records instantaneous values, changes to a value, etc.
419 * Some combinations of `metric_kind` and `value_type` might not be supported.
420 *
421 * Generated from protobuf field <code>.google.api.MetricDescriptor.MetricKind metric_kind = 3;</code>
422 * @return int
423 */
424 public function getMetricKind()
425 {
426 return $this->metric_kind;
427 }
428 /**
429 * Whether the metric records instantaneous values, changes to a value, etc.
430 * Some combinations of `metric_kind` and `value_type` might not be supported.
431 *
432 * Generated from protobuf field <code>.google.api.MetricDescriptor.MetricKind metric_kind = 3;</code>
433 * @param int $var
434 * @return $this
435 */
436 public function setMetricKind($var)
437 {
438 GPBUtil::checkEnum($var, \Dudlewebs\WPMCS\Google\Api\MetricDescriptor\MetricKind::class);
439 $this->metric_kind = $var;
440 return $this;
441 }
442 /**
443 * Whether the measurement is an integer, a floating-point number, etc.
444 * Some combinations of `metric_kind` and `value_type` might not be supported.
445 *
446 * Generated from protobuf field <code>.google.api.MetricDescriptor.ValueType value_type = 4;</code>
447 * @return int
448 */
449 public function getValueType()
450 {
451 return $this->value_type;
452 }
453 /**
454 * Whether the measurement is an integer, a floating-point number, etc.
455 * Some combinations of `metric_kind` and `value_type` might not be supported.
456 *
457 * Generated from protobuf field <code>.google.api.MetricDescriptor.ValueType value_type = 4;</code>
458 * @param int $var
459 * @return $this
460 */
461 public function setValueType($var)
462 {
463 GPBUtil::checkEnum($var, \Dudlewebs\WPMCS\Google\Api\MetricDescriptor\ValueType::class);
464 $this->value_type = $var;
465 return $this;
466 }
467 /**
468 * The units in which the metric value is reported. It is only applicable
469 * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
470 * defines the representation of the stored metric values.
471 * Different systems might scale the values to be more easily displayed (so a
472 * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
473 * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
474 * `kBy`, then the value of the metric is always in thousands of bytes, no
475 * matter how it might be displayed.
476 * If you want a custom metric to record the exact number of CPU-seconds used
477 * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
478 * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
479 * CPU-seconds, then the value is written as `12005`.
480 * Alternatively, if you want a custom metric to record data in a more
481 * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
482 * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
483 * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
484 * The supported units are a subset of [The Unified Code for Units of
485 * Measure](https://unitsofmeasure.org/ucum.html) standard:
486 * **Basic units (UNIT)**
487 * * `bit` bit
488 * * `By` byte
489 * * `s` second
490 * * `min` minute
491 * * `h` hour
492 * * `d` day
493 * * `1` dimensionless
494 * **Prefixes (PREFIX)**
495 * * `k` kilo (10^3)
496 * * `M` mega (10^6)
497 * * `G` giga (10^9)
498 * * `T` tera (10^12)
499 * * `P` peta (10^15)
500 * * `E` exa (10^18)
501 * * `Z` zetta (10^21)
502 * * `Y` yotta (10^24)
503 * * `m` milli (10^-3)
504 * * `u` micro (10^-6)
505 * * `n` nano (10^-9)
506 * * `p` pico (10^-12)
507 * * `f` femto (10^-15)
508 * * `a` atto (10^-18)
509 * * `z` zepto (10^-21)
510 * * `y` yocto (10^-24)
511 * * `Ki` kibi (2^10)
512 * * `Mi` mebi (2^20)
513 * * `Gi` gibi (2^30)
514 * * `Ti` tebi (2^40)
515 * * `Pi` pebi (2^50)
516 * **Grammar**
517 * The grammar also includes these connectors:
518 * * `/` division or ratio (as an infix operator). For examples,
519 * `kBy/{email}` or `MiBy/10ms` (although you should almost never
520 * have `/s` in a metric `unit`; rates should always be computed at
521 * query time from the underlying cumulative or delta value).
522 * * `.` multiplication or composition (as an infix operator). For
523 * examples, `GBy.d` or `k{watt}.h`.
524 * The grammar for a unit is as follows:
525 * Expression = Component { "." Component } { "/" Component } ;
526 * Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
527 * | Annotation
528 * | "1"
529 * ;
530 * Annotation = "{" NAME "}" ;
531 * Notes:
532 * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
533 * is used alone, then the unit is equivalent to `1`. For examples,
534 * `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
535 * * `NAME` is a sequence of non-blank printable ASCII characters not
536 * containing `{` or `}`.
537 * * `1` represents a unitary [dimensionless
538 * unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
539 * as in `1/s`. It is typically used when none of the basic units are
540 * appropriate. For example, "new users per day" can be represented as
541 * `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
542 * users). Alternatively, "thousands of page views per day" would be
543 * represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
544 * value of `5.3` would mean "5300 page views per day").
545 * * `%` represents dimensionless value of 1/100, and annotates values giving
546 * a percentage (so the metric values are typically in the range of 0..100,
547 * and a metric value `3` means "3 percent").
548 * * `10^2.%` indicates a metric contains a ratio, typically in the range
549 * 0..1, that will be multiplied by 100 and displayed as a percentage
550 * (so a metric value `0.03` means "3 percent").
551 *
552 * Generated from protobuf field <code>string unit = 5;</code>
553 * @return string
554 */
555 public function getUnit()
556 {
557 return $this->unit;
558 }
559 /**
560 * The units in which the metric value is reported. It is only applicable
561 * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
562 * defines the representation of the stored metric values.
563 * Different systems might scale the values to be more easily displayed (so a
564 * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
565 * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
566 * `kBy`, then the value of the metric is always in thousands of bytes, no
567 * matter how it might be displayed.
568 * If you want a custom metric to record the exact number of CPU-seconds used
569 * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
570 * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
571 * CPU-seconds, then the value is written as `12005`.
572 * Alternatively, if you want a custom metric to record data in a more
573 * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
574 * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
575 * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
576 * The supported units are a subset of [The Unified Code for Units of
577 * Measure](https://unitsofmeasure.org/ucum.html) standard:
578 * **Basic units (UNIT)**
579 * * `bit` bit
580 * * `By` byte
581 * * `s` second
582 * * `min` minute
583 * * `h` hour
584 * * `d` day
585 * * `1` dimensionless
586 * **Prefixes (PREFIX)**
587 * * `k` kilo (10^3)
588 * * `M` mega (10^6)
589 * * `G` giga (10^9)
590 * * `T` tera (10^12)
591 * * `P` peta (10^15)
592 * * `E` exa (10^18)
593 * * `Z` zetta (10^21)
594 * * `Y` yotta (10^24)
595 * * `m` milli (10^-3)
596 * * `u` micro (10^-6)
597 * * `n` nano (10^-9)
598 * * `p` pico (10^-12)
599 * * `f` femto (10^-15)
600 * * `a` atto (10^-18)
601 * * `z` zepto (10^-21)
602 * * `y` yocto (10^-24)
603 * * `Ki` kibi (2^10)
604 * * `Mi` mebi (2^20)
605 * * `Gi` gibi (2^30)
606 * * `Ti` tebi (2^40)
607 * * `Pi` pebi (2^50)
608 * **Grammar**
609 * The grammar also includes these connectors:
610 * * `/` division or ratio (as an infix operator). For examples,
611 * `kBy/{email}` or `MiBy/10ms` (although you should almost never
612 * have `/s` in a metric `unit`; rates should always be computed at
613 * query time from the underlying cumulative or delta value).
614 * * `.` multiplication or composition (as an infix operator). For
615 * examples, `GBy.d` or `k{watt}.h`.
616 * The grammar for a unit is as follows:
617 * Expression = Component { "." Component } { "/" Component } ;
618 * Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
619 * | Annotation
620 * | "1"
621 * ;
622 * Annotation = "{" NAME "}" ;
623 * Notes:
624 * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
625 * is used alone, then the unit is equivalent to `1`. For examples,
626 * `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
627 * * `NAME` is a sequence of non-blank printable ASCII characters not
628 * containing `{` or `}`.
629 * * `1` represents a unitary [dimensionless
630 * unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
631 * as in `1/s`. It is typically used when none of the basic units are
632 * appropriate. For example, "new users per day" can be represented as
633 * `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
634 * users). Alternatively, "thousands of page views per day" would be
635 * represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
636 * value of `5.3` would mean "5300 page views per day").
637 * * `%` represents dimensionless value of 1/100, and annotates values giving
638 * a percentage (so the metric values are typically in the range of 0..100,
639 * and a metric value `3` means "3 percent").
640 * * `10^2.%` indicates a metric contains a ratio, typically in the range
641 * 0..1, that will be multiplied by 100 and displayed as a percentage
642 * (so a metric value `0.03` means "3 percent").
643 *
644 * Generated from protobuf field <code>string unit = 5;</code>
645 * @param string $var
646 * @return $this
647 */
648 public function setUnit($var)
649 {
650 GPBUtil::checkString($var, True);
651 $this->unit = $var;
652 return $this;
653 }
654 /**
655 * A detailed description of the metric, which can be used in documentation.
656 *
657 * Generated from protobuf field <code>string description = 6;</code>
658 * @return string
659 */
660 public function getDescription()
661 {
662 return $this->description;
663 }
664 /**
665 * A detailed description of the metric, which can be used in documentation.
666 *
667 * Generated from protobuf field <code>string description = 6;</code>
668 * @param string $var
669 * @return $this
670 */
671 public function setDescription($var)
672 {
673 GPBUtil::checkString($var, True);
674 $this->description = $var;
675 return $this;
676 }
677 /**
678 * A concise name for the metric, which can be displayed in user interfaces.
679 * Use sentence case without an ending period, for example "Request count".
680 * This field is optional but it is recommended to be set for any metrics
681 * associated with user-visible concepts, such as Quota.
682 *
683 * Generated from protobuf field <code>string display_name = 7;</code>
684 * @return string
685 */
686 public function getDisplayName()
687 {
688 return $this->display_name;
689 }
690 /**
691 * A concise name for the metric, which can be displayed in user interfaces.
692 * Use sentence case without an ending period, for example "Request count".
693 * This field is optional but it is recommended to be set for any metrics
694 * associated with user-visible concepts, such as Quota.
695 *
696 * Generated from protobuf field <code>string display_name = 7;</code>
697 * @param string $var
698 * @return $this
699 */
700 public function setDisplayName($var)
701 {
702 GPBUtil::checkString($var, True);
703 $this->display_name = $var;
704 return $this;
705 }
706 /**
707 * Optional. Metadata which can be used to guide usage of the metric.
708 *
709 * Generated from protobuf field <code>.google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10;</code>
710 * @return \Google\Api\MetricDescriptor\MetricDescriptorMetadata|null
711 */
712 public function getMetadata()
713 {
714 return $this->metadata;
715 }
716 public function hasMetadata()
717 {
718 return isset($this->metadata);
719 }
720 public function clearMetadata()
721 {
722 unset($this->metadata);
723 }
724 /**
725 * Optional. Metadata which can be used to guide usage of the metric.
726 *
727 * Generated from protobuf field <code>.google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10;</code>
728 * @param \Google\Api\MetricDescriptor\MetricDescriptorMetadata $var
729 * @return $this
730 */
731 public function setMetadata($var)
732 {
733 GPBUtil::checkMessage($var, \Dudlewebs\WPMCS\Google\Api\MetricDescriptor\MetricDescriptorMetadata::class);
734 $this->metadata = $var;
735 return $this;
736 }
737 /**
738 * Optional. The launch stage of the metric definition.
739 *
740 * Generated from protobuf field <code>.google.api.LaunchStage launch_stage = 12;</code>
741 * @return int
742 */
743 public function getLaunchStage()
744 {
745 return $this->launch_stage;
746 }
747 /**
748 * Optional. The launch stage of the metric definition.
749 *
750 * Generated from protobuf field <code>.google.api.LaunchStage launch_stage = 12;</code>
751 * @param int $var
752 * @return $this
753 */
754 public function setLaunchStage($var)
755 {
756 GPBUtil::checkEnum($var, \Dudlewebs\WPMCS\Google\Api\LaunchStage::class);
757 $this->launch_stage = $var;
758 return $this;
759 }
760 /**
761 * Read-only. If present, then a [time
762 * series][google.monitoring.v3.TimeSeries], which is identified partially by
763 * a metric type and a
764 * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
765 * is associated with this metric type can only be associated with one of the
766 * monitored resource types listed here.
767 *
768 * Generated from protobuf field <code>repeated string monitored_resource_types = 13;</code>
769 * @return \Google\Protobuf\Internal\RepeatedField
770 */
771 public function getMonitoredResourceTypes()
772 {
773 return $this->monitored_resource_types;
774 }
775 /**
776 * Read-only. If present, then a [time
777 * series][google.monitoring.v3.TimeSeries], which is identified partially by
778 * a metric type and a
779 * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
780 * is associated with this metric type can only be associated with one of the
781 * monitored resource types listed here.
782 *
783 * Generated from protobuf field <code>repeated string monitored_resource_types = 13;</code>
784 * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
785 * @return $this
786 */
787 public function setMonitoredResourceTypes($var)
788 {
789 $arr = GPBUtil::checkRepeatedField($var, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::STRING);
790 $this->monitored_resource_types = $arr;
791 return $this;
792 }
793 }
794