summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span.php
blob: 4b1dc138cf1d3e1f88a014432ffce82f366f1765 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: opentelemetry/proto/trace/v1/trace.proto

namespace Opentelemetry\Proto\Trace\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * A Span represents a single operation performed by a single component of the system.
 * The next available field id is 17.
 *
 * Generated from protobuf message <code>opentelemetry.proto.trace.v1.Span</code>
 */
class Span extends \Google\Protobuf\Internal\Message
{
    /**
     * A unique identifier for a trace. All spans from the same trace share
     * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
     * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
     * is zero-length and thus is also invalid).
     * This field is required.
     *
     * Generated from protobuf field <code>bytes trace_id = 1;</code>
     */
    protected $trace_id = '';
    /**
     * A unique identifier for a span within a trace, assigned when the span
     * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
     * other than 8 bytes is considered invalid (empty string in OTLP/JSON
     * is zero-length and thus is also invalid).
     * This field is required.
     *
     * Generated from protobuf field <code>bytes span_id = 2;</code>
     */
    protected $span_id = '';
    /**
     * trace_state conveys information about request position in multiple distributed tracing graphs.
     * It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
     * See also https://github.com/w3c/distributed-tracing for more details about this field.
     *
     * Generated from protobuf field <code>string trace_state = 3;</code>
     */
    protected $trace_state = '';
    /**
     * The `span_id` of this span's parent span. If this is a root span, then this
     * field must be empty. The ID is an 8-byte array.
     *
     * Generated from protobuf field <code>bytes parent_span_id = 4;</code>
     */
    protected $parent_span_id = '';
    /**
     * A description of the span's operation.
     * For example, the name can be a qualified method name or a file name
     * and a line number where the operation is called. A best practice is to use
     * the same display name at the same call point in an application.
     * This makes it easier to correlate spans in different traces.
     * This field is semantically required to be set to non-empty string.
     * Empty value is equivalent to an unknown span name.
     * This field is required.
     *
     * Generated from protobuf field <code>string name = 5;</code>
     */
    protected $name = '';
    /**
     * Distinguishes between spans generated in a particular context. For example,
     * two spans with the same name may be distinguished using `CLIENT` (caller)
     * and `SERVER` (callee) to identify queueing latency associated with the span.
     *
     * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Span.SpanKind kind = 6;</code>
     */
    protected $kind = 0;
    /**
     * start_time_unix_nano is the start time of the span. On the client side, this is the time
     * kept by the local machine where the span execution starts. On the server side, this
     * is the time when the server's application handler starts running.
     * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
     * This field is semantically required and it is expected that end_time >= start_time.
     *
     * Generated from protobuf field <code>fixed64 start_time_unix_nano = 7;</code>
     */
    protected $start_time_unix_nano = 0;
    /**
     * end_time_unix_nano is the end time of the span. On the client side, this is the time
     * kept by the local machine where the span execution ends. On the server side, this
     * is the time when the server application handler stops running.
     * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
     * This field is semantically required and it is expected that end_time >= start_time.
     *
     * Generated from protobuf field <code>fixed64 end_time_unix_nano = 8;</code>
     */
    protected $end_time_unix_nano = 0;
    /**
     * attributes is a collection of key/value pairs. Note, global attributes
     * like server name can be set using the resource API. Examples of attributes:
     *     "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
     *     "/http/server_latency": 300
     *     "example.com/myattribute": true
     *     "example.com/score": 10.239
     * The OpenTelemetry API specification further restricts the allowed value types:
     * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
     * Attribute keys MUST be unique (it is not allowed to have more than one
     * attribute with the same key).
     *
     * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9;</code>
     */
    private $attributes;
    /**
     * dropped_attributes_count is the number of attributes that were discarded. Attributes
     * can be discarded because their keys are too long or because there are too many
     * attributes. If this value is 0, then no attributes were dropped.
     *
     * Generated from protobuf field <code>uint32 dropped_attributes_count = 10;</code>
     */
    protected $dropped_attributes_count = 0;
    /**
     * events is a collection of Event items.
     *
     * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Event events = 11;</code>
     */
    private $events;
    /**
     * dropped_events_count is the number of dropped events. If the value is 0, then no
     * events were dropped.
     *
     * Generated from protobuf field <code>uint32 dropped_events_count = 12;</code>
     */
    protected $dropped_events_count = 0;
    /**
     * links is a collection of Links, which are references from this span to a span
     * in the same or different trace.
     *
     * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Link links = 13;</code>
     */
    private $links;
    /**
     * dropped_links_count is the number of dropped links after the maximum size was
     * enforced. If this value is 0, then no links were dropped.
     *
     * Generated from protobuf field <code>uint32 dropped_links_count = 14;</code>
     */
    protected $dropped_links_count = 0;
    /**
     * An optional final status for this span. Semantically when Status isn't set, it means
     * span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).
     *
     * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Status status = 15;</code>
     */
    protected $status = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $trace_id
     *           A unique identifier for a trace. All spans from the same trace share
     *           the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
     *           of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
     *           is zero-length and thus is also invalid).
     *           This field is required.
     *     @type string $span_id
     *           A unique identifier for a span within a trace, assigned when the span
     *           is created. The ID is an 8-byte array. An ID with all zeroes OR of length
     *           other than 8 bytes is considered invalid (empty string in OTLP/JSON
     *           is zero-length and thus is also invalid).
     *           This field is required.
     *     @type string $trace_state
     *           trace_state conveys information about request position in multiple distributed tracing graphs.
     *           It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
     *           See also https://github.com/w3c/distributed-tracing for more details about this field.
     *     @type string $parent_span_id
     *           The `span_id` of this span's parent span. If this is a root span, then this
     *           field must be empty. The ID is an 8-byte array.
     *     @type string $name
     *           A description of the span's operation.
     *           For example, the name can be a qualified method name or a file name
     *           and a line number where the operation is called. A best practice is to use
     *           the same display name at the same call point in an application.
     *           This makes it easier to correlate spans in different traces.
     *           This field is semantically required to be set to non-empty string.
     *           Empty value is equivalent to an unknown span name.
     *           This field is required.
     *     @type int $kind
     *           Distinguishes between spans generated in a particular context. For example,
     *           two spans with the same name may be distinguished using `CLIENT` (caller)
     *           and `SERVER` (callee) to identify queueing latency associated with the span.
     *     @type int|string $start_time_unix_nano
     *           start_time_unix_nano is the start time of the span. On the client side, this is the time
     *           kept by the local machine where the span execution starts. On the server side, this
     *           is the time when the server's application handler starts running.
     *           Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
     *           This field is semantically required and it is expected that end_time >= start_time.
     *     @type int|string $end_time_unix_nano
     *           end_time_unix_nano is the end time of the span. On the client side, this is the time
     *           kept by the local machine where the span execution ends. On the server side, this
     *           is the time when the server application handler stops running.
     *           Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
     *           This field is semantically required and it is expected that end_time >= start_time.
     *     @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
     *           attributes is a collection of key/value pairs. Note, global attributes
     *           like server name can be set using the resource API. Examples of attributes:
     *               "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
     *               "/http/server_latency": 300
     *               "example.com/myattribute": true
     *               "example.com/score": 10.239
     *           The OpenTelemetry API specification further restricts the allowed value types:
     *           https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
     *           Attribute keys MUST be unique (it is not allowed to have more than one
     *           attribute with the same key).
     *     @type int $dropped_attributes_count
     *           dropped_attributes_count is the number of attributes that were discarded. Attributes
     *           can be discarded because their keys are too long or because there are too many
     *           attributes. If this value is 0, then no attributes were dropped.
     *     @type \Opentelemetry\Proto\Trace\V1\Span\Event[]|\Google\Protobuf\Internal\RepeatedField $events
     *           events is a collection of Event items.
     *     @type int $dropped_events_count
     *           dropped_events_count is the number of dropped events. If the value is 0, then no
     *           events were dropped.
     *     @type \Opentelemetry\Proto\Trace\V1\Span\Link[]|\Google\Protobuf\Internal\RepeatedField $links
     *           links is a collection of Links, which are references from this span to a span
     *           in the same or different trace.
     *     @type int $dropped_links_count
     *           dropped_links_count is the number of dropped links after the maximum size was
     *           enforced. If this value is 0, then no links were dropped.
     *     @type \Opentelemetry\Proto\Trace\V1\Status $status
     *           An optional final status for this span. Semantically when Status isn't set, it means
     *           span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
        parent::__construct($data);
    }

    /**
     * A unique identifier for a trace. All spans from the same trace share
     * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
     * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
     * is zero-length and thus is also invalid).
     * This field is required.
     *
     * Generated from protobuf field <code>bytes trace_id = 1;</code>
     * @return string
     */
    public function getTraceId()
    {
        return $this->trace_id;
    }

    /**
     * A unique identifier for a trace. All spans from the same trace share
     * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
     * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
     * is zero-length and thus is also invalid).
     * This field is required.
     *
     * Generated from protobuf field <code>bytes trace_id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setTraceId($var)
    {
        GPBUtil::checkString($var, False);
        $this->trace_id = $var;

        return $this;
    }

    /**
     * A unique identifier for a span within a trace, assigned when the span
     * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
     * other than 8 bytes is considered invalid (empty string in OTLP/JSON
     * is zero-length and thus is also invalid).
     * This field is required.
     *
     * Generated from protobuf field <code>bytes span_id = 2;</code>
     * @return string
     */
    public function getSpanId()
    {
        return $this->span_id;
    }

    /**
     * A unique identifier for a span within a trace, assigned when the span
     * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
     * other than 8 bytes is considered invalid (empty string in OTLP/JSON
     * is zero-length and thus is also invalid).
     * This field is required.
     *
     * Generated from protobuf field <code>bytes span_id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setSpanId($var)
    {
        GPBUtil::checkString($var, False);
        $this->span_id = $var;

        return $this;
    }

    /**
     * trace_state conveys information about request position in multiple distributed tracing graphs.
     * It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
     * See also https://github.com/w3c/distributed-tracing for more details about this field.
     *
     * Generated from protobuf field <code>string trace_state = 3;</code>
     * @return string
     */
    public function getTraceState()
    {
        return $this->trace_state;
    }

    /**
     * trace_state conveys information about request position in multiple distributed tracing graphs.
     * It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
     * See also https://github.com/w3c/distributed-tracing for more details about this field.
     *
     * Generated from protobuf field <code>string trace_state = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setTraceState($var)
    {
        GPBUtil::checkString($var, True);
        $this->trace_state = $var;

        return $this;
    }

    /**
     * The `span_id` of this span's parent span. If this is a root span, then this
     * field must be empty. The ID is an 8-byte array.
     *
     * Generated from protobuf field <code>bytes parent_span_id = 4;</code>
     * @return string
     */
    public function getParentSpanId()
    {
        return $this->parent_span_id;
    }

    /**
     * The `span_id` of this span's parent span. If this is a root span, then this
     * field must be empty. The ID is an 8-byte array.
     *
     * Generated from protobuf field <code>bytes parent_span_id = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setParentSpanId($var)
    {
        GPBUtil::checkString($var, False);
        $this->parent_span_id = $var;

        return $this;
    }

    /**
     * A description of the span's operation.
     * For example, the name can be a qualified method name or a file name
     * and a line number where the operation is called. A best practice is to use
     * the same display name at the same call point in an application.
     * This makes it easier to correlate spans in different traces.
     * This field is semantically required to be set to non-empty string.
     * Empty value is equivalent to an unknown span name.
     * This field is required.
     *
     * Generated from protobuf field <code>string name = 5;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * A description of the span's operation.
     * For example, the name can be a qualified method name or a file name
     * and a line number where the operation is called. A best practice is to use
     * the same display name at the same call point in an application.
     * This makes it easier to correlate spans in different traces.
     * This field is semantically required to be set to non-empty string.
     * Empty value is equivalent to an unknown span name.
     * This field is required.
     *
     * Generated from protobuf field <code>string name = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Distinguishes between spans generated in a particular context. For example,
     * two spans with the same name may be distinguished using `CLIENT` (caller)
     * and `SERVER` (callee) to identify queueing latency associated with the span.
     *
     * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Span.SpanKind kind = 6;</code>
     * @return int
     */
    public function getKind()
    {
        return $this->kind;
    }

    /**
     * Distinguishes between spans generated in a particular context. For example,
     * two spans with the same name may be distinguished using `CLIENT` (caller)
     * and `SERVER` (callee) to identify queueing latency associated with the span.
     *
     * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Span.SpanKind kind = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setKind($var)
    {
        GPBUtil::checkEnum($var, \Opentelemetry\Proto\Trace\V1\Span\SpanKind::class);
        $this->kind = $var;

        return $this;
    }

    /**
     * start_time_unix_nano is the start time of the span. On the client side, this is the time
     * kept by the local machine where the span execution starts. On the server side, this
     * is the time when the server's application handler starts running.
     * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
     * This field is semantically required and it is expected that end_time >= start_time.
     *
     * Generated from protobuf field <code>fixed64 start_time_unix_nano = 7;</code>
     * @return int|string
     */
    public function getStartTimeUnixNano()
    {
        return $this->start_time_unix_nano;
    }

    /**
     * start_time_unix_nano is the start time of the span. On the client side, this is the time
     * kept by the local machine where the span execution starts. On the server side, this
     * is the time when the server's application handler starts running.
     * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
     * This field is semantically required and it is expected that end_time >= start_time.
     *
     * Generated from protobuf field <code>fixed64 start_time_unix_nano = 7;</code>
     * @param int|string $var
     * @return $this
     */
    public function setStartTimeUnixNano($var)
    {
        GPBUtil::checkUint64($var);
        $this->start_time_unix_nano = $var;

        return $this;
    }

    /**
     * end_time_unix_nano is the end time of the span. On the client side, this is the time
     * kept by the local machine where the span execution ends. On the server side, this
     * is the time when the server application handler stops running.
     * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
     * This field is semantically required and it is expected that end_time >= start_time.
     *
     * Generated from protobuf field <code>fixed64 end_time_unix_nano = 8;</code>
     * @return int|string
     */
    public function getEndTimeUnixNano()
    {
        return $this->end_time_unix_nano;
    }

    /**
     * end_time_unix_nano is the end time of the span. On the client side, this is the time
     * kept by the local machine where the span execution ends. On the server side, this
     * is the time when the server application handler stops running.
     * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
     * This field is semantically required and it is expected that end_time >= start_time.
     *
     * Generated from protobuf field <code>fixed64 end_time_unix_nano = 8;</code>
     * @param int|string $var
     * @return $this
     */
    public function setEndTimeUnixNano($var)
    {
        GPBUtil::checkUint64($var);
        $this->end_time_unix_nano = $var;

        return $this;
    }

    /**
     * attributes is a collection of key/value pairs. Note, global attributes
     * like server name can be set using the resource API. Examples of attributes:
     *     "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
     *     "/http/server_latency": 300
     *     "example.com/myattribute": true
     *     "example.com/score": 10.239
     * The OpenTelemetry API specification further restricts the allowed value types:
     * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
     * Attribute keys MUST be unique (it is not allowed to have more than one
     * attribute with the same key).
     *
     * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAttributes()
    {
        return $this->attributes;
    }

    /**
     * attributes is a collection of key/value pairs. Note, global attributes
     * like server name can be set using the resource API. Examples of attributes:
     *     "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
     *     "/http/server_latency": 300
     *     "example.com/myattribute": true
     *     "example.com/score": 10.239
     * The OpenTelemetry API specification further restricts the allowed value types:
     * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
     * Attribute keys MUST be unique (it is not allowed to have more than one
     * attribute with the same key).
     *
     * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9;</code>
     * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAttributes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
        $this->attributes = $arr;

        return $this;
    }

    /**
     * dropped_attributes_count is the number of attributes that were discarded. Attributes
     * can be discarded because their keys are too long or because there are too many
     * attributes. If this value is 0, then no attributes were dropped.
     *
     * Generated from protobuf field <code>uint32 dropped_attributes_count = 10;</code>
     * @return int
     */
    public function getDroppedAttributesCount()
    {
        return $this->dropped_attributes_count;
    }

    /**
     * dropped_attributes_count is the number of attributes that were discarded. Attributes
     * can be discarded because their keys are too long or because there are too many
     * attributes. If this value is 0, then no attributes were dropped.
     *
     * Generated from protobuf field <code>uint32 dropped_attributes_count = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setDroppedAttributesCount($var)
    {
        GPBUtil::checkUint32($var);
        $this->dropped_attributes_count = $var;

        return $this;
    }

    /**
     * events is a collection of Event items.
     *
     * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Event events = 11;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getEvents()
    {
        return $this->events;
    }

    /**
     * events is a collection of Event items.
     *
     * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Event events = 11;</code>
     * @param \Opentelemetry\Proto\Trace\V1\Span\Event[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setEvents($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Trace\V1\Span\Event::class);
        $this->events = $arr;

        return $this;
    }

    /**
     * dropped_events_count is the number of dropped events. If the value is 0, then no
     * events were dropped.
     *
     * Generated from protobuf field <code>uint32 dropped_events_count = 12;</code>
     * @return int
     */
    public function getDroppedEventsCount()
    {
        return $this->dropped_events_count;
    }

    /**
     * dropped_events_count is the number of dropped events. If the value is 0, then no
     * events were dropped.
     *
     * Generated from protobuf field <code>uint32 dropped_events_count = 12;</code>
     * @param int $var
     * @return $this
     */
    public function setDroppedEventsCount($var)
    {
        GPBUtil::checkUint32($var);
        $this->dropped_events_count = $var;

        return $this;
    }

    /**
     * links is a collection of Links, which are references from this span to a span
     * in the same or different trace.
     *
     * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Link links = 13;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLinks()
    {
        return $this->links;
    }

    /**
     * links is a collection of Links, which are references from this span to a span
     * in the same or different trace.
     *
     * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Link links = 13;</code>
     * @param \Opentelemetry\Proto\Trace\V1\Span\Link[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLinks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Trace\V1\Span\Link::class);
        $this->links = $arr;

        return $this;
    }

    /**
     * dropped_links_count is the number of dropped links after the maximum size was
     * enforced. If this value is 0, then no links were dropped.
     *
     * Generated from protobuf field <code>uint32 dropped_links_count = 14;</code>
     * @return int
     */
    public function getDroppedLinksCount()
    {
        return $this->dropped_links_count;
    }

    /**
     * dropped_links_count is the number of dropped links after the maximum size was
     * enforced. If this value is 0, then no links were dropped.
     *
     * Generated from protobuf field <code>uint32 dropped_links_count = 14;</code>
     * @param int $var
     * @return $this
     */
    public function setDroppedLinksCount($var)
    {
        GPBUtil::checkUint32($var);
        $this->dropped_links_count = $var;

        return $this;
    }

    /**
     * An optional final status for this span. Semantically when Status isn't set, it means
     * span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).
     *
     * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Status status = 15;</code>
     * @return \Opentelemetry\Proto\Trace\V1\Status|null
     */
    public function getStatus()
    {
        return $this->status;
    }

    public function hasStatus()
    {
        return isset($this->status);
    }

    public function clearStatus()
    {
        unset($this->status);
    }

    /**
     * An optional final status for this span. Semantically when Status isn't set, it means
     * span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).
     *
     * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Status status = 15;</code>
     * @param \Opentelemetry\Proto\Trace\V1\Status $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkMessage($var, \Opentelemetry\Proto\Trace\V1\Status::class);
        $this->status = $var;

        return $this;
    }

}