-
Notifications
You must be signed in to change notification settings - Fork 1
/
config_map_service.pb.fieldpath.go
8256 lines (7301 loc) · 337 KB
/
config_map_service.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/applications/proto/v1alpha2/config_map_service.proto
// DO NOT EDIT!!!
package config_map_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 (
config_map "github.com/cloudwan/edgelq-sdk/applications/resources/v1alpha2/config_map"
project "github.com/cloudwan/edgelq-sdk/applications/resources/v1alpha2/project"
view "github.com/cloudwan/goten-sdk/runtime/api/view"
watch_type "github.com/cloudwan/goten-sdk/runtime/api/watch_type"
empty "github.com/golang/protobuf/ptypes/empty"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
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 (
_ = &config_map.ConfigMap{}
_ = &project.Project{}
_ = &empty.Empty{}
_ = &field_mask.FieldMask{}
_ = ×tamp.Timestamp{}
_ = view.View(0)
_ = watch_type.WatchType(0)
)
// FieldPath provides implementation to handle
// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto
type GetConfigMapRequest_FieldPath interface {
gotenobject.FieldPath
Selector() GetConfigMapRequest_FieldPathSelector
Get(source *GetConfigMapRequest) []interface{}
GetSingle(source *GetConfigMapRequest) (interface{}, bool)
ClearValue(item *GetConfigMapRequest)
// Those methods build corresponding GetConfigMapRequest_FieldPathValue
// (or array of values) and holds passed value. Panics if injected type is incorrect.
WithIValue(value interface{}) GetConfigMapRequest_FieldPathValue
WithIArrayOfValues(values interface{}) GetConfigMapRequest_FieldPathArrayOfValues
WithIArrayItemValue(value interface{}) GetConfigMapRequest_FieldPathArrayItemValue
}
type GetConfigMapRequest_FieldPathSelector int32
const (
GetConfigMapRequest_FieldPathSelectorName GetConfigMapRequest_FieldPathSelector = 0
GetConfigMapRequest_FieldPathSelectorFieldMask GetConfigMapRequest_FieldPathSelector = 1
GetConfigMapRequest_FieldPathSelectorView GetConfigMapRequest_FieldPathSelector = 2
)
func (s GetConfigMapRequest_FieldPathSelector) String() string {
switch s {
case GetConfigMapRequest_FieldPathSelectorName:
return "name"
case GetConfigMapRequest_FieldPathSelectorFieldMask:
return "field_mask"
case GetConfigMapRequest_FieldPathSelectorView:
return "view"
default:
panic(fmt.Sprintf("Invalid selector for GetConfigMapRequest: %d", s))
}
}
func BuildGetConfigMapRequest_FieldPath(fp gotenobject.RawFieldPath) (GetConfigMapRequest_FieldPath, error) {
if len(fp) == 0 {
return nil, status.Error(codes.InvalidArgument, "empty field path for object GetConfigMapRequest")
}
if len(fp) == 1 {
switch fp[0] {
case "name":
return &GetConfigMapRequest_FieldTerminalPath{selector: GetConfigMapRequest_FieldPathSelectorName}, nil
case "field_mask", "fieldMask", "field-mask":
return &GetConfigMapRequest_FieldTerminalPath{selector: GetConfigMapRequest_FieldPathSelectorFieldMask}, nil
case "view":
return &GetConfigMapRequest_FieldTerminalPath{selector: GetConfigMapRequest_FieldPathSelectorView}, nil
}
}
return nil, status.Errorf(codes.InvalidArgument, "unknown field path '%s' for object GetConfigMapRequest", fp)
}
func ParseGetConfigMapRequest_FieldPath(rawField string) (GetConfigMapRequest_FieldPath, error) {
fp, err := gotenobject.ParseRawFieldPath(rawField)
if err != nil {
return nil, err
}
return BuildGetConfigMapRequest_FieldPath(fp)
}
func MustParseGetConfigMapRequest_FieldPath(rawField string) GetConfigMapRequest_FieldPath {
fp, err := ParseGetConfigMapRequest_FieldPath(rawField)
if err != nil {
panic(err)
}
return fp
}
type GetConfigMapRequest_FieldTerminalPath struct {
selector GetConfigMapRequest_FieldPathSelector
}
var _ GetConfigMapRequest_FieldPath = (*GetConfigMapRequest_FieldTerminalPath)(nil)
func (fp *GetConfigMapRequest_FieldTerminalPath) Selector() GetConfigMapRequest_FieldPathSelector {
return fp.selector
}
// String returns path representation in proto convention
func (fp *GetConfigMapRequest_FieldTerminalPath) String() string {
return fp.selector.String()
}
// JSONString returns path representation is JSON convention
func (fp *GetConfigMapRequest_FieldTerminalPath) JSONString() string {
return strcase.ToLowerCamel(fp.String())
}
// Get returns all values pointed by specific field from source GetConfigMapRequest
func (fp *GetConfigMapRequest_FieldTerminalPath) Get(source *GetConfigMapRequest) (values []interface{}) {
if source != nil {
switch fp.selector {
case GetConfigMapRequest_FieldPathSelectorName:
if source.Name != nil {
values = append(values, source.Name)
}
case GetConfigMapRequest_FieldPathSelectorFieldMask:
if source.FieldMask != nil {
values = append(values, source.FieldMask)
}
case GetConfigMapRequest_FieldPathSelectorView:
values = append(values, source.View)
default:
panic(fmt.Sprintf("Invalid selector for GetConfigMapRequest: %d", fp.selector))
}
}
return
}
func (fp *GetConfigMapRequest_FieldTerminalPath) GetRaw(source proto.Message) []interface{} {
return fp.Get(source.(*GetConfigMapRequest))
}
// GetSingle returns value pointed by specific field of from source GetConfigMapRequest
func (fp *GetConfigMapRequest_FieldTerminalPath) GetSingle(source *GetConfigMapRequest) (interface{}, bool) {
switch fp.selector {
case GetConfigMapRequest_FieldPathSelectorName:
res := source.GetName()
return res, res != nil
case GetConfigMapRequest_FieldPathSelectorFieldMask:
res := source.GetFieldMask()
return res, res != nil
case GetConfigMapRequest_FieldPathSelectorView:
return source.GetView(), source != nil
default:
panic(fmt.Sprintf("Invalid selector for GetConfigMapRequest: %d", fp.selector))
}
}
func (fp *GetConfigMapRequest_FieldTerminalPath) GetSingleRaw(source proto.Message) (interface{}, bool) {
return fp.GetSingle(source.(*GetConfigMapRequest))
}
// GetDefault returns a default value of the field type
func (fp *GetConfigMapRequest_FieldTerminalPath) GetDefault() interface{} {
switch fp.selector {
case GetConfigMapRequest_FieldPathSelectorName:
return (*config_map.Reference)(nil)
case GetConfigMapRequest_FieldPathSelectorFieldMask:
return (*config_map.ConfigMap_FieldMask)(nil)
case GetConfigMapRequest_FieldPathSelectorView:
return view.View_UNSPECIFIED
default:
panic(fmt.Sprintf("Invalid selector for GetConfigMapRequest: %d", fp.selector))
}
}
func (fp *GetConfigMapRequest_FieldTerminalPath) ClearValue(item *GetConfigMapRequest) {
if item != nil {
switch fp.selector {
case GetConfigMapRequest_FieldPathSelectorName:
item.Name = nil
case GetConfigMapRequest_FieldPathSelectorFieldMask:
item.FieldMask = nil
case GetConfigMapRequest_FieldPathSelectorView:
item.View = view.View_UNSPECIFIED
default:
panic(fmt.Sprintf("Invalid selector for GetConfigMapRequest: %d", fp.selector))
}
}
}
func (fp *GetConfigMapRequest_FieldTerminalPath) ClearValueRaw(item proto.Message) {
fp.ClearValue(item.(*GetConfigMapRequest))
}
// IsLeaf - whether field path is holds simple value
func (fp *GetConfigMapRequest_FieldTerminalPath) IsLeaf() bool {
return fp.selector == GetConfigMapRequest_FieldPathSelectorName ||
fp.selector == GetConfigMapRequest_FieldPathSelectorFieldMask ||
fp.selector == GetConfigMapRequest_FieldPathSelectorView
}
func (fp *GetConfigMapRequest_FieldTerminalPath) SplitIntoTerminalIPaths() []gotenobject.FieldPath {
return []gotenobject.FieldPath{fp}
}
func (fp *GetConfigMapRequest_FieldTerminalPath) WithIValue(value interface{}) GetConfigMapRequest_FieldPathValue {
switch fp.selector {
case GetConfigMapRequest_FieldPathSelectorName:
return &GetConfigMapRequest_FieldTerminalPathValue{GetConfigMapRequest_FieldTerminalPath: *fp, value: value.(*config_map.Reference)}
case GetConfigMapRequest_FieldPathSelectorFieldMask:
return &GetConfigMapRequest_FieldTerminalPathValue{GetConfigMapRequest_FieldTerminalPath: *fp, value: value.(*config_map.ConfigMap_FieldMask)}
case GetConfigMapRequest_FieldPathSelectorView:
return &GetConfigMapRequest_FieldTerminalPathValue{GetConfigMapRequest_FieldTerminalPath: *fp, value: value.(view.View)}
default:
panic(fmt.Sprintf("Invalid selector for GetConfigMapRequest: %d", fp.selector))
}
}
func (fp *GetConfigMapRequest_FieldTerminalPath) WithRawIValue(value interface{}) gotenobject.FieldPathValue {
return fp.WithIValue(value)
}
func (fp *GetConfigMapRequest_FieldTerminalPath) WithIArrayOfValues(values interface{}) GetConfigMapRequest_FieldPathArrayOfValues {
fpaov := &GetConfigMapRequest_FieldTerminalPathArrayOfValues{GetConfigMapRequest_FieldTerminalPath: *fp}
switch fp.selector {
case GetConfigMapRequest_FieldPathSelectorName:
return &GetConfigMapRequest_FieldTerminalPathArrayOfValues{GetConfigMapRequest_FieldTerminalPath: *fp, values: values.([]*config_map.Reference)}
case GetConfigMapRequest_FieldPathSelectorFieldMask:
return &GetConfigMapRequest_FieldTerminalPathArrayOfValues{GetConfigMapRequest_FieldTerminalPath: *fp, values: values.([]*config_map.ConfigMap_FieldMask)}
case GetConfigMapRequest_FieldPathSelectorView:
return &GetConfigMapRequest_FieldTerminalPathArrayOfValues{GetConfigMapRequest_FieldTerminalPath: *fp, values: values.([]view.View)}
default:
panic(fmt.Sprintf("Invalid selector for GetConfigMapRequest: %d", fp.selector))
}
return fpaov
}
func (fp *GetConfigMapRequest_FieldTerminalPath) WithRawIArrayOfValues(values interface{}) gotenobject.FieldPathArrayOfValues {
return fp.WithIArrayOfValues(values)
}
func (fp *GetConfigMapRequest_FieldTerminalPath) WithIArrayItemValue(value interface{}) GetConfigMapRequest_FieldPathArrayItemValue {
switch fp.selector {
default:
panic(fmt.Sprintf("Invalid selector for GetConfigMapRequest: %d", fp.selector))
}
}
func (fp *GetConfigMapRequest_FieldTerminalPath) WithRawIArrayItemValue(value interface{}) gotenobject.FieldPathArrayItemValue {
return fp.WithIArrayItemValue(value)
}
// GetConfigMapRequest_FieldPathValue allows storing values for GetConfigMapRequest fields according to their type
type GetConfigMapRequest_FieldPathValue interface {
GetConfigMapRequest_FieldPath
gotenobject.FieldPathValue
SetTo(target **GetConfigMapRequest)
CompareWith(*GetConfigMapRequest) (cmp int, comparable bool)
}
func ParseGetConfigMapRequest_FieldPathValue(pathStr, valueStr string) (GetConfigMapRequest_FieldPathValue, error) {
fp, err := ParseGetConfigMapRequest_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 GetConfigMapRequest field path value from %s: %v", valueStr, err)
}
return fpv.(GetConfigMapRequest_FieldPathValue), nil
}
func MustParseGetConfigMapRequest_FieldPathValue(pathStr, valueStr string) GetConfigMapRequest_FieldPathValue {
fpv, err := ParseGetConfigMapRequest_FieldPathValue(pathStr, valueStr)
if err != nil {
panic(err)
}
return fpv
}
type GetConfigMapRequest_FieldTerminalPathValue struct {
GetConfigMapRequest_FieldTerminalPath
value interface{}
}
var _ GetConfigMapRequest_FieldPathValue = (*GetConfigMapRequest_FieldTerminalPathValue)(nil)
// GetRawValue returns raw value stored under selected path for 'GetConfigMapRequest' as interface{}
func (fpv *GetConfigMapRequest_FieldTerminalPathValue) GetRawValue() interface{} {
return fpv.value
}
func (fpv *GetConfigMapRequest_FieldTerminalPathValue) AsNameValue() (*config_map.Reference, bool) {
res, ok := fpv.value.(*config_map.Reference)
return res, ok
}
func (fpv *GetConfigMapRequest_FieldTerminalPathValue) AsFieldMaskValue() (*config_map.ConfigMap_FieldMask, bool) {
res, ok := fpv.value.(*config_map.ConfigMap_FieldMask)
return res, ok
}
func (fpv *GetConfigMapRequest_FieldTerminalPathValue) AsViewValue() (view.View, bool) {
res, ok := fpv.value.(view.View)
return res, ok
}
// SetTo stores value for selected field for object GetConfigMapRequest
func (fpv *GetConfigMapRequest_FieldTerminalPathValue) SetTo(target **GetConfigMapRequest) {
if *target == nil {
*target = new(GetConfigMapRequest)
}
switch fpv.selector {
case GetConfigMapRequest_FieldPathSelectorName:
(*target).Name = fpv.value.(*config_map.Reference)
case GetConfigMapRequest_FieldPathSelectorFieldMask:
(*target).FieldMask = fpv.value.(*config_map.ConfigMap_FieldMask)
case GetConfigMapRequest_FieldPathSelectorView:
(*target).View = fpv.value.(view.View)
default:
panic(fmt.Sprintf("Invalid selector for GetConfigMapRequest: %d", fpv.selector))
}
}
func (fpv *GetConfigMapRequest_FieldTerminalPathValue) SetToRaw(target proto.Message) {
typedObject := target.(*GetConfigMapRequest)
fpv.SetTo(&typedObject)
}
// CompareWith compares value in the 'GetConfigMapRequest_FieldTerminalPathValue' with the value under path in 'GetConfigMapRequest'.
func (fpv *GetConfigMapRequest_FieldTerminalPathValue) CompareWith(source *GetConfigMapRequest) (int, bool) {
switch fpv.selector {
case GetConfigMapRequest_FieldPathSelectorName:
leftValue := fpv.value.(*config_map.Reference)
rightValue := source.GetName()
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 GetConfigMapRequest_FieldPathSelectorFieldMask:
return 0, false
case GetConfigMapRequest_FieldPathSelectorView:
leftValue := fpv.value.(view.View)
rightValue := source.GetView()
if (leftValue) == (rightValue) {
return 0, true
} else if (leftValue) < (rightValue) {
return -1, true
} else {
return 1, true
}
default:
panic(fmt.Sprintf("Invalid selector for GetConfigMapRequest: %d", fpv.selector))
}
}
func (fpv *GetConfigMapRequest_FieldTerminalPathValue) CompareWithRaw(source proto.Message) (int, bool) {
return fpv.CompareWith(source.(*GetConfigMapRequest))
}
// GetConfigMapRequest_FieldPathArrayItemValue allows storing single item in Path-specific values for GetConfigMapRequest according to their type
// Present only for array (repeated) types.
type GetConfigMapRequest_FieldPathArrayItemValue interface {
gotenobject.FieldPathArrayItemValue
GetConfigMapRequest_FieldPath
ContainsValue(*GetConfigMapRequest) bool
}
// ParseGetConfigMapRequest_FieldPathArrayItemValue parses string and JSON-encoded value to its Value
func ParseGetConfigMapRequest_FieldPathArrayItemValue(pathStr, valueStr string) (GetConfigMapRequest_FieldPathArrayItemValue, error) {
fp, err := ParseGetConfigMapRequest_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 GetConfigMapRequest field path array item value from %s: %v", valueStr, err)
}
return fpaiv.(GetConfigMapRequest_FieldPathArrayItemValue), nil
}
func MustParseGetConfigMapRequest_FieldPathArrayItemValue(pathStr, valueStr string) GetConfigMapRequest_FieldPathArrayItemValue {
fpaiv, err := ParseGetConfigMapRequest_FieldPathArrayItemValue(pathStr, valueStr)
if err != nil {
panic(err)
}
return fpaiv
}
type GetConfigMapRequest_FieldTerminalPathArrayItemValue struct {
GetConfigMapRequest_FieldTerminalPath
value interface{}
}
var _ GetConfigMapRequest_FieldPathArrayItemValue = (*GetConfigMapRequest_FieldTerminalPathArrayItemValue)(nil)
// GetRawValue returns stored element value for array in object GetConfigMapRequest as interface{}
func (fpaiv *GetConfigMapRequest_FieldTerminalPathArrayItemValue) GetRawItemValue() interface{} {
return fpaiv.value
}
func (fpaiv *GetConfigMapRequest_FieldTerminalPathArrayItemValue) GetSingle(source *GetConfigMapRequest) (interface{}, bool) {
return nil, false
}
func (fpaiv *GetConfigMapRequest_FieldTerminalPathArrayItemValue) GetSingleRaw(source proto.Message) (interface{}, bool) {
return fpaiv.GetSingle(source.(*GetConfigMapRequest))
}
// Contains returns a boolean indicating if value that is being held is present in given 'GetConfigMapRequest'
func (fpaiv *GetConfigMapRequest_FieldTerminalPathArrayItemValue) ContainsValue(source *GetConfigMapRequest) bool {
slice := fpaiv.GetConfigMapRequest_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
}
// GetConfigMapRequest_FieldPathArrayOfValues allows storing slice of values for GetConfigMapRequest fields according to their type
type GetConfigMapRequest_FieldPathArrayOfValues interface {
gotenobject.FieldPathArrayOfValues
GetConfigMapRequest_FieldPath
}
func ParseGetConfigMapRequest_FieldPathArrayOfValues(pathStr, valuesStr string) (GetConfigMapRequest_FieldPathArrayOfValues, error) {
fp, err := ParseGetConfigMapRequest_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 GetConfigMapRequest field path array of values from %s: %v", valuesStr, err)
}
return fpaov.(GetConfigMapRequest_FieldPathArrayOfValues), nil
}
func MustParseGetConfigMapRequest_FieldPathArrayOfValues(pathStr, valuesStr string) GetConfigMapRequest_FieldPathArrayOfValues {
fpaov, err := ParseGetConfigMapRequest_FieldPathArrayOfValues(pathStr, valuesStr)
if err != nil {
panic(err)
}
return fpaov
}
type GetConfigMapRequest_FieldTerminalPathArrayOfValues struct {
GetConfigMapRequest_FieldTerminalPath
values interface{}
}
var _ GetConfigMapRequest_FieldPathArrayOfValues = (*GetConfigMapRequest_FieldTerminalPathArrayOfValues)(nil)
func (fpaov *GetConfigMapRequest_FieldTerminalPathArrayOfValues) GetRawValues() (values []interface{}) {
switch fpaov.selector {
case GetConfigMapRequest_FieldPathSelectorName:
for _, v := range fpaov.values.([]*config_map.Reference) {
values = append(values, v)
}
case GetConfigMapRequest_FieldPathSelectorFieldMask:
for _, v := range fpaov.values.([]*config_map.ConfigMap_FieldMask) {
values = append(values, v)
}
case GetConfigMapRequest_FieldPathSelectorView:
for _, v := range fpaov.values.([]view.View) {
values = append(values, v)
}
}
return
}
func (fpaov *GetConfigMapRequest_FieldTerminalPathArrayOfValues) AsNameArrayOfValues() ([]*config_map.Reference, bool) {
res, ok := fpaov.values.([]*config_map.Reference)
return res, ok
}
func (fpaov *GetConfigMapRequest_FieldTerminalPathArrayOfValues) AsFieldMaskArrayOfValues() ([]*config_map.ConfigMap_FieldMask, bool) {
res, ok := fpaov.values.([]*config_map.ConfigMap_FieldMask)
return res, ok
}
func (fpaov *GetConfigMapRequest_FieldTerminalPathArrayOfValues) AsViewArrayOfValues() ([]view.View, bool) {
res, ok := fpaov.values.([]view.View)
return res, ok
}
// FieldPath provides implementation to handle
// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto
type BatchGetConfigMapsRequest_FieldPath interface {
gotenobject.FieldPath
Selector() BatchGetConfigMapsRequest_FieldPathSelector
Get(source *BatchGetConfigMapsRequest) []interface{}
GetSingle(source *BatchGetConfigMapsRequest) (interface{}, bool)
ClearValue(item *BatchGetConfigMapsRequest)
// Those methods build corresponding BatchGetConfigMapsRequest_FieldPathValue
// (or array of values) and holds passed value. Panics if injected type is incorrect.
WithIValue(value interface{}) BatchGetConfigMapsRequest_FieldPathValue
WithIArrayOfValues(values interface{}) BatchGetConfigMapsRequest_FieldPathArrayOfValues
WithIArrayItemValue(value interface{}) BatchGetConfigMapsRequest_FieldPathArrayItemValue
}
type BatchGetConfigMapsRequest_FieldPathSelector int32
const (
BatchGetConfigMapsRequest_FieldPathSelectorNames BatchGetConfigMapsRequest_FieldPathSelector = 0
BatchGetConfigMapsRequest_FieldPathSelectorFieldMask BatchGetConfigMapsRequest_FieldPathSelector = 1
BatchGetConfigMapsRequest_FieldPathSelectorView BatchGetConfigMapsRequest_FieldPathSelector = 2
)
func (s BatchGetConfigMapsRequest_FieldPathSelector) String() string {
switch s {
case BatchGetConfigMapsRequest_FieldPathSelectorNames:
return "names"
case BatchGetConfigMapsRequest_FieldPathSelectorFieldMask:
return "field_mask"
case BatchGetConfigMapsRequest_FieldPathSelectorView:
return "view"
default:
panic(fmt.Sprintf("Invalid selector for BatchGetConfigMapsRequest: %d", s))
}
}
func BuildBatchGetConfigMapsRequest_FieldPath(fp gotenobject.RawFieldPath) (BatchGetConfigMapsRequest_FieldPath, error) {
if len(fp) == 0 {
return nil, status.Error(codes.InvalidArgument, "empty field path for object BatchGetConfigMapsRequest")
}
if len(fp) == 1 {
switch fp[0] {
case "names":
return &BatchGetConfigMapsRequest_FieldTerminalPath{selector: BatchGetConfigMapsRequest_FieldPathSelectorNames}, nil
case "field_mask", "fieldMask", "field-mask":
return &BatchGetConfigMapsRequest_FieldTerminalPath{selector: BatchGetConfigMapsRequest_FieldPathSelectorFieldMask}, nil
case "view":
return &BatchGetConfigMapsRequest_FieldTerminalPath{selector: BatchGetConfigMapsRequest_FieldPathSelectorView}, nil
}
}
return nil, status.Errorf(codes.InvalidArgument, "unknown field path '%s' for object BatchGetConfigMapsRequest", fp)
}
func ParseBatchGetConfigMapsRequest_FieldPath(rawField string) (BatchGetConfigMapsRequest_FieldPath, error) {
fp, err := gotenobject.ParseRawFieldPath(rawField)
if err != nil {
return nil, err
}
return BuildBatchGetConfigMapsRequest_FieldPath(fp)
}
func MustParseBatchGetConfigMapsRequest_FieldPath(rawField string) BatchGetConfigMapsRequest_FieldPath {
fp, err := ParseBatchGetConfigMapsRequest_FieldPath(rawField)
if err != nil {
panic(err)
}
return fp
}
type BatchGetConfigMapsRequest_FieldTerminalPath struct {
selector BatchGetConfigMapsRequest_FieldPathSelector
}
var _ BatchGetConfigMapsRequest_FieldPath = (*BatchGetConfigMapsRequest_FieldTerminalPath)(nil)
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) Selector() BatchGetConfigMapsRequest_FieldPathSelector {
return fp.selector
}
// String returns path representation in proto convention
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) String() string {
return fp.selector.String()
}
// JSONString returns path representation is JSON convention
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) JSONString() string {
return strcase.ToLowerCamel(fp.String())
}
// Get returns all values pointed by specific field from source BatchGetConfigMapsRequest
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) Get(source *BatchGetConfigMapsRequest) (values []interface{}) {
if source != nil {
switch fp.selector {
case BatchGetConfigMapsRequest_FieldPathSelectorNames:
for _, value := range source.GetNames() {
values = append(values, value)
}
case BatchGetConfigMapsRequest_FieldPathSelectorFieldMask:
if source.FieldMask != nil {
values = append(values, source.FieldMask)
}
case BatchGetConfigMapsRequest_FieldPathSelectorView:
values = append(values, source.View)
default:
panic(fmt.Sprintf("Invalid selector for BatchGetConfigMapsRequest: %d", fp.selector))
}
}
return
}
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) GetRaw(source proto.Message) []interface{} {
return fp.Get(source.(*BatchGetConfigMapsRequest))
}
// GetSingle returns value pointed by specific field of from source BatchGetConfigMapsRequest
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) GetSingle(source *BatchGetConfigMapsRequest) (interface{}, bool) {
switch fp.selector {
case BatchGetConfigMapsRequest_FieldPathSelectorNames:
res := source.GetNames()
return res, res != nil
case BatchGetConfigMapsRequest_FieldPathSelectorFieldMask:
res := source.GetFieldMask()
return res, res != nil
case BatchGetConfigMapsRequest_FieldPathSelectorView:
return source.GetView(), source != nil
default:
panic(fmt.Sprintf("Invalid selector for BatchGetConfigMapsRequest: %d", fp.selector))
}
}
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) GetSingleRaw(source proto.Message) (interface{}, bool) {
return fp.GetSingle(source.(*BatchGetConfigMapsRequest))
}
// GetDefault returns a default value of the field type
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) GetDefault() interface{} {
switch fp.selector {
case BatchGetConfigMapsRequest_FieldPathSelectorNames:
return ([]*config_map.Reference)(nil)
case BatchGetConfigMapsRequest_FieldPathSelectorFieldMask:
return (*config_map.ConfigMap_FieldMask)(nil)
case BatchGetConfigMapsRequest_FieldPathSelectorView:
return view.View_UNSPECIFIED
default:
panic(fmt.Sprintf("Invalid selector for BatchGetConfigMapsRequest: %d", fp.selector))
}
}
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) ClearValue(item *BatchGetConfigMapsRequest) {
if item != nil {
switch fp.selector {
case BatchGetConfigMapsRequest_FieldPathSelectorNames:
item.Names = nil
case BatchGetConfigMapsRequest_FieldPathSelectorFieldMask:
item.FieldMask = nil
case BatchGetConfigMapsRequest_FieldPathSelectorView:
item.View = view.View_UNSPECIFIED
default:
panic(fmt.Sprintf("Invalid selector for BatchGetConfigMapsRequest: %d", fp.selector))
}
}
}
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) ClearValueRaw(item proto.Message) {
fp.ClearValue(item.(*BatchGetConfigMapsRequest))
}
// IsLeaf - whether field path is holds simple value
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) IsLeaf() bool {
return fp.selector == BatchGetConfigMapsRequest_FieldPathSelectorNames ||
fp.selector == BatchGetConfigMapsRequest_FieldPathSelectorFieldMask ||
fp.selector == BatchGetConfigMapsRequest_FieldPathSelectorView
}
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) SplitIntoTerminalIPaths() []gotenobject.FieldPath {
return []gotenobject.FieldPath{fp}
}
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) WithIValue(value interface{}) BatchGetConfigMapsRequest_FieldPathValue {
switch fp.selector {
case BatchGetConfigMapsRequest_FieldPathSelectorNames:
return &BatchGetConfigMapsRequest_FieldTerminalPathValue{BatchGetConfigMapsRequest_FieldTerminalPath: *fp, value: value.([]*config_map.Reference)}
case BatchGetConfigMapsRequest_FieldPathSelectorFieldMask:
return &BatchGetConfigMapsRequest_FieldTerminalPathValue{BatchGetConfigMapsRequest_FieldTerminalPath: *fp, value: value.(*config_map.ConfigMap_FieldMask)}
case BatchGetConfigMapsRequest_FieldPathSelectorView:
return &BatchGetConfigMapsRequest_FieldTerminalPathValue{BatchGetConfigMapsRequest_FieldTerminalPath: *fp, value: value.(view.View)}
default:
panic(fmt.Sprintf("Invalid selector for BatchGetConfigMapsRequest: %d", fp.selector))
}
}
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) WithRawIValue(value interface{}) gotenobject.FieldPathValue {
return fp.WithIValue(value)
}
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) WithIArrayOfValues(values interface{}) BatchGetConfigMapsRequest_FieldPathArrayOfValues {
fpaov := &BatchGetConfigMapsRequest_FieldTerminalPathArrayOfValues{BatchGetConfigMapsRequest_FieldTerminalPath: *fp}
switch fp.selector {
case BatchGetConfigMapsRequest_FieldPathSelectorNames:
return &BatchGetConfigMapsRequest_FieldTerminalPathArrayOfValues{BatchGetConfigMapsRequest_FieldTerminalPath: *fp, values: values.([][]*config_map.Reference)}
case BatchGetConfigMapsRequest_FieldPathSelectorFieldMask:
return &BatchGetConfigMapsRequest_FieldTerminalPathArrayOfValues{BatchGetConfigMapsRequest_FieldTerminalPath: *fp, values: values.([]*config_map.ConfigMap_FieldMask)}
case BatchGetConfigMapsRequest_FieldPathSelectorView:
return &BatchGetConfigMapsRequest_FieldTerminalPathArrayOfValues{BatchGetConfigMapsRequest_FieldTerminalPath: *fp, values: values.([]view.View)}
default:
panic(fmt.Sprintf("Invalid selector for BatchGetConfigMapsRequest: %d", fp.selector))
}
return fpaov
}
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) WithRawIArrayOfValues(values interface{}) gotenobject.FieldPathArrayOfValues {
return fp.WithIArrayOfValues(values)
}
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) WithIArrayItemValue(value interface{}) BatchGetConfigMapsRequest_FieldPathArrayItemValue {
switch fp.selector {
case BatchGetConfigMapsRequest_FieldPathSelectorNames:
return &BatchGetConfigMapsRequest_FieldTerminalPathArrayItemValue{BatchGetConfigMapsRequest_FieldTerminalPath: *fp, value: value.(*config_map.Reference)}
default:
panic(fmt.Sprintf("Invalid selector for BatchGetConfigMapsRequest: %d", fp.selector))
}
}
func (fp *BatchGetConfigMapsRequest_FieldTerminalPath) WithRawIArrayItemValue(value interface{}) gotenobject.FieldPathArrayItemValue {
return fp.WithIArrayItemValue(value)
}
// BatchGetConfigMapsRequest_FieldPathValue allows storing values for BatchGetConfigMapsRequest fields according to their type
type BatchGetConfigMapsRequest_FieldPathValue interface {
BatchGetConfigMapsRequest_FieldPath
gotenobject.FieldPathValue
SetTo(target **BatchGetConfigMapsRequest)
CompareWith(*BatchGetConfigMapsRequest) (cmp int, comparable bool)
}
func ParseBatchGetConfigMapsRequest_FieldPathValue(pathStr, valueStr string) (BatchGetConfigMapsRequest_FieldPathValue, error) {
fp, err := ParseBatchGetConfigMapsRequest_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 BatchGetConfigMapsRequest field path value from %s: %v", valueStr, err)
}
return fpv.(BatchGetConfigMapsRequest_FieldPathValue), nil
}
func MustParseBatchGetConfigMapsRequest_FieldPathValue(pathStr, valueStr string) BatchGetConfigMapsRequest_FieldPathValue {
fpv, err := ParseBatchGetConfigMapsRequest_FieldPathValue(pathStr, valueStr)
if err != nil {
panic(err)
}
return fpv
}
type BatchGetConfigMapsRequest_FieldTerminalPathValue struct {
BatchGetConfigMapsRequest_FieldTerminalPath
value interface{}
}
var _ BatchGetConfigMapsRequest_FieldPathValue = (*BatchGetConfigMapsRequest_FieldTerminalPathValue)(nil)
// GetRawValue returns raw value stored under selected path for 'BatchGetConfigMapsRequest' as interface{}
func (fpv *BatchGetConfigMapsRequest_FieldTerminalPathValue) GetRawValue() interface{} {
return fpv.value
}
func (fpv *BatchGetConfigMapsRequest_FieldTerminalPathValue) AsNamesValue() ([]*config_map.Reference, bool) {
res, ok := fpv.value.([]*config_map.Reference)
return res, ok
}
func (fpv *BatchGetConfigMapsRequest_FieldTerminalPathValue) AsFieldMaskValue() (*config_map.ConfigMap_FieldMask, bool) {
res, ok := fpv.value.(*config_map.ConfigMap_FieldMask)
return res, ok
}
func (fpv *BatchGetConfigMapsRequest_FieldTerminalPathValue) AsViewValue() (view.View, bool) {
res, ok := fpv.value.(view.View)
return res, ok
}
// SetTo stores value for selected field for object BatchGetConfigMapsRequest
func (fpv *BatchGetConfigMapsRequest_FieldTerminalPathValue) SetTo(target **BatchGetConfigMapsRequest) {
if *target == nil {
*target = new(BatchGetConfigMapsRequest)
}
switch fpv.selector {
case BatchGetConfigMapsRequest_FieldPathSelectorNames:
(*target).Names = fpv.value.([]*config_map.Reference)
case BatchGetConfigMapsRequest_FieldPathSelectorFieldMask:
(*target).FieldMask = fpv.value.(*config_map.ConfigMap_FieldMask)
case BatchGetConfigMapsRequest_FieldPathSelectorView:
(*target).View = fpv.value.(view.View)
default:
panic(fmt.Sprintf("Invalid selector for BatchGetConfigMapsRequest: %d", fpv.selector))
}
}
func (fpv *BatchGetConfigMapsRequest_FieldTerminalPathValue) SetToRaw(target proto.Message) {
typedObject := target.(*BatchGetConfigMapsRequest)
fpv.SetTo(&typedObject)
}
// CompareWith compares value in the 'BatchGetConfigMapsRequest_FieldTerminalPathValue' with the value under path in 'BatchGetConfigMapsRequest'.
func (fpv *BatchGetConfigMapsRequest_FieldTerminalPathValue) CompareWith(source *BatchGetConfigMapsRequest) (int, bool) {
switch fpv.selector {
case BatchGetConfigMapsRequest_FieldPathSelectorNames:
return 0, false
case BatchGetConfigMapsRequest_FieldPathSelectorFieldMask:
return 0, false
case BatchGetConfigMapsRequest_FieldPathSelectorView:
leftValue := fpv.value.(view.View)
rightValue := source.GetView()
if (leftValue) == (rightValue) {
return 0, true
} else if (leftValue) < (rightValue) {
return -1, true
} else {
return 1, true
}
default:
panic(fmt.Sprintf("Invalid selector for BatchGetConfigMapsRequest: %d", fpv.selector))
}
}
func (fpv *BatchGetConfigMapsRequest_FieldTerminalPathValue) CompareWithRaw(source proto.Message) (int, bool) {
return fpv.CompareWith(source.(*BatchGetConfigMapsRequest))
}
// BatchGetConfigMapsRequest_FieldPathArrayItemValue allows storing single item in Path-specific values for BatchGetConfigMapsRequest according to their type
// Present only for array (repeated) types.
type BatchGetConfigMapsRequest_FieldPathArrayItemValue interface {
gotenobject.FieldPathArrayItemValue
BatchGetConfigMapsRequest_FieldPath
ContainsValue(*BatchGetConfigMapsRequest) bool
}
// ParseBatchGetConfigMapsRequest_FieldPathArrayItemValue parses string and JSON-encoded value to its Value
func ParseBatchGetConfigMapsRequest_FieldPathArrayItemValue(pathStr, valueStr string) (BatchGetConfigMapsRequest_FieldPathArrayItemValue, error) {
fp, err := ParseBatchGetConfigMapsRequest_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 BatchGetConfigMapsRequest field path array item value from %s: %v", valueStr, err)
}
return fpaiv.(BatchGetConfigMapsRequest_FieldPathArrayItemValue), nil
}
func MustParseBatchGetConfigMapsRequest_FieldPathArrayItemValue(pathStr, valueStr string) BatchGetConfigMapsRequest_FieldPathArrayItemValue {
fpaiv, err := ParseBatchGetConfigMapsRequest_FieldPathArrayItemValue(pathStr, valueStr)
if err != nil {
panic(err)
}
return fpaiv
}
type BatchGetConfigMapsRequest_FieldTerminalPathArrayItemValue struct {
BatchGetConfigMapsRequest_FieldTerminalPath
value interface{}
}
var _ BatchGetConfigMapsRequest_FieldPathArrayItemValue = (*BatchGetConfigMapsRequest_FieldTerminalPathArrayItemValue)(nil)
// GetRawValue returns stored element value for array in object BatchGetConfigMapsRequest as interface{}
func (fpaiv *BatchGetConfigMapsRequest_FieldTerminalPathArrayItemValue) GetRawItemValue() interface{} {
return fpaiv.value
}
func (fpaiv *BatchGetConfigMapsRequest_FieldTerminalPathArrayItemValue) AsNamesItemValue() (*config_map.Reference, bool) {
res, ok := fpaiv.value.(*config_map.Reference)
return res, ok
}
func (fpaiv *BatchGetConfigMapsRequest_FieldTerminalPathArrayItemValue) GetSingle(source *BatchGetConfigMapsRequest) (interface{}, bool) {
return nil, false
}
func (fpaiv *BatchGetConfigMapsRequest_FieldTerminalPathArrayItemValue) GetSingleRaw(source proto.Message) (interface{}, bool) {
return fpaiv.GetSingle(source.(*BatchGetConfigMapsRequest))
}
// Contains returns a boolean indicating if value that is being held is present in given 'BatchGetConfigMapsRequest'
func (fpaiv *BatchGetConfigMapsRequest_FieldTerminalPathArrayItemValue) ContainsValue(source *BatchGetConfigMapsRequest) bool {
slice := fpaiv.BatchGetConfigMapsRequest_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
}
// BatchGetConfigMapsRequest_FieldPathArrayOfValues allows storing slice of values for BatchGetConfigMapsRequest fields according to their type
type BatchGetConfigMapsRequest_FieldPathArrayOfValues interface {
gotenobject.FieldPathArrayOfValues
BatchGetConfigMapsRequest_FieldPath
}
func ParseBatchGetConfigMapsRequest_FieldPathArrayOfValues(pathStr, valuesStr string) (BatchGetConfigMapsRequest_FieldPathArrayOfValues, error) {
fp, err := ParseBatchGetConfigMapsRequest_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 BatchGetConfigMapsRequest field path array of values from %s: %v", valuesStr, err)
}
return fpaov.(BatchGetConfigMapsRequest_FieldPathArrayOfValues), nil
}
func MustParseBatchGetConfigMapsRequest_FieldPathArrayOfValues(pathStr, valuesStr string) BatchGetConfigMapsRequest_FieldPathArrayOfValues {
fpaov, err := ParseBatchGetConfigMapsRequest_FieldPathArrayOfValues(pathStr, valuesStr)
if err != nil {
panic(err)
}
return fpaov
}
type BatchGetConfigMapsRequest_FieldTerminalPathArrayOfValues struct {
BatchGetConfigMapsRequest_FieldTerminalPath
values interface{}
}
var _ BatchGetConfigMapsRequest_FieldPathArrayOfValues = (*BatchGetConfigMapsRequest_FieldTerminalPathArrayOfValues)(nil)
func (fpaov *BatchGetConfigMapsRequest_FieldTerminalPathArrayOfValues) GetRawValues() (values []interface{}) {
switch fpaov.selector {
case BatchGetConfigMapsRequest_FieldPathSelectorNames:
for _, v := range fpaov.values.([][]*config_map.Reference) {
values = append(values, v)
}
case BatchGetConfigMapsRequest_FieldPathSelectorFieldMask:
for _, v := range fpaov.values.([]*config_map.ConfigMap_FieldMask) {
values = append(values, v)
}
case BatchGetConfigMapsRequest_FieldPathSelectorView:
for _, v := range fpaov.values.([]view.View) {
values = append(values, v)
}
}
return
}
func (fpaov *BatchGetConfigMapsRequest_FieldTerminalPathArrayOfValues) AsNamesArrayOfValues() ([][]*config_map.Reference, bool) {
res, ok := fpaov.values.([][]*config_map.Reference)
return res, ok
}
func (fpaov *BatchGetConfigMapsRequest_FieldTerminalPathArrayOfValues) AsFieldMaskArrayOfValues() ([]*config_map.ConfigMap_FieldMask, bool) {
res, ok := fpaov.values.([]*config_map.ConfigMap_FieldMask)
return res, ok
}
func (fpaov *BatchGetConfigMapsRequest_FieldTerminalPathArrayOfValues) AsViewArrayOfValues() ([]view.View, bool) {
res, ok := fpaov.values.([]view.View)
return res, ok
}
// FieldPath provides implementation to handle
// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto
type BatchGetConfigMapsResponse_FieldPath interface {
gotenobject.FieldPath
Selector() BatchGetConfigMapsResponse_FieldPathSelector
Get(source *BatchGetConfigMapsResponse) []interface{}