-
Notifications
You must be signed in to change notification settings - Fork 4
/
oas_schemas_gen.go
1309 lines (1106 loc) · 32.5 KB
/
oas_schemas_gen.go
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
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by ogen, DO NOT EDIT.
package pyroscopeapi
import (
"fmt"
"io"
"github.com/go-faster/errors"
)
func (s *ErrorStatusCode) Error() string {
return fmt.Sprintf("code %d: %+v", s.StatusCode, s.Response)
}
// Ref: #/components/schemas/ApplicationMetadata
type ApplicationMetadata struct {
Name OptString `json:"name"`
SpyName OptString `json:"spyName"`
SampleRate OptUint32 `json:"sampleRate"`
Units OptApplicationMetadataUnits `json:"units"`
}
// GetName returns the value of Name.
func (s *ApplicationMetadata) GetName() OptString {
return s.Name
}
// GetSpyName returns the value of SpyName.
func (s *ApplicationMetadata) GetSpyName() OptString {
return s.SpyName
}
// GetSampleRate returns the value of SampleRate.
func (s *ApplicationMetadata) GetSampleRate() OptUint32 {
return s.SampleRate
}
// GetUnits returns the value of Units.
func (s *ApplicationMetadata) GetUnits() OptApplicationMetadataUnits {
return s.Units
}
// SetName sets the value of Name.
func (s *ApplicationMetadata) SetName(val OptString) {
s.Name = val
}
// SetSpyName sets the value of SpyName.
func (s *ApplicationMetadata) SetSpyName(val OptString) {
s.SpyName = val
}
// SetSampleRate sets the value of SampleRate.
func (s *ApplicationMetadata) SetSampleRate(val OptUint32) {
s.SampleRate = val
}
// SetUnits sets the value of Units.
func (s *ApplicationMetadata) SetUnits(val OptApplicationMetadataUnits) {
s.Units = val
}
type ApplicationMetadataUnits string
const (
ApplicationMetadataUnitsSamples ApplicationMetadataUnits = "samples"
ApplicationMetadataUnitsObjects ApplicationMetadataUnits = "objects"
ApplicationMetadataUnitsGoroutines ApplicationMetadataUnits = "goroutines"
ApplicationMetadataUnitsBytes ApplicationMetadataUnits = "bytes"
ApplicationMetadataUnitsLockNanoseconds ApplicationMetadataUnits = "lock_nanoseconds"
ApplicationMetadataUnitsLockSamples ApplicationMetadataUnits = "lock_samples"
)
// MarshalText implements encoding.TextMarshaler.
func (s ApplicationMetadataUnits) MarshalText() ([]byte, error) {
switch s {
case ApplicationMetadataUnitsSamples:
return []byte(s), nil
case ApplicationMetadataUnitsObjects:
return []byte(s), nil
case ApplicationMetadataUnitsGoroutines:
return []byte(s), nil
case ApplicationMetadataUnitsBytes:
return []byte(s), nil
case ApplicationMetadataUnitsLockNanoseconds:
return []byte(s), nil
case ApplicationMetadataUnitsLockSamples:
return []byte(s), nil
default:
return nil, errors.Errorf("invalid value: %q", s)
}
}
// UnmarshalText implements encoding.TextUnmarshaler.
func (s *ApplicationMetadataUnits) UnmarshalText(data []byte) error {
switch ApplicationMetadataUnits(data) {
case ApplicationMetadataUnitsSamples:
*s = ApplicationMetadataUnitsSamples
return nil
case ApplicationMetadataUnitsObjects:
*s = ApplicationMetadataUnitsObjects
return nil
case ApplicationMetadataUnitsGoroutines:
*s = ApplicationMetadataUnitsGoroutines
return nil
case ApplicationMetadataUnitsBytes:
*s = ApplicationMetadataUnitsBytes
return nil
case ApplicationMetadataUnitsLockNanoseconds:
*s = ApplicationMetadataUnitsLockNanoseconds
return nil
case ApplicationMetadataUnitsLockSamples:
*s = ApplicationMetadataUnitsLockSamples
return nil
default:
return errors.Errorf("invalid value: %q", data)
}
}
type AtTime string
type Error string
// ErrorStatusCode wraps Error with StatusCode.
type ErrorStatusCode struct {
StatusCode int
Response Error
}
// GetStatusCode returns the value of StatusCode.
func (s *ErrorStatusCode) GetStatusCode() int {
return s.StatusCode
}
// GetResponse returns the value of Response.
func (s *ErrorStatusCode) GetResponse() Error {
return s.Response
}
// SetStatusCode sets the value of StatusCode.
func (s *ErrorStatusCode) SetStatusCode(val int) {
s.StatusCode = val
}
// SetResponse sets the value of Response.
func (s *ErrorStatusCode) SetResponse(val Error) {
s.Response = val
}
// Ref: #/components/schemas/FlamebearerMetadataV1
type FlamebearerMetadataV1 struct {
Name OptString `json:"name"`
SpyName OptString `json:"spyName"`
SampleRate OptUint32 `json:"sampleRate"`
Units OptFlamebearerMetadataV1Units `json:"units"`
Format string `json:"format"`
}
// GetName returns the value of Name.
func (s *FlamebearerMetadataV1) GetName() OptString {
return s.Name
}
// GetSpyName returns the value of SpyName.
func (s *FlamebearerMetadataV1) GetSpyName() OptString {
return s.SpyName
}
// GetSampleRate returns the value of SampleRate.
func (s *FlamebearerMetadataV1) GetSampleRate() OptUint32 {
return s.SampleRate
}
// GetUnits returns the value of Units.
func (s *FlamebearerMetadataV1) GetUnits() OptFlamebearerMetadataV1Units {
return s.Units
}
// GetFormat returns the value of Format.
func (s *FlamebearerMetadataV1) GetFormat() string {
return s.Format
}
// SetName sets the value of Name.
func (s *FlamebearerMetadataV1) SetName(val OptString) {
s.Name = val
}
// SetSpyName sets the value of SpyName.
func (s *FlamebearerMetadataV1) SetSpyName(val OptString) {
s.SpyName = val
}
// SetSampleRate sets the value of SampleRate.
func (s *FlamebearerMetadataV1) SetSampleRate(val OptUint32) {
s.SampleRate = val
}
// SetUnits sets the value of Units.
func (s *FlamebearerMetadataV1) SetUnits(val OptFlamebearerMetadataV1Units) {
s.Units = val
}
// SetFormat sets the value of Format.
func (s *FlamebearerMetadataV1) SetFormat(val string) {
s.Format = val
}
type FlamebearerMetadataV1Units string
const (
FlamebearerMetadataV1UnitsSamples FlamebearerMetadataV1Units = "samples"
FlamebearerMetadataV1UnitsObjects FlamebearerMetadataV1Units = "objects"
FlamebearerMetadataV1UnitsGoroutines FlamebearerMetadataV1Units = "goroutines"
FlamebearerMetadataV1UnitsBytes FlamebearerMetadataV1Units = "bytes"
FlamebearerMetadataV1UnitsLockNanoseconds FlamebearerMetadataV1Units = "lock_nanoseconds"
FlamebearerMetadataV1UnitsLockSamples FlamebearerMetadataV1Units = "lock_samples"
)
// MarshalText implements encoding.TextMarshaler.
func (s FlamebearerMetadataV1Units) MarshalText() ([]byte, error) {
switch s {
case FlamebearerMetadataV1UnitsSamples:
return []byte(s), nil
case FlamebearerMetadataV1UnitsObjects:
return []byte(s), nil
case FlamebearerMetadataV1UnitsGoroutines:
return []byte(s), nil
case FlamebearerMetadataV1UnitsBytes:
return []byte(s), nil
case FlamebearerMetadataV1UnitsLockNanoseconds:
return []byte(s), nil
case FlamebearerMetadataV1UnitsLockSamples:
return []byte(s), nil
default:
return nil, errors.Errorf("invalid value: %q", s)
}
}
// UnmarshalText implements encoding.TextUnmarshaler.
func (s *FlamebearerMetadataV1Units) UnmarshalText(data []byte) error {
switch FlamebearerMetadataV1Units(data) {
case FlamebearerMetadataV1UnitsSamples:
*s = FlamebearerMetadataV1UnitsSamples
return nil
case FlamebearerMetadataV1UnitsObjects:
*s = FlamebearerMetadataV1UnitsObjects
return nil
case FlamebearerMetadataV1UnitsGoroutines:
*s = FlamebearerMetadataV1UnitsGoroutines
return nil
case FlamebearerMetadataV1UnitsBytes:
*s = FlamebearerMetadataV1UnitsBytes
return nil
case FlamebearerMetadataV1UnitsLockNanoseconds:
*s = FlamebearerMetadataV1UnitsLockNanoseconds
return nil
case FlamebearerMetadataV1UnitsLockSamples:
*s = FlamebearerMetadataV1UnitsLockSamples
return nil
default:
return errors.Errorf("invalid value: %q", data)
}
}
// Ref: #/components/schemas/FlamebearerProfileV1
type FlamebearerProfileV1 struct {
Flamebearer FlamebearerV1 `json:"flamebearer"`
Metadata FlamebearerMetadataV1 `json:"metadata"`
Timeline OptFlamebearerTimelineV1 `json:"timeline"`
Groups OptFlamebearerProfileV1Groups `json:"groups"`
Heatmap OptNilHeatmap `json:"heatmap"`
LeftTicks OptUint64 `json:"leftTicks"`
RightTicks OptUint64 `json:"rightTicks"`
}
// GetFlamebearer returns the value of Flamebearer.
func (s *FlamebearerProfileV1) GetFlamebearer() FlamebearerV1 {
return s.Flamebearer
}
// GetMetadata returns the value of Metadata.
func (s *FlamebearerProfileV1) GetMetadata() FlamebearerMetadataV1 {
return s.Metadata
}
// GetTimeline returns the value of Timeline.
func (s *FlamebearerProfileV1) GetTimeline() OptFlamebearerTimelineV1 {
return s.Timeline
}
// GetGroups returns the value of Groups.
func (s *FlamebearerProfileV1) GetGroups() OptFlamebearerProfileV1Groups {
return s.Groups
}
// GetHeatmap returns the value of Heatmap.
func (s *FlamebearerProfileV1) GetHeatmap() OptNilHeatmap {
return s.Heatmap
}
// GetLeftTicks returns the value of LeftTicks.
func (s *FlamebearerProfileV1) GetLeftTicks() OptUint64 {
return s.LeftTicks
}
// GetRightTicks returns the value of RightTicks.
func (s *FlamebearerProfileV1) GetRightTicks() OptUint64 {
return s.RightTicks
}
// SetFlamebearer sets the value of Flamebearer.
func (s *FlamebearerProfileV1) SetFlamebearer(val FlamebearerV1) {
s.Flamebearer = val
}
// SetMetadata sets the value of Metadata.
func (s *FlamebearerProfileV1) SetMetadata(val FlamebearerMetadataV1) {
s.Metadata = val
}
// SetTimeline sets the value of Timeline.
func (s *FlamebearerProfileV1) SetTimeline(val OptFlamebearerTimelineV1) {
s.Timeline = val
}
// SetGroups sets the value of Groups.
func (s *FlamebearerProfileV1) SetGroups(val OptFlamebearerProfileV1Groups) {
s.Groups = val
}
// SetHeatmap sets the value of Heatmap.
func (s *FlamebearerProfileV1) SetHeatmap(val OptNilHeatmap) {
s.Heatmap = val
}
// SetLeftTicks sets the value of LeftTicks.
func (s *FlamebearerProfileV1) SetLeftTicks(val OptUint64) {
s.LeftTicks = val
}
// SetRightTicks sets the value of RightTicks.
func (s *FlamebearerProfileV1) SetRightTicks(val OptUint64) {
s.RightTicks = val
}
type FlamebearerProfileV1Groups map[string]FlamebearerTimelineV1
func (s *FlamebearerProfileV1Groups) init() FlamebearerProfileV1Groups {
m := *s
if m == nil {
m = map[string]FlamebearerTimelineV1{}
*s = m
}
return m
}
// Ref: #/components/schemas/FlamebearerTimelineV1
type FlamebearerTimelineV1 struct {
// Time at which the timeline starts, as a Unix timestamp.
StartTime int64 `json:"startTime"`
// A sequence of samples starting at startTime, spaced by durationDelta seconds.
Samples []uint64 `json:"samples"`
// Time delta between samples, in seconds.
DurationDelta int64 `json:"durationDelta"`
Watermarks OptFlamebearerTimelineV1Watermarks `json:"watermarks"`
}
// GetStartTime returns the value of StartTime.
func (s *FlamebearerTimelineV1) GetStartTime() int64 {
return s.StartTime
}
// GetSamples returns the value of Samples.
func (s *FlamebearerTimelineV1) GetSamples() []uint64 {
return s.Samples
}
// GetDurationDelta returns the value of DurationDelta.
func (s *FlamebearerTimelineV1) GetDurationDelta() int64 {
return s.DurationDelta
}
// GetWatermarks returns the value of Watermarks.
func (s *FlamebearerTimelineV1) GetWatermarks() OptFlamebearerTimelineV1Watermarks {
return s.Watermarks
}
// SetStartTime sets the value of StartTime.
func (s *FlamebearerTimelineV1) SetStartTime(val int64) {
s.StartTime = val
}
// SetSamples sets the value of Samples.
func (s *FlamebearerTimelineV1) SetSamples(val []uint64) {
s.Samples = val
}
// SetDurationDelta sets the value of DurationDelta.
func (s *FlamebearerTimelineV1) SetDurationDelta(val int64) {
s.DurationDelta = val
}
// SetWatermarks sets the value of Watermarks.
func (s *FlamebearerTimelineV1) SetWatermarks(val OptFlamebearerTimelineV1Watermarks) {
s.Watermarks = val
}
type FlamebearerTimelineV1Watermarks map[string]int64
func (s *FlamebearerTimelineV1Watermarks) init() FlamebearerTimelineV1Watermarks {
m := *s
if m == nil {
m = map[string]int64{}
*s = m
}
return m
}
// Ref: #/components/schemas/FlamebearerV1
type FlamebearerV1 struct {
// Names is the sequence of symbol names.
Names []string `json:"names"`
// Levels contains the flamebearer nodes. Each level represents a row in the flamegraph.
// For each row / level, there's a sequence of values. These values are grouped in chunks
// which size depend on the flamebearer format: 4 for "single", 7 for "double".
// For "single" format, each chunk has the following data:
// i+0 = x offset (prefix sum of the level total values), delta encoded.
// i+1 = total samples (including the samples in its children nodes).
// i+2 = self samples (excluding the samples in its children nodes).
// i+3 = index in names array
// For "double" format, each chunk has the following data:
// i+0 = x offset (prefix sum of the level total values), delta encoded, base / left tree.
// i+1 = total samples (including the samples in its children nodes) , base / left tree.
// i+2 = self samples (excluding the samples in its children nodes) , base / left tree.
// i+3 = x offset (prefix sum of the level total values), delta encoded, diff / right tree.
// i+4 = total samples (including the samples in its children nodes) , diff / right tree.
// i+5 = self samples (excluding the samples in its children nodes) , diff / right tree.
// i+6 = index in the names array.
Levels [][]int `json:"levels"`
NumTicks int `json:"numTicks"`
MaxSelf int `json:"maxSelf"`
}
// GetNames returns the value of Names.
func (s *FlamebearerV1) GetNames() []string {
return s.Names
}
// GetLevels returns the value of Levels.
func (s *FlamebearerV1) GetLevels() [][]int {
return s.Levels
}
// GetNumTicks returns the value of NumTicks.
func (s *FlamebearerV1) GetNumTicks() int {
return s.NumTicks
}
// GetMaxSelf returns the value of MaxSelf.
func (s *FlamebearerV1) GetMaxSelf() int {
return s.MaxSelf
}
// SetNames sets the value of Names.
func (s *FlamebearerV1) SetNames(val []string) {
s.Names = val
}
// SetLevels sets the value of Levels.
func (s *FlamebearerV1) SetLevels(val [][]int) {
s.Levels = val
}
// SetNumTicks sets the value of NumTicks.
func (s *FlamebearerV1) SetNumTicks(val int) {
s.NumTicks = val
}
// SetMaxSelf sets the value of MaxSelf.
func (s *FlamebearerV1) SetMaxSelf(val int) {
s.MaxSelf = val
}
// Ref: #/components/schemas/Heatmap
type Heatmap struct {
// Values matrix contain values that indicate count of value occurrences,
// satisfying boundaries of X and Y bins: [StartTime:EndTime) and (MinValue:MaxValue].
// A value can be accessed via Values[x][y], where:
// 0 <= x < TimeBuckets, and
// 0 <= y < ValueBuckets.
Values [][]uint64 `json:"values"`
// TimeBuckets denote number of bins on X axis.
// Length of Values array.
TimeBuckets OptInt64 `json:"timeBuckets"`
// ValueBuckets denote number of bins on Y axis.
// Length of any item in the Values array.
ValueBuckets OptInt64 `json:"valueBuckets"`
// StartTime and EndTime indicate boundaries of X axis: [StartTime:EndTime).
StartTime OptInt64 `json:"startTime"`
EndTime OptInt64 `json:"endTime"`
// MinValue and MaxValue indicate boundaries of Y axis: (MinValue:MaxValue].
MinValue OptUint64 `json:"minValue"`
MaxValue OptUint64 `json:"maxValue"`
// MinDepth and MaxDepth indicate boundaries of Z axis: [MinDepth:MaxDepth].
// MinDepth is the minimal non-zero value that can be found in Values.
MinDepth OptUint64 `json:"minDepth"`
MaxDepth OptUint64 `json:"maxDepth"`
}
// GetValues returns the value of Values.
func (s *Heatmap) GetValues() [][]uint64 {
return s.Values
}
// GetTimeBuckets returns the value of TimeBuckets.
func (s *Heatmap) GetTimeBuckets() OptInt64 {
return s.TimeBuckets
}
// GetValueBuckets returns the value of ValueBuckets.
func (s *Heatmap) GetValueBuckets() OptInt64 {
return s.ValueBuckets
}
// GetStartTime returns the value of StartTime.
func (s *Heatmap) GetStartTime() OptInt64 {
return s.StartTime
}
// GetEndTime returns the value of EndTime.
func (s *Heatmap) GetEndTime() OptInt64 {
return s.EndTime
}
// GetMinValue returns the value of MinValue.
func (s *Heatmap) GetMinValue() OptUint64 {
return s.MinValue
}
// GetMaxValue returns the value of MaxValue.
func (s *Heatmap) GetMaxValue() OptUint64 {
return s.MaxValue
}
// GetMinDepth returns the value of MinDepth.
func (s *Heatmap) GetMinDepth() OptUint64 {
return s.MinDepth
}
// GetMaxDepth returns the value of MaxDepth.
func (s *Heatmap) GetMaxDepth() OptUint64 {
return s.MaxDepth
}
// SetValues sets the value of Values.
func (s *Heatmap) SetValues(val [][]uint64) {
s.Values = val
}
// SetTimeBuckets sets the value of TimeBuckets.
func (s *Heatmap) SetTimeBuckets(val OptInt64) {
s.TimeBuckets = val
}
// SetValueBuckets sets the value of ValueBuckets.
func (s *Heatmap) SetValueBuckets(val OptInt64) {
s.ValueBuckets = val
}
// SetStartTime sets the value of StartTime.
func (s *Heatmap) SetStartTime(val OptInt64) {
s.StartTime = val
}
// SetEndTime sets the value of EndTime.
func (s *Heatmap) SetEndTime(val OptInt64) {
s.EndTime = val
}
// SetMinValue sets the value of MinValue.
func (s *Heatmap) SetMinValue(val OptUint64) {
s.MinValue = val
}
// SetMaxValue sets the value of MaxValue.
func (s *Heatmap) SetMaxValue(val OptUint64) {
s.MaxValue = val
}
// SetMinDepth sets the value of MinDepth.
func (s *Heatmap) SetMinDepth(val OptUint64) {
s.MinDepth = val
}
// SetMaxDepth sets the value of MaxDepth.
func (s *Heatmap) SetMaxDepth(val OptUint64) {
s.MaxDepth = val
}
// IngestOK is response for Ingest operation.
type IngestOK struct{}
type IngestReq struct {
Data io.Reader
}
// Read reads data from the Data reader.
//
// Kept to satisfy the io.Reader interface.
func (s IngestReq) Read(p []byte) (n int, err error) {
if s.Data == nil {
return 0, io.EOF
}
return s.Data.Read(p)
}
// IngestReqWithContentType wraps IngestReq with Content-Type.
type IngestReqWithContentType struct {
ContentType string
Content IngestReq
}
// GetContentType returns the value of ContentType.
func (s *IngestReqWithContentType) GetContentType() string {
return s.ContentType
}
// GetContent returns the value of Content.
func (s *IngestReqWithContentType) GetContent() IngestReq {
return s.Content
}
// SetContentType sets the value of ContentType.
func (s *IngestReqWithContentType) SetContentType(val string) {
s.ContentType = val
}
// SetContent sets the value of Content.
func (s *IngestReqWithContentType) SetContent(val IngestReq) {
s.Content = val
}
type LabelValues []string
type Labels []string
// NewOptApplicationMetadataUnits returns new OptApplicationMetadataUnits with value set to v.
func NewOptApplicationMetadataUnits(v ApplicationMetadataUnits) OptApplicationMetadataUnits {
return OptApplicationMetadataUnits{
Value: v,
Set: true,
}
}
// OptApplicationMetadataUnits is optional ApplicationMetadataUnits.
type OptApplicationMetadataUnits struct {
Value ApplicationMetadataUnits
Set bool
}
// IsSet returns true if OptApplicationMetadataUnits was set.
func (o OptApplicationMetadataUnits) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptApplicationMetadataUnits) Reset() {
var v ApplicationMetadataUnits
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptApplicationMetadataUnits) SetTo(v ApplicationMetadataUnits) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptApplicationMetadataUnits) Get() (v ApplicationMetadataUnits, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptApplicationMetadataUnits) Or(d ApplicationMetadataUnits) ApplicationMetadataUnits {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptAtTime returns new OptAtTime with value set to v.
func NewOptAtTime(v AtTime) OptAtTime {
return OptAtTime{
Value: v,
Set: true,
}
}
// OptAtTime is optional AtTime.
type OptAtTime struct {
Value AtTime
Set bool
}
// IsSet returns true if OptAtTime was set.
func (o OptAtTime) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptAtTime) Reset() {
var v AtTime
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptAtTime) SetTo(v AtTime) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptAtTime) Get() (v AtTime, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptAtTime) Or(d AtTime) AtTime {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptFlamebearerMetadataV1Units returns new OptFlamebearerMetadataV1Units with value set to v.
func NewOptFlamebearerMetadataV1Units(v FlamebearerMetadataV1Units) OptFlamebearerMetadataV1Units {
return OptFlamebearerMetadataV1Units{
Value: v,
Set: true,
}
}
// OptFlamebearerMetadataV1Units is optional FlamebearerMetadataV1Units.
type OptFlamebearerMetadataV1Units struct {
Value FlamebearerMetadataV1Units
Set bool
}
// IsSet returns true if OptFlamebearerMetadataV1Units was set.
func (o OptFlamebearerMetadataV1Units) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptFlamebearerMetadataV1Units) Reset() {
var v FlamebearerMetadataV1Units
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptFlamebearerMetadataV1Units) SetTo(v FlamebearerMetadataV1Units) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptFlamebearerMetadataV1Units) Get() (v FlamebearerMetadataV1Units, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptFlamebearerMetadataV1Units) Or(d FlamebearerMetadataV1Units) FlamebearerMetadataV1Units {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptFlamebearerProfileV1Groups returns new OptFlamebearerProfileV1Groups with value set to v.
func NewOptFlamebearerProfileV1Groups(v FlamebearerProfileV1Groups) OptFlamebearerProfileV1Groups {
return OptFlamebearerProfileV1Groups{
Value: v,
Set: true,
}
}
// OptFlamebearerProfileV1Groups is optional FlamebearerProfileV1Groups.
type OptFlamebearerProfileV1Groups struct {
Value FlamebearerProfileV1Groups
Set bool
}
// IsSet returns true if OptFlamebearerProfileV1Groups was set.
func (o OptFlamebearerProfileV1Groups) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptFlamebearerProfileV1Groups) Reset() {
var v FlamebearerProfileV1Groups
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptFlamebearerProfileV1Groups) SetTo(v FlamebearerProfileV1Groups) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptFlamebearerProfileV1Groups) Get() (v FlamebearerProfileV1Groups, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptFlamebearerProfileV1Groups) Or(d FlamebearerProfileV1Groups) FlamebearerProfileV1Groups {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptFlamebearerTimelineV1 returns new OptFlamebearerTimelineV1 with value set to v.
func NewOptFlamebearerTimelineV1(v FlamebearerTimelineV1) OptFlamebearerTimelineV1 {
return OptFlamebearerTimelineV1{
Value: v,
Set: true,
}
}
// OptFlamebearerTimelineV1 is optional FlamebearerTimelineV1.
type OptFlamebearerTimelineV1 struct {
Value FlamebearerTimelineV1
Set bool
}
// IsSet returns true if OptFlamebearerTimelineV1 was set.
func (o OptFlamebearerTimelineV1) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptFlamebearerTimelineV1) Reset() {
var v FlamebearerTimelineV1
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptFlamebearerTimelineV1) SetTo(v FlamebearerTimelineV1) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptFlamebearerTimelineV1) Get() (v FlamebearerTimelineV1, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptFlamebearerTimelineV1) Or(d FlamebearerTimelineV1) FlamebearerTimelineV1 {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptFlamebearerTimelineV1Watermarks returns new OptFlamebearerTimelineV1Watermarks with value set to v.
func NewOptFlamebearerTimelineV1Watermarks(v FlamebearerTimelineV1Watermarks) OptFlamebearerTimelineV1Watermarks {
return OptFlamebearerTimelineV1Watermarks{
Value: v,
Set: true,
}
}
// OptFlamebearerTimelineV1Watermarks is optional FlamebearerTimelineV1Watermarks.
type OptFlamebearerTimelineV1Watermarks struct {
Value FlamebearerTimelineV1Watermarks
Set bool
}
// IsSet returns true if OptFlamebearerTimelineV1Watermarks was set.
func (o OptFlamebearerTimelineV1Watermarks) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptFlamebearerTimelineV1Watermarks) Reset() {
var v FlamebearerTimelineV1Watermarks
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptFlamebearerTimelineV1Watermarks) SetTo(v FlamebearerTimelineV1Watermarks) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptFlamebearerTimelineV1Watermarks) Get() (v FlamebearerTimelineV1Watermarks, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptFlamebearerTimelineV1Watermarks) Or(d FlamebearerTimelineV1Watermarks) FlamebearerTimelineV1Watermarks {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptInt returns new OptInt with value set to v.
func NewOptInt(v int) OptInt {
return OptInt{
Value: v,
Set: true,
}
}
// OptInt is optional int.
type OptInt struct {
Value int
Set bool
}
// IsSet returns true if OptInt was set.
func (o OptInt) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptInt) Reset() {
var v int
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptInt) SetTo(v int) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptInt) Get() (v int, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptInt) Or(d int) int {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptInt64 returns new OptInt64 with value set to v.
func NewOptInt64(v int64) OptInt64 {
return OptInt64{
Value: v,
Set: true,
}
}
// OptInt64 is optional int64.
type OptInt64 struct {
Value int64
Set bool
}
// IsSet returns true if OptInt64 was set.
func (o OptInt64) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptInt64) Reset() {
var v int64
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptInt64) SetTo(v int64) {
o.Set = true
o.Value = v
}