summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceConfig.php
blob: 9fb54df9bb113081a4f4805445f1149a82b46e32 (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
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: opentelemetry/proto/trace/v1/trace_config.proto

namespace Opentelemetry\Proto\Trace\V1;

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

/**
 * Global configuration of the trace service. All fields must be specified, or
 * the default (zero) values will be used for each type.
 *
 * Generated from protobuf message <code>opentelemetry.proto.trace.v1.TraceConfig</code>
 */
class TraceConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * The global default max number of attributes per span.
     *
     * Generated from protobuf field <code>int64 max_number_of_attributes = 4;</code>
     */
    protected $max_number_of_attributes = 0;
    /**
     * The global default max number of annotation events per span.
     *
     * Generated from protobuf field <code>int64 max_number_of_timed_events = 5;</code>
     */
    protected $max_number_of_timed_events = 0;
    /**
     * The global default max number of attributes per timed event.
     *
     * Generated from protobuf field <code>int64 max_number_of_attributes_per_timed_event = 6;</code>
     */
    protected $max_number_of_attributes_per_timed_event = 0;
    /**
     * The global default max number of link entries per span.
     *
     * Generated from protobuf field <code>int64 max_number_of_links = 7;</code>
     */
    protected $max_number_of_links = 0;
    /**
     * The global default max number of attributes per span.
     *
     * Generated from protobuf field <code>int64 max_number_of_attributes_per_link = 8;</code>
     */
    protected $max_number_of_attributes_per_link = 0;
    protected $sampler;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Opentelemetry\Proto\Trace\V1\ConstantSampler $constant_sampler
     *     @type \Opentelemetry\Proto\Trace\V1\TraceIdRatioBased $trace_id_ratio_based
     *     @type \Opentelemetry\Proto\Trace\V1\RateLimitingSampler $rate_limiting_sampler
     *     @type int|string $max_number_of_attributes
     *           The global default max number of attributes per span.
     *     @type int|string $max_number_of_timed_events
     *           The global default max number of annotation events per span.
     *     @type int|string $max_number_of_attributes_per_timed_event
     *           The global default max number of attributes per timed event.
     *     @type int|string $max_number_of_links
     *           The global default max number of link entries per span.
     *     @type int|string $max_number_of_attributes_per_link
     *           The global default max number of attributes per span.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Opentelemetry\Proto\Trace\V1\TraceConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.ConstantSampler constant_sampler = 1;</code>
     * @return \Opentelemetry\Proto\Trace\V1\ConstantSampler|null
     */
    public function getConstantSampler()
    {
        return $this->readOneof(1);
    }

    public function hasConstantSampler()
    {
        return $this->hasOneof(1);
    }

    /**
     * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.ConstantSampler constant_sampler = 1;</code>
     * @param \Opentelemetry\Proto\Trace\V1\ConstantSampler $var
     * @return $this
     */
    public function setConstantSampler($var)
    {
        GPBUtil::checkMessage($var, \Opentelemetry\Proto\Trace\V1\ConstantSampler::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.TraceIdRatioBased trace_id_ratio_based = 2;</code>
     * @return \Opentelemetry\Proto\Trace\V1\TraceIdRatioBased|null
     */
    public function getTraceIdRatioBased()
    {
        return $this->readOneof(2);
    }

    public function hasTraceIdRatioBased()
    {
        return $this->hasOneof(2);
    }

    /**
     * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.TraceIdRatioBased trace_id_ratio_based = 2;</code>
     * @param \Opentelemetry\Proto\Trace\V1\TraceIdRatioBased $var
     * @return $this
     */
    public function setTraceIdRatioBased($var)
    {
        GPBUtil::checkMessage($var, \Opentelemetry\Proto\Trace\V1\TraceIdRatioBased::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3;</code>
     * @return \Opentelemetry\Proto\Trace\V1\RateLimitingSampler|null
     */
    public function getRateLimitingSampler()
    {
        return $this->readOneof(3);
    }

    public function hasRateLimitingSampler()
    {
        return $this->hasOneof(3);
    }

    /**
     * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3;</code>
     * @param \Opentelemetry\Proto\Trace\V1\RateLimitingSampler $var
     * @return $this
     */
    public function setRateLimitingSampler($var)
    {
        GPBUtil::checkMessage($var, \Opentelemetry\Proto\Trace\V1\RateLimitingSampler::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * The global default max number of attributes per span.
     *
     * Generated from protobuf field <code>int64 max_number_of_attributes = 4;</code>
     * @return int|string
     */
    public function getMaxNumberOfAttributes()
    {
        return $this->max_number_of_attributes;
    }

    /**
     * The global default max number of attributes per span.
     *
     * Generated from protobuf field <code>int64 max_number_of_attributes = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setMaxNumberOfAttributes($var)
    {
        GPBUtil::checkInt64($var);
        $this->max_number_of_attributes = $var;

        return $this;
    }

    /**
     * The global default max number of annotation events per span.
     *
     * Generated from protobuf field <code>int64 max_number_of_timed_events = 5;</code>
     * @return int|string
     */
    public function getMaxNumberOfTimedEvents()
    {
        return $this->max_number_of_timed_events;
    }

    /**
     * The global default max number of annotation events per span.
     *
     * Generated from protobuf field <code>int64 max_number_of_timed_events = 5;</code>
     * @param int|string $var
     * @return $this
     */
    public function setMaxNumberOfTimedEvents($var)
    {
        GPBUtil::checkInt64($var);
        $this->max_number_of_timed_events = $var;

        return $this;
    }

    /**
     * The global default max number of attributes per timed event.
     *
     * Generated from protobuf field <code>int64 max_number_of_attributes_per_timed_event = 6;</code>
     * @return int|string
     */
    public function getMaxNumberOfAttributesPerTimedEvent()
    {
        return $this->max_number_of_attributes_per_timed_event;
    }

    /**
     * The global default max number of attributes per timed event.
     *
     * Generated from protobuf field <code>int64 max_number_of_attributes_per_timed_event = 6;</code>
     * @param int|string $var
     * @return $this
     */
    public function setMaxNumberOfAttributesPerTimedEvent($var)
    {
        GPBUtil::checkInt64($var);
        $this->max_number_of_attributes_per_timed_event = $var;

        return $this;
    }

    /**
     * The global default max number of link entries per span.
     *
     * Generated from protobuf field <code>int64 max_number_of_links = 7;</code>
     * @return int|string
     */
    public function getMaxNumberOfLinks()
    {
        return $this->max_number_of_links;
    }

    /**
     * The global default max number of link entries per span.
     *
     * Generated from protobuf field <code>int64 max_number_of_links = 7;</code>
     * @param int|string $var
     * @return $this
     */
    public function setMaxNumberOfLinks($var)
    {
        GPBUtil::checkInt64($var);
        $this->max_number_of_links = $var;

        return $this;
    }

    /**
     * The global default max number of attributes per span.
     *
     * Generated from protobuf field <code>int64 max_number_of_attributes_per_link = 8;</code>
     * @return int|string
     */
    public function getMaxNumberOfAttributesPerLink()
    {
        return $this->max_number_of_attributes_per_link;
    }

    /**
     * The global default max number of attributes per span.
     *
     * Generated from protobuf field <code>int64 max_number_of_attributes_per_link = 8;</code>
     * @param int|string $var
     * @return $this
     */
    public function setMaxNumberOfAttributesPerLink($var)
    {
        GPBUtil::checkInt64($var);
        $this->max_number_of_attributes_per_link = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getSampler()
    {
        return $this->whichOneof("sampler");
    }

}