-
Notifications
You must be signed in to change notification settings - Fork 1
/
time_serie_custom.pb.fieldpath.go
4023 lines (3526 loc) · 162 KB
/
time_serie_custom.pb.fieldpath.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 protoc-gen-goten-object
// File: edgelq/monitoring/proto/v3/time_serie_custom.proto
// DO NOT EDIT!!!
package time_serie_client
import (
"encoding/json"
"fmt"
"reflect"
"strings"
"time"
"github.com/iancoleman/strcase"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoregistry"
"google.golang.org/protobuf/types/known/fieldmaskpb"
gotenobject "github.com/cloudwan/goten-sdk/runtime/object"
)
// proto imports
import (
rpc "github.com/cloudwan/edgelq-sdk/common/rpc"
monitoring_common "github.com/cloudwan/edgelq-sdk/monitoring/common/v3"
project "github.com/cloudwan/edgelq-sdk/monitoring/resources/v3/project"
time_serie "github.com/cloudwan/edgelq-sdk/monitoring/resources/v3/time_serie"
field_mask "google.golang.org/genproto/protobuf/field_mask"
)
// ensure the imports are used
var (
_ = new(json.Marshaler)
_ = new(fmt.Stringer)
_ = reflect.DeepEqual
_ = strings.Builder{}
_ = time.Second
_ = strcase.ToLowerCamel
_ = codes.NotFound
_ = status.Status{}
_ = protojson.UnmarshalOptions{}
_ = new(proto.Message)
_ = protoregistry.GlobalTypes
_ = fieldmaskpb.FieldMask{}
_ = new(gotenobject.FieldPath)
)
// make sure we're using proto imports
var (
_ = &rpc.Status{}
_ = &monitoring_common.LabelDescriptor{}
_ = &project.Project{}
_ = &time_serie.Point{}
_ = &field_mask.FieldMask{}
)
// FieldPath provides implementation to handle
// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto
type ListTimeSeriesRequest_FieldPath interface {
gotenobject.FieldPath
Selector() ListTimeSeriesRequest_FieldPathSelector
Get(source *ListTimeSeriesRequest) []interface{}
GetSingle(source *ListTimeSeriesRequest) (interface{}, bool)
ClearValue(item *ListTimeSeriesRequest)
// Those methods build corresponding ListTimeSeriesRequest_FieldPathValue
// (or array of values) and holds passed value. Panics if injected type is incorrect.
WithIValue(value interface{}) ListTimeSeriesRequest_FieldPathValue
WithIArrayOfValues(values interface{}) ListTimeSeriesRequest_FieldPathArrayOfValues
WithIArrayItemValue(value interface{}) ListTimeSeriesRequest_FieldPathArrayItemValue
}
type ListTimeSeriesRequest_FieldPathSelector int32
const (
ListTimeSeriesRequest_FieldPathSelectorParent ListTimeSeriesRequest_FieldPathSelector = 0
ListTimeSeriesRequest_FieldPathSelectorFilter ListTimeSeriesRequest_FieldPathSelector = 1
ListTimeSeriesRequest_FieldPathSelectorInterval ListTimeSeriesRequest_FieldPathSelector = 2
ListTimeSeriesRequest_FieldPathSelectorAggregation ListTimeSeriesRequest_FieldPathSelector = 3
ListTimeSeriesRequest_FieldPathSelectorOrderBy ListTimeSeriesRequest_FieldPathSelector = 4
ListTimeSeriesRequest_FieldPathSelectorView ListTimeSeriesRequest_FieldPathSelector = 5
ListTimeSeriesRequest_FieldPathSelectorFieldMask ListTimeSeriesRequest_FieldPathSelector = 6
ListTimeSeriesRequest_FieldPathSelectorPageSize ListTimeSeriesRequest_FieldPathSelector = 7
ListTimeSeriesRequest_FieldPathSelectorPageToken ListTimeSeriesRequest_FieldPathSelector = 8
)
func (s ListTimeSeriesRequest_FieldPathSelector) String() string {
switch s {
case ListTimeSeriesRequest_FieldPathSelectorParent:
return "parent"
case ListTimeSeriesRequest_FieldPathSelectorFilter:
return "filter"
case ListTimeSeriesRequest_FieldPathSelectorInterval:
return "interval"
case ListTimeSeriesRequest_FieldPathSelectorAggregation:
return "aggregation"
case ListTimeSeriesRequest_FieldPathSelectorOrderBy:
return "order_by"
case ListTimeSeriesRequest_FieldPathSelectorView:
return "view"
case ListTimeSeriesRequest_FieldPathSelectorFieldMask:
return "field_mask"
case ListTimeSeriesRequest_FieldPathSelectorPageSize:
return "page_size"
case ListTimeSeriesRequest_FieldPathSelectorPageToken:
return "page_token"
default:
panic(fmt.Sprintf("Invalid selector for ListTimeSeriesRequest: %d", s))
}
}
func BuildListTimeSeriesRequest_FieldPath(fp gotenobject.RawFieldPath) (ListTimeSeriesRequest_FieldPath, error) {
if len(fp) == 0 {
return nil, status.Error(codes.InvalidArgument, "empty field path for object ListTimeSeriesRequest")
}
if len(fp) == 1 {
switch fp[0] {
case "parent":
return &ListTimeSeriesRequest_FieldTerminalPath{selector: ListTimeSeriesRequest_FieldPathSelectorParent}, nil
case "filter":
return &ListTimeSeriesRequest_FieldTerminalPath{selector: ListTimeSeriesRequest_FieldPathSelectorFilter}, nil
case "interval":
return &ListTimeSeriesRequest_FieldTerminalPath{selector: ListTimeSeriesRequest_FieldPathSelectorInterval}, nil
case "aggregation":
return &ListTimeSeriesRequest_FieldTerminalPath{selector: ListTimeSeriesRequest_FieldPathSelectorAggregation}, nil
case "order_by", "orderBy", "order-by":
return &ListTimeSeriesRequest_FieldTerminalPath{selector: ListTimeSeriesRequest_FieldPathSelectorOrderBy}, nil
case "view":
return &ListTimeSeriesRequest_FieldTerminalPath{selector: ListTimeSeriesRequest_FieldPathSelectorView}, nil
case "field_mask", "fieldMask", "field-mask":
return &ListTimeSeriesRequest_FieldTerminalPath{selector: ListTimeSeriesRequest_FieldPathSelectorFieldMask}, nil
case "page_size", "pageSize", "page-size":
return &ListTimeSeriesRequest_FieldTerminalPath{selector: ListTimeSeriesRequest_FieldPathSelectorPageSize}, nil
case "page_token", "pageToken", "page-token":
return &ListTimeSeriesRequest_FieldTerminalPath{selector: ListTimeSeriesRequest_FieldPathSelectorPageToken}, nil
}
} else {
switch fp[0] {
case "interval":
if subpath, err := monitoring_common.BuildTimeInterval_FieldPath(fp[1:]); err != nil {
return nil, err
} else {
return &ListTimeSeriesRequest_FieldSubPath{selector: ListTimeSeriesRequest_FieldPathSelectorInterval, subPath: subpath}, nil
}
case "aggregation":
if subpath, err := monitoring_common.BuildAggregation_FieldPath(fp[1:]); err != nil {
return nil, err
} else {
return &ListTimeSeriesRequest_FieldSubPath{selector: ListTimeSeriesRequest_FieldPathSelectorAggregation, subPath: subpath}, nil
}
}
}
return nil, status.Errorf(codes.InvalidArgument, "unknown field path '%s' for object ListTimeSeriesRequest", fp)
}
func ParseListTimeSeriesRequest_FieldPath(rawField string) (ListTimeSeriesRequest_FieldPath, error) {
fp, err := gotenobject.ParseRawFieldPath(rawField)
if err != nil {
return nil, err
}
return BuildListTimeSeriesRequest_FieldPath(fp)
}
func MustParseListTimeSeriesRequest_FieldPath(rawField string) ListTimeSeriesRequest_FieldPath {
fp, err := ParseListTimeSeriesRequest_FieldPath(rawField)
if err != nil {
panic(err)
}
return fp
}
type ListTimeSeriesRequest_FieldTerminalPath struct {
selector ListTimeSeriesRequest_FieldPathSelector
}
var _ ListTimeSeriesRequest_FieldPath = (*ListTimeSeriesRequest_FieldTerminalPath)(nil)
func (fp *ListTimeSeriesRequest_FieldTerminalPath) Selector() ListTimeSeriesRequest_FieldPathSelector {
return fp.selector
}
// String returns path representation in proto convention
func (fp *ListTimeSeriesRequest_FieldTerminalPath) String() string {
return fp.selector.String()
}
// JSONString returns path representation is JSON convention
func (fp *ListTimeSeriesRequest_FieldTerminalPath) JSONString() string {
return strcase.ToLowerCamel(fp.String())
}
// Get returns all values pointed by specific field from source ListTimeSeriesRequest
func (fp *ListTimeSeriesRequest_FieldTerminalPath) Get(source *ListTimeSeriesRequest) (values []interface{}) {
if source != nil {
switch fp.selector {
case ListTimeSeriesRequest_FieldPathSelectorParent:
if source.Parent != nil {
values = append(values, source.Parent)
}
case ListTimeSeriesRequest_FieldPathSelectorFilter:
if source.Filter != nil {
values = append(values, source.Filter)
}
case ListTimeSeriesRequest_FieldPathSelectorInterval:
if source.Interval != nil {
values = append(values, source.Interval)
}
case ListTimeSeriesRequest_FieldPathSelectorAggregation:
if source.Aggregation != nil {
values = append(values, source.Aggregation)
}
case ListTimeSeriesRequest_FieldPathSelectorOrderBy:
values = append(values, source.OrderBy)
case ListTimeSeriesRequest_FieldPathSelectorView:
values = append(values, source.View)
case ListTimeSeriesRequest_FieldPathSelectorFieldMask:
if source.FieldMask != nil {
values = append(values, source.FieldMask)
}
case ListTimeSeriesRequest_FieldPathSelectorPageSize:
values = append(values, source.PageSize)
case ListTimeSeriesRequest_FieldPathSelectorPageToken:
values = append(values, source.PageToken)
default:
panic(fmt.Sprintf("Invalid selector for ListTimeSeriesRequest: %d", fp.selector))
}
}
return
}
func (fp *ListTimeSeriesRequest_FieldTerminalPath) GetRaw(source proto.Message) []interface{} {
return fp.Get(source.(*ListTimeSeriesRequest))
}
// GetSingle returns value pointed by specific field of from source ListTimeSeriesRequest
func (fp *ListTimeSeriesRequest_FieldTerminalPath) GetSingle(source *ListTimeSeriesRequest) (interface{}, bool) {
switch fp.selector {
case ListTimeSeriesRequest_FieldPathSelectorParent:
res := source.GetParent()
return res, res != nil
case ListTimeSeriesRequest_FieldPathSelectorFilter:
res := source.GetFilter()
return res, res != nil
case ListTimeSeriesRequest_FieldPathSelectorInterval:
res := source.GetInterval()
return res, res != nil
case ListTimeSeriesRequest_FieldPathSelectorAggregation:
res := source.GetAggregation()
return res, res != nil
case ListTimeSeriesRequest_FieldPathSelectorOrderBy:
return source.GetOrderBy(), source != nil
case ListTimeSeriesRequest_FieldPathSelectorView:
return source.GetView(), source != nil
case ListTimeSeriesRequest_FieldPathSelectorFieldMask:
res := source.GetFieldMask()
return res, res != nil
case ListTimeSeriesRequest_FieldPathSelectorPageSize:
return source.GetPageSize(), source != nil
case ListTimeSeriesRequest_FieldPathSelectorPageToken:
return source.GetPageToken(), source != nil
default:
panic(fmt.Sprintf("Invalid selector for ListTimeSeriesRequest: %d", fp.selector))
}
}
func (fp *ListTimeSeriesRequest_FieldTerminalPath) GetSingleRaw(source proto.Message) (interface{}, bool) {
return fp.GetSingle(source.(*ListTimeSeriesRequest))
}
// GetDefault returns a default value of the field type
func (fp *ListTimeSeriesRequest_FieldTerminalPath) GetDefault() interface{} {
switch fp.selector {
case ListTimeSeriesRequest_FieldPathSelectorParent:
return (*project.Name)(nil)
case ListTimeSeriesRequest_FieldPathSelectorFilter:
return (*time_serie.Filter)(nil)
case ListTimeSeriesRequest_FieldPathSelectorInterval:
return (*monitoring_common.TimeInterval)(nil)
case ListTimeSeriesRequest_FieldPathSelectorAggregation:
return (*monitoring_common.Aggregation)(nil)
case ListTimeSeriesRequest_FieldPathSelectorOrderBy:
return ""
case ListTimeSeriesRequest_FieldPathSelectorView:
return monitoring_common.TimeSeriesView_FULL
case ListTimeSeriesRequest_FieldPathSelectorFieldMask:
return (*time_serie.TimeSerie_FieldMask)(nil)
case ListTimeSeriesRequest_FieldPathSelectorPageSize:
return int32(0)
case ListTimeSeriesRequest_FieldPathSelectorPageToken:
return ""
default:
panic(fmt.Sprintf("Invalid selector for ListTimeSeriesRequest: %d", fp.selector))
}
}
func (fp *ListTimeSeriesRequest_FieldTerminalPath) ClearValue(item *ListTimeSeriesRequest) {
if item != nil {
switch fp.selector {
case ListTimeSeriesRequest_FieldPathSelectorParent:
item.Parent = nil
case ListTimeSeriesRequest_FieldPathSelectorFilter:
item.Filter = nil
case ListTimeSeriesRequest_FieldPathSelectorInterval:
item.Interval = nil
case ListTimeSeriesRequest_FieldPathSelectorAggregation:
item.Aggregation = nil
case ListTimeSeriesRequest_FieldPathSelectorOrderBy:
item.OrderBy = ""
case ListTimeSeriesRequest_FieldPathSelectorView:
item.View = monitoring_common.TimeSeriesView_FULL
case ListTimeSeriesRequest_FieldPathSelectorFieldMask:
item.FieldMask = nil
case ListTimeSeriesRequest_FieldPathSelectorPageSize:
item.PageSize = int32(0)
case ListTimeSeriesRequest_FieldPathSelectorPageToken:
item.PageToken = ""
default:
panic(fmt.Sprintf("Invalid selector for ListTimeSeriesRequest: %d", fp.selector))
}
}
}
func (fp *ListTimeSeriesRequest_FieldTerminalPath) ClearValueRaw(item proto.Message) {
fp.ClearValue(item.(*ListTimeSeriesRequest))
}
// IsLeaf - whether field path is holds simple value
func (fp *ListTimeSeriesRequest_FieldTerminalPath) IsLeaf() bool {
return fp.selector == ListTimeSeriesRequest_FieldPathSelectorParent ||
fp.selector == ListTimeSeriesRequest_FieldPathSelectorFilter ||
fp.selector == ListTimeSeriesRequest_FieldPathSelectorOrderBy ||
fp.selector == ListTimeSeriesRequest_FieldPathSelectorView ||
fp.selector == ListTimeSeriesRequest_FieldPathSelectorFieldMask ||
fp.selector == ListTimeSeriesRequest_FieldPathSelectorPageSize ||
fp.selector == ListTimeSeriesRequest_FieldPathSelectorPageToken
}
func (fp *ListTimeSeriesRequest_FieldTerminalPath) SplitIntoTerminalIPaths() []gotenobject.FieldPath {
return []gotenobject.FieldPath{fp}
}
func (fp *ListTimeSeriesRequest_FieldTerminalPath) WithIValue(value interface{}) ListTimeSeriesRequest_FieldPathValue {
switch fp.selector {
case ListTimeSeriesRequest_FieldPathSelectorParent:
return &ListTimeSeriesRequest_FieldTerminalPathValue{ListTimeSeriesRequest_FieldTerminalPath: *fp, value: value.(*project.Name)}
case ListTimeSeriesRequest_FieldPathSelectorFilter:
return &ListTimeSeriesRequest_FieldTerminalPathValue{ListTimeSeriesRequest_FieldTerminalPath: *fp, value: value.(*time_serie.Filter)}
case ListTimeSeriesRequest_FieldPathSelectorInterval:
return &ListTimeSeriesRequest_FieldTerminalPathValue{ListTimeSeriesRequest_FieldTerminalPath: *fp, value: value.(*monitoring_common.TimeInterval)}
case ListTimeSeriesRequest_FieldPathSelectorAggregation:
return &ListTimeSeriesRequest_FieldTerminalPathValue{ListTimeSeriesRequest_FieldTerminalPath: *fp, value: value.(*monitoring_common.Aggregation)}
case ListTimeSeriesRequest_FieldPathSelectorOrderBy:
return &ListTimeSeriesRequest_FieldTerminalPathValue{ListTimeSeriesRequest_FieldTerminalPath: *fp, value: value.(string)}
case ListTimeSeriesRequest_FieldPathSelectorView:
return &ListTimeSeriesRequest_FieldTerminalPathValue{ListTimeSeriesRequest_FieldTerminalPath: *fp, value: value.(monitoring_common.TimeSeriesView)}
case ListTimeSeriesRequest_FieldPathSelectorFieldMask:
return &ListTimeSeriesRequest_FieldTerminalPathValue{ListTimeSeriesRequest_FieldTerminalPath: *fp, value: value.(*time_serie.TimeSerie_FieldMask)}
case ListTimeSeriesRequest_FieldPathSelectorPageSize:
return &ListTimeSeriesRequest_FieldTerminalPathValue{ListTimeSeriesRequest_FieldTerminalPath: *fp, value: value.(int32)}
case ListTimeSeriesRequest_FieldPathSelectorPageToken:
return &ListTimeSeriesRequest_FieldTerminalPathValue{ListTimeSeriesRequest_FieldTerminalPath: *fp, value: value.(string)}
default:
panic(fmt.Sprintf("Invalid selector for ListTimeSeriesRequest: %d", fp.selector))
}
}
func (fp *ListTimeSeriesRequest_FieldTerminalPath) WithRawIValue(value interface{}) gotenobject.FieldPathValue {
return fp.WithIValue(value)
}
func (fp *ListTimeSeriesRequest_FieldTerminalPath) WithIArrayOfValues(values interface{}) ListTimeSeriesRequest_FieldPathArrayOfValues {
fpaov := &ListTimeSeriesRequest_FieldTerminalPathArrayOfValues{ListTimeSeriesRequest_FieldTerminalPath: *fp}
switch fp.selector {
case ListTimeSeriesRequest_FieldPathSelectorParent:
return &ListTimeSeriesRequest_FieldTerminalPathArrayOfValues{ListTimeSeriesRequest_FieldTerminalPath: *fp, values: values.([]*project.Name)}
case ListTimeSeriesRequest_FieldPathSelectorFilter:
return &ListTimeSeriesRequest_FieldTerminalPathArrayOfValues{ListTimeSeriesRequest_FieldTerminalPath: *fp, values: values.([]*time_serie.Filter)}
case ListTimeSeriesRequest_FieldPathSelectorInterval:
return &ListTimeSeriesRequest_FieldTerminalPathArrayOfValues{ListTimeSeriesRequest_FieldTerminalPath: *fp, values: values.([]*monitoring_common.TimeInterval)}
case ListTimeSeriesRequest_FieldPathSelectorAggregation:
return &ListTimeSeriesRequest_FieldTerminalPathArrayOfValues{ListTimeSeriesRequest_FieldTerminalPath: *fp, values: values.([]*monitoring_common.Aggregation)}
case ListTimeSeriesRequest_FieldPathSelectorOrderBy:
return &ListTimeSeriesRequest_FieldTerminalPathArrayOfValues{ListTimeSeriesRequest_FieldTerminalPath: *fp, values: values.([]string)}
case ListTimeSeriesRequest_FieldPathSelectorView:
return &ListTimeSeriesRequest_FieldTerminalPathArrayOfValues{ListTimeSeriesRequest_FieldTerminalPath: *fp, values: values.([]monitoring_common.TimeSeriesView)}
case ListTimeSeriesRequest_FieldPathSelectorFieldMask:
return &ListTimeSeriesRequest_FieldTerminalPathArrayOfValues{ListTimeSeriesRequest_FieldTerminalPath: *fp, values: values.([]*time_serie.TimeSerie_FieldMask)}
case ListTimeSeriesRequest_FieldPathSelectorPageSize:
return &ListTimeSeriesRequest_FieldTerminalPathArrayOfValues{ListTimeSeriesRequest_FieldTerminalPath: *fp, values: values.([]int32)}
case ListTimeSeriesRequest_FieldPathSelectorPageToken:
return &ListTimeSeriesRequest_FieldTerminalPathArrayOfValues{ListTimeSeriesRequest_FieldTerminalPath: *fp, values: values.([]string)}
default:
panic(fmt.Sprintf("Invalid selector for ListTimeSeriesRequest: %d", fp.selector))
}
return fpaov
}
func (fp *ListTimeSeriesRequest_FieldTerminalPath) WithRawIArrayOfValues(values interface{}) gotenobject.FieldPathArrayOfValues {
return fp.WithIArrayOfValues(values)
}
func (fp *ListTimeSeriesRequest_FieldTerminalPath) WithIArrayItemValue(value interface{}) ListTimeSeriesRequest_FieldPathArrayItemValue {
switch fp.selector {
default:
panic(fmt.Sprintf("Invalid selector for ListTimeSeriesRequest: %d", fp.selector))
}
}
func (fp *ListTimeSeriesRequest_FieldTerminalPath) WithRawIArrayItemValue(value interface{}) gotenobject.FieldPathArrayItemValue {
return fp.WithIArrayItemValue(value)
}
type ListTimeSeriesRequest_FieldSubPath struct {
selector ListTimeSeriesRequest_FieldPathSelector
subPath gotenobject.FieldPath
}
var _ ListTimeSeriesRequest_FieldPath = (*ListTimeSeriesRequest_FieldSubPath)(nil)
func (fps *ListTimeSeriesRequest_FieldSubPath) Selector() ListTimeSeriesRequest_FieldPathSelector {
return fps.selector
}
func (fps *ListTimeSeriesRequest_FieldSubPath) AsIntervalSubPath() (monitoring_common.TimeInterval_FieldPath, bool) {
res, ok := fps.subPath.(monitoring_common.TimeInterval_FieldPath)
return res, ok
}
func (fps *ListTimeSeriesRequest_FieldSubPath) AsAggregationSubPath() (monitoring_common.Aggregation_FieldPath, bool) {
res, ok := fps.subPath.(monitoring_common.Aggregation_FieldPath)
return res, ok
}
// String returns path representation in proto convention
func (fps *ListTimeSeriesRequest_FieldSubPath) String() string {
return fps.selector.String() + "." + fps.subPath.String()
}
// JSONString returns path representation is JSON convention
func (fps *ListTimeSeriesRequest_FieldSubPath) JSONString() string {
return strcase.ToLowerCamel(fps.selector.String()) + "." + fps.subPath.JSONString()
}
// Get returns all values pointed by selected field from source ListTimeSeriesRequest
func (fps *ListTimeSeriesRequest_FieldSubPath) Get(source *ListTimeSeriesRequest) (values []interface{}) {
switch fps.selector {
case ListTimeSeriesRequest_FieldPathSelectorInterval:
values = append(values, fps.subPath.GetRaw(source.GetInterval())...)
case ListTimeSeriesRequest_FieldPathSelectorAggregation:
values = append(values, fps.subPath.GetRaw(source.GetAggregation())...)
default:
panic(fmt.Sprintf("Invalid selector for ListTimeSeriesRequest: %d", fps.selector))
}
return
}
func (fps *ListTimeSeriesRequest_FieldSubPath) GetRaw(source proto.Message) []interface{} {
return fps.Get(source.(*ListTimeSeriesRequest))
}
// GetSingle returns value of selected field from source ListTimeSeriesRequest
func (fps *ListTimeSeriesRequest_FieldSubPath) GetSingle(source *ListTimeSeriesRequest) (interface{}, bool) {
switch fps.selector {
case ListTimeSeriesRequest_FieldPathSelectorInterval:
if source.GetInterval() == nil {
return nil, false
}
return fps.subPath.GetSingleRaw(source.GetInterval())
case ListTimeSeriesRequest_FieldPathSelectorAggregation:
if source.GetAggregation() == nil {
return nil, false
}
return fps.subPath.GetSingleRaw(source.GetAggregation())
default:
panic(fmt.Sprintf("Invalid selector for ListTimeSeriesRequest: %d", fps.selector))
}
}
func (fps *ListTimeSeriesRequest_FieldSubPath) GetSingleRaw(source proto.Message) (interface{}, bool) {
return fps.GetSingle(source.(*ListTimeSeriesRequest))
}
// GetDefault returns a default value of the field type
func (fps *ListTimeSeriesRequest_FieldSubPath) GetDefault() interface{} {
return fps.subPath.GetDefault()
}
func (fps *ListTimeSeriesRequest_FieldSubPath) ClearValue(item *ListTimeSeriesRequest) {
if item != nil {
switch fps.selector {
case ListTimeSeriesRequest_FieldPathSelectorInterval:
fps.subPath.ClearValueRaw(item.Interval)
case ListTimeSeriesRequest_FieldPathSelectorAggregation:
fps.subPath.ClearValueRaw(item.Aggregation)
default:
panic(fmt.Sprintf("Invalid selector for ListTimeSeriesRequest: %d", fps.selector))
}
}
}
func (fps *ListTimeSeriesRequest_FieldSubPath) ClearValueRaw(item proto.Message) {
fps.ClearValue(item.(*ListTimeSeriesRequest))
}
// IsLeaf - whether field path is holds simple value
func (fps *ListTimeSeriesRequest_FieldSubPath) IsLeaf() bool {
return fps.subPath.IsLeaf()
}
func (fps *ListTimeSeriesRequest_FieldSubPath) SplitIntoTerminalIPaths() []gotenobject.FieldPath {
iPaths := []gotenobject.FieldPath{&ListTimeSeriesRequest_FieldTerminalPath{selector: fps.selector}}
iPaths = append(iPaths, fps.subPath.SplitIntoTerminalIPaths()...)
return iPaths
}
func (fps *ListTimeSeriesRequest_FieldSubPath) WithIValue(value interface{}) ListTimeSeriesRequest_FieldPathValue {
return &ListTimeSeriesRequest_FieldSubPathValue{fps, fps.subPath.WithRawIValue(value)}
}
func (fps *ListTimeSeriesRequest_FieldSubPath) WithRawIValue(value interface{}) gotenobject.FieldPathValue {
return fps.WithIValue(value)
}
func (fps *ListTimeSeriesRequest_FieldSubPath) WithIArrayOfValues(values interface{}) ListTimeSeriesRequest_FieldPathArrayOfValues {
return &ListTimeSeriesRequest_FieldSubPathArrayOfValues{fps, fps.subPath.WithRawIArrayOfValues(values)}
}
func (fps *ListTimeSeriesRequest_FieldSubPath) WithRawIArrayOfValues(values interface{}) gotenobject.FieldPathArrayOfValues {
return fps.WithIArrayOfValues(values)
}
func (fps *ListTimeSeriesRequest_FieldSubPath) WithIArrayItemValue(value interface{}) ListTimeSeriesRequest_FieldPathArrayItemValue {
return &ListTimeSeriesRequest_FieldSubPathArrayItemValue{fps, fps.subPath.WithRawIArrayItemValue(value)}
}
func (fps *ListTimeSeriesRequest_FieldSubPath) WithRawIArrayItemValue(value interface{}) gotenobject.FieldPathArrayItemValue {
return fps.WithIArrayItemValue(value)
}
// ListTimeSeriesRequest_FieldPathValue allows storing values for ListTimeSeriesRequest fields according to their type
type ListTimeSeriesRequest_FieldPathValue interface {
ListTimeSeriesRequest_FieldPath
gotenobject.FieldPathValue
SetTo(target **ListTimeSeriesRequest)
CompareWith(*ListTimeSeriesRequest) (cmp int, comparable bool)
}
func ParseListTimeSeriesRequest_FieldPathValue(pathStr, valueStr string) (ListTimeSeriesRequest_FieldPathValue, error) {
fp, err := ParseListTimeSeriesRequest_FieldPath(pathStr)
if err != nil {
return nil, err
}
fpv, err := gotenobject.ParseFieldPathValue(fp, valueStr)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "error parsing ListTimeSeriesRequest field path value from %s: %v", valueStr, err)
}
return fpv.(ListTimeSeriesRequest_FieldPathValue), nil
}
func MustParseListTimeSeriesRequest_FieldPathValue(pathStr, valueStr string) ListTimeSeriesRequest_FieldPathValue {
fpv, err := ParseListTimeSeriesRequest_FieldPathValue(pathStr, valueStr)
if err != nil {
panic(err)
}
return fpv
}
type ListTimeSeriesRequest_FieldTerminalPathValue struct {
ListTimeSeriesRequest_FieldTerminalPath
value interface{}
}
var _ ListTimeSeriesRequest_FieldPathValue = (*ListTimeSeriesRequest_FieldTerminalPathValue)(nil)
// GetRawValue returns raw value stored under selected path for 'ListTimeSeriesRequest' as interface{}
func (fpv *ListTimeSeriesRequest_FieldTerminalPathValue) GetRawValue() interface{} {
return fpv.value
}
func (fpv *ListTimeSeriesRequest_FieldTerminalPathValue) AsParentValue() (*project.Name, bool) {
res, ok := fpv.value.(*project.Name)
return res, ok
}
func (fpv *ListTimeSeriesRequest_FieldTerminalPathValue) AsFilterValue() (*time_serie.Filter, bool) {
res, ok := fpv.value.(*time_serie.Filter)
return res, ok
}
func (fpv *ListTimeSeriesRequest_FieldTerminalPathValue) AsIntervalValue() (*monitoring_common.TimeInterval, bool) {
res, ok := fpv.value.(*monitoring_common.TimeInterval)
return res, ok
}
func (fpv *ListTimeSeriesRequest_FieldTerminalPathValue) AsAggregationValue() (*monitoring_common.Aggregation, bool) {
res, ok := fpv.value.(*monitoring_common.Aggregation)
return res, ok
}
func (fpv *ListTimeSeriesRequest_FieldTerminalPathValue) AsOrderByValue() (string, bool) {
res, ok := fpv.value.(string)
return res, ok
}
func (fpv *ListTimeSeriesRequest_FieldTerminalPathValue) AsViewValue() (monitoring_common.TimeSeriesView, bool) {
res, ok := fpv.value.(monitoring_common.TimeSeriesView)
return res, ok
}
func (fpv *ListTimeSeriesRequest_FieldTerminalPathValue) AsFieldMaskValue() (*time_serie.TimeSerie_FieldMask, bool) {
res, ok := fpv.value.(*time_serie.TimeSerie_FieldMask)
return res, ok
}
func (fpv *ListTimeSeriesRequest_FieldTerminalPathValue) AsPageSizeValue() (int32, bool) {
res, ok := fpv.value.(int32)
return res, ok
}
func (fpv *ListTimeSeriesRequest_FieldTerminalPathValue) AsPageTokenValue() (string, bool) {
res, ok := fpv.value.(string)
return res, ok
}
// SetTo stores value for selected field for object ListTimeSeriesRequest
func (fpv *ListTimeSeriesRequest_FieldTerminalPathValue) SetTo(target **ListTimeSeriesRequest) {
if *target == nil {
*target = new(ListTimeSeriesRequest)
}
switch fpv.selector {
case ListTimeSeriesRequest_FieldPathSelectorParent:
(*target).Parent = fpv.value.(*project.Name)
case ListTimeSeriesRequest_FieldPathSelectorFilter:
(*target).Filter = fpv.value.(*time_serie.Filter)
case ListTimeSeriesRequest_FieldPathSelectorInterval:
(*target).Interval = fpv.value.(*monitoring_common.TimeInterval)
case ListTimeSeriesRequest_FieldPathSelectorAggregation:
(*target).Aggregation = fpv.value.(*monitoring_common.Aggregation)
case ListTimeSeriesRequest_FieldPathSelectorOrderBy:
(*target).OrderBy = fpv.value.(string)
case ListTimeSeriesRequest_FieldPathSelectorView:
(*target).View = fpv.value.(monitoring_common.TimeSeriesView)
case ListTimeSeriesRequest_FieldPathSelectorFieldMask:
(*target).FieldMask = fpv.value.(*time_serie.TimeSerie_FieldMask)
case ListTimeSeriesRequest_FieldPathSelectorPageSize:
(*target).PageSize = fpv.value.(int32)
case ListTimeSeriesRequest_FieldPathSelectorPageToken:
(*target).PageToken = fpv.value.(string)
default:
panic(fmt.Sprintf("Invalid selector for ListTimeSeriesRequest: %d", fpv.selector))
}
}
func (fpv *ListTimeSeriesRequest_FieldTerminalPathValue) SetToRaw(target proto.Message) {
typedObject := target.(*ListTimeSeriesRequest)
fpv.SetTo(&typedObject)
}
// CompareWith compares value in the 'ListTimeSeriesRequest_FieldTerminalPathValue' with the value under path in 'ListTimeSeriesRequest'.
func (fpv *ListTimeSeriesRequest_FieldTerminalPathValue) CompareWith(source *ListTimeSeriesRequest) (int, bool) {
switch fpv.selector {
case ListTimeSeriesRequest_FieldPathSelectorParent:
leftValue := fpv.value.(*project.Name)
rightValue := source.GetParent()
if leftValue == nil {
if rightValue != nil {
return -1, true
}
return 0, true
}
if rightValue == nil {
return 1, true
}
if leftValue.String() == rightValue.String() {
return 0, true
} else if leftValue.String() < rightValue.String() {
return -1, true
} else {
return 1, true
}
case ListTimeSeriesRequest_FieldPathSelectorFilter:
return 0, false
case ListTimeSeriesRequest_FieldPathSelectorInterval:
return 0, false
case ListTimeSeriesRequest_FieldPathSelectorAggregation:
return 0, false
case ListTimeSeriesRequest_FieldPathSelectorOrderBy:
leftValue := fpv.value.(string)
rightValue := source.GetOrderBy()
if (leftValue) == (rightValue) {
return 0, true
} else if (leftValue) < (rightValue) {
return -1, true
} else {
return 1, true
}
case ListTimeSeriesRequest_FieldPathSelectorView:
leftValue := fpv.value.(monitoring_common.TimeSeriesView)
rightValue := source.GetView()
if (leftValue) == (rightValue) {
return 0, true
} else if (leftValue) < (rightValue) {
return -1, true
} else {
return 1, true
}
case ListTimeSeriesRequest_FieldPathSelectorFieldMask:
return 0, false
case ListTimeSeriesRequest_FieldPathSelectorPageSize:
leftValue := fpv.value.(int32)
rightValue := source.GetPageSize()
if (leftValue) == (rightValue) {
return 0, true
} else if (leftValue) < (rightValue) {
return -1, true
} else {
return 1, true
}
case ListTimeSeriesRequest_FieldPathSelectorPageToken:
leftValue := fpv.value.(string)
rightValue := source.GetPageToken()
if (leftValue) == (rightValue) {
return 0, true
} else if (leftValue) < (rightValue) {
return -1, true
} else {
return 1, true
}
default:
panic(fmt.Sprintf("Invalid selector for ListTimeSeriesRequest: %d", fpv.selector))
}
}
func (fpv *ListTimeSeriesRequest_FieldTerminalPathValue) CompareWithRaw(source proto.Message) (int, bool) {
return fpv.CompareWith(source.(*ListTimeSeriesRequest))
}
type ListTimeSeriesRequest_FieldSubPathValue struct {
ListTimeSeriesRequest_FieldPath
subPathValue gotenobject.FieldPathValue
}
var _ ListTimeSeriesRequest_FieldPathValue = (*ListTimeSeriesRequest_FieldSubPathValue)(nil)
func (fpvs *ListTimeSeriesRequest_FieldSubPathValue) AsIntervalPathValue() (monitoring_common.TimeInterval_FieldPathValue, bool) {
res, ok := fpvs.subPathValue.(monitoring_common.TimeInterval_FieldPathValue)
return res, ok
}
func (fpvs *ListTimeSeriesRequest_FieldSubPathValue) AsAggregationPathValue() (monitoring_common.Aggregation_FieldPathValue, bool) {
res, ok := fpvs.subPathValue.(monitoring_common.Aggregation_FieldPathValue)
return res, ok
}
func (fpvs *ListTimeSeriesRequest_FieldSubPathValue) SetTo(target **ListTimeSeriesRequest) {
if *target == nil {
*target = new(ListTimeSeriesRequest)
}
switch fpvs.Selector() {
case ListTimeSeriesRequest_FieldPathSelectorInterval:
fpvs.subPathValue.(monitoring_common.TimeInterval_FieldPathValue).SetTo(&(*target).Interval)
case ListTimeSeriesRequest_FieldPathSelectorAggregation:
fpvs.subPathValue.(monitoring_common.Aggregation_FieldPathValue).SetTo(&(*target).Aggregation)
default:
panic(fmt.Sprintf("Invalid selector for ListTimeSeriesRequest: %d", fpvs.Selector()))
}
}
func (fpvs *ListTimeSeriesRequest_FieldSubPathValue) SetToRaw(target proto.Message) {
typedObject := target.(*ListTimeSeriesRequest)
fpvs.SetTo(&typedObject)
}
func (fpvs *ListTimeSeriesRequest_FieldSubPathValue) GetRawValue() interface{} {
return fpvs.subPathValue.GetRawValue()
}
func (fpvs *ListTimeSeriesRequest_FieldSubPathValue) CompareWith(source *ListTimeSeriesRequest) (int, bool) {
switch fpvs.Selector() {
case ListTimeSeriesRequest_FieldPathSelectorInterval:
return fpvs.subPathValue.(monitoring_common.TimeInterval_FieldPathValue).CompareWith(source.GetInterval())
case ListTimeSeriesRequest_FieldPathSelectorAggregation:
return fpvs.subPathValue.(monitoring_common.Aggregation_FieldPathValue).CompareWith(source.GetAggregation())
default:
panic(fmt.Sprintf("Invalid selector for ListTimeSeriesRequest: %d", fpvs.Selector()))
}
}
func (fpvs *ListTimeSeriesRequest_FieldSubPathValue) CompareWithRaw(source proto.Message) (int, bool) {
return fpvs.CompareWith(source.(*ListTimeSeriesRequest))
}
// ListTimeSeriesRequest_FieldPathArrayItemValue allows storing single item in Path-specific values for ListTimeSeriesRequest according to their type
// Present only for array (repeated) types.
type ListTimeSeriesRequest_FieldPathArrayItemValue interface {
gotenobject.FieldPathArrayItemValue
ListTimeSeriesRequest_FieldPath
ContainsValue(*ListTimeSeriesRequest) bool
}
// ParseListTimeSeriesRequest_FieldPathArrayItemValue parses string and JSON-encoded value to its Value
func ParseListTimeSeriesRequest_FieldPathArrayItemValue(pathStr, valueStr string) (ListTimeSeriesRequest_FieldPathArrayItemValue, error) {
fp, err := ParseListTimeSeriesRequest_FieldPath(pathStr)
if err != nil {
return nil, err
}
fpaiv, err := gotenobject.ParseFieldPathArrayItemValue(fp, valueStr)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "error parsing ListTimeSeriesRequest field path array item value from %s: %v", valueStr, err)
}
return fpaiv.(ListTimeSeriesRequest_FieldPathArrayItemValue), nil
}
func MustParseListTimeSeriesRequest_FieldPathArrayItemValue(pathStr, valueStr string) ListTimeSeriesRequest_FieldPathArrayItemValue {
fpaiv, err := ParseListTimeSeriesRequest_FieldPathArrayItemValue(pathStr, valueStr)
if err != nil {
panic(err)
}
return fpaiv
}
type ListTimeSeriesRequest_FieldTerminalPathArrayItemValue struct {
ListTimeSeriesRequest_FieldTerminalPath
value interface{}
}
var _ ListTimeSeriesRequest_FieldPathArrayItemValue = (*ListTimeSeriesRequest_FieldTerminalPathArrayItemValue)(nil)
// GetRawValue returns stored element value for array in object ListTimeSeriesRequest as interface{}
func (fpaiv *ListTimeSeriesRequest_FieldTerminalPathArrayItemValue) GetRawItemValue() interface{} {
return fpaiv.value
}
func (fpaiv *ListTimeSeriesRequest_FieldTerminalPathArrayItemValue) GetSingle(source *ListTimeSeriesRequest) (interface{}, bool) {
return nil, false
}
func (fpaiv *ListTimeSeriesRequest_FieldTerminalPathArrayItemValue) GetSingleRaw(source proto.Message) (interface{}, bool) {
return fpaiv.GetSingle(source.(*ListTimeSeriesRequest))
}
// Contains returns a boolean indicating if value that is being held is present in given 'ListTimeSeriesRequest'
func (fpaiv *ListTimeSeriesRequest_FieldTerminalPathArrayItemValue) ContainsValue(source *ListTimeSeriesRequest) bool {
slice := fpaiv.ListTimeSeriesRequest_FieldTerminalPath.Get(source)
for _, v := range slice {
if asProtoMsg, ok := fpaiv.value.(proto.Message); ok {
if proto.Equal(asProtoMsg, v.(proto.Message)) {
return true
}
} else if reflect.DeepEqual(v, fpaiv.value) {
return true
}
}
return false
}
type ListTimeSeriesRequest_FieldSubPathArrayItemValue struct {
ListTimeSeriesRequest_FieldPath
subPathItemValue gotenobject.FieldPathArrayItemValue
}
// GetRawValue returns stored array item value
func (fpaivs *ListTimeSeriesRequest_FieldSubPathArrayItemValue) GetRawItemValue() interface{} {
return fpaivs.subPathItemValue.GetRawItemValue()
}
func (fpaivs *ListTimeSeriesRequest_FieldSubPathArrayItemValue) AsIntervalPathItemValue() (monitoring_common.TimeInterval_FieldPathArrayItemValue, bool) {
res, ok := fpaivs.subPathItemValue.(monitoring_common.TimeInterval_FieldPathArrayItemValue)
return res, ok
}
func (fpaivs *ListTimeSeriesRequest_FieldSubPathArrayItemValue) AsAggregationPathItemValue() (monitoring_common.Aggregation_FieldPathArrayItemValue, bool) {
res, ok := fpaivs.subPathItemValue.(monitoring_common.Aggregation_FieldPathArrayItemValue)
return res, ok
}
// Contains returns a boolean indicating if value that is being held is present in given 'ListTimeSeriesRequest'
func (fpaivs *ListTimeSeriesRequest_FieldSubPathArrayItemValue) ContainsValue(source *ListTimeSeriesRequest) bool {
switch fpaivs.Selector() {
case ListTimeSeriesRequest_FieldPathSelectorInterval:
return fpaivs.subPathItemValue.(monitoring_common.TimeInterval_FieldPathArrayItemValue).ContainsValue(source.GetInterval())
case ListTimeSeriesRequest_FieldPathSelectorAggregation:
return fpaivs.subPathItemValue.(monitoring_common.Aggregation_FieldPathArrayItemValue).ContainsValue(source.GetAggregation())
default:
panic(fmt.Sprintf("Invalid selector for ListTimeSeriesRequest: %d", fpaivs.Selector()))
}
}
// ListTimeSeriesRequest_FieldPathArrayOfValues allows storing slice of values for ListTimeSeriesRequest fields according to their type
type ListTimeSeriesRequest_FieldPathArrayOfValues interface {
gotenobject.FieldPathArrayOfValues
ListTimeSeriesRequest_FieldPath
}
func ParseListTimeSeriesRequest_FieldPathArrayOfValues(pathStr, valuesStr string) (ListTimeSeriesRequest_FieldPathArrayOfValues, error) {
fp, err := ParseListTimeSeriesRequest_FieldPath(pathStr)
if err != nil {
return nil, err
}
fpaov, err := gotenobject.ParseFieldPathArrayOfValues(fp, valuesStr)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "error parsing ListTimeSeriesRequest field path array of values from %s: %v", valuesStr, err)
}
return fpaov.(ListTimeSeriesRequest_FieldPathArrayOfValues), nil
}
func MustParseListTimeSeriesRequest_FieldPathArrayOfValues(pathStr, valuesStr string) ListTimeSeriesRequest_FieldPathArrayOfValues {
fpaov, err := ParseListTimeSeriesRequest_FieldPathArrayOfValues(pathStr, valuesStr)
if err != nil {
panic(err)
}
return fpaov
}
type ListTimeSeriesRequest_FieldTerminalPathArrayOfValues struct {
ListTimeSeriesRequest_FieldTerminalPath
values interface{}
}
var _ ListTimeSeriesRequest_FieldPathArrayOfValues = (*ListTimeSeriesRequest_FieldTerminalPathArrayOfValues)(nil)
func (fpaov *ListTimeSeriesRequest_FieldTerminalPathArrayOfValues) GetRawValues() (values []interface{}) {
switch fpaov.selector {
case ListTimeSeriesRequest_FieldPathSelectorParent:
for _, v := range fpaov.values.([]*project.Name) {
values = append(values, v)
}
case ListTimeSeriesRequest_FieldPathSelectorFilter:
for _, v := range fpaov.values.([]*time_serie.Filter) {
values = append(values, v)
}
case ListTimeSeriesRequest_FieldPathSelectorInterval:
for _, v := range fpaov.values.([]*monitoring_common.TimeInterval) {
values = append(values, v)
}
case ListTimeSeriesRequest_FieldPathSelectorAggregation:
for _, v := range fpaov.values.([]*monitoring_common.Aggregation) {
values = append(values, v)
}
case ListTimeSeriesRequest_FieldPathSelectorOrderBy:
for _, v := range fpaov.values.([]string) {
values = append(values, v)
}
case ListTimeSeriesRequest_FieldPathSelectorView:
for _, v := range fpaov.values.([]monitoring_common.TimeSeriesView) {
values = append(values, v)
}
case ListTimeSeriesRequest_FieldPathSelectorFieldMask:
for _, v := range fpaov.values.([]*time_serie.TimeSerie_FieldMask) {
values = append(values, v)
}
case ListTimeSeriesRequest_FieldPathSelectorPageSize:
for _, v := range fpaov.values.([]int32) {
values = append(values, v)
}
case ListTimeSeriesRequest_FieldPathSelectorPageToken:
for _, v := range fpaov.values.([]string) {
values = append(values, v)
}
}
return
}
func (fpaov *ListTimeSeriesRequest_FieldTerminalPathArrayOfValues) AsParentArrayOfValues() ([]*project.Name, bool) {
res, ok := fpaov.values.([]*project.Name)
return res, ok
}
func (fpaov *ListTimeSeriesRequest_FieldTerminalPathArrayOfValues) AsFilterArrayOfValues() ([]*time_serie.Filter, bool) {
res, ok := fpaov.values.([]*time_serie.Filter)
return res, ok
}
func (fpaov *ListTimeSeriesRequest_FieldTerminalPathArrayOfValues) AsIntervalArrayOfValues() ([]*monitoring_common.TimeInterval, bool) {
res, ok := fpaov.values.([]*monitoring_common.TimeInterval)
return res, ok
}
func (fpaov *ListTimeSeriesRequest_FieldTerminalPathArrayOfValues) AsAggregationArrayOfValues() ([]*monitoring_common.Aggregation, bool) {
res, ok := fpaov.values.([]*monitoring_common.Aggregation)
return res, ok
}
func (fpaov *ListTimeSeriesRequest_FieldTerminalPathArrayOfValues) AsOrderByArrayOfValues() ([]string, bool) {
res, ok := fpaov.values.([]string)
return res, ok
}
func (fpaov *ListTimeSeriesRequest_FieldTerminalPathArrayOfValues) AsViewArrayOfValues() ([]monitoring_common.TimeSeriesView, bool) {
res, ok := fpaov.values.([]monitoring_common.TimeSeriesView)
return res, ok
}
func (fpaov *ListTimeSeriesRequest_FieldTerminalPathArrayOfValues) AsFieldMaskArrayOfValues() ([]*time_serie.TimeSerie_FieldMask, bool) {
res, ok := fpaov.values.([]*time_serie.TimeSerie_FieldMask)
return res, ok
}
func (fpaov *ListTimeSeriesRequest_FieldTerminalPathArrayOfValues) AsPageSizeArrayOfValues() ([]int32, bool) {
res, ok := fpaov.values.([]int32)
return res, ok
}
func (fpaov *ListTimeSeriesRequest_FieldTerminalPathArrayOfValues) AsPageTokenArrayOfValues() ([]string, bool) {
res, ok := fpaov.values.([]string)
return res, ok
}
type ListTimeSeriesRequest_FieldSubPathArrayOfValues struct {
ListTimeSeriesRequest_FieldPath
subPathArrayOfValues gotenobject.FieldPathArrayOfValues
}
var _ ListTimeSeriesRequest_FieldPathArrayOfValues = (*ListTimeSeriesRequest_FieldSubPathArrayOfValues)(nil)
func (fpsaov *ListTimeSeriesRequest_FieldSubPathArrayOfValues) GetRawValues() []interface{} {
return fpsaov.subPathArrayOfValues.GetRawValues()
}