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 package drivelabels
57
58 import (
59 "bytes"
60 "context"
61 "encoding/json"
62 "errors"
63 "fmt"
64 "io"
65 "net/http"
66 "net/url"
67 "strconv"
68 "strings"
69
70 googleapi "google.golang.org/api/googleapi"
71 internal "google.golang.org/api/internal"
72 gensupport "google.golang.org/api/internal/gensupport"
73 option "google.golang.org/api/option"
74 internaloption "google.golang.org/api/option/internaloption"
75 htransport "google.golang.org/api/transport/http"
76 )
77
78
79
80 var _ = bytes.NewBuffer
81 var _ = strconv.Itoa
82 var _ = fmt.Sprintf
83 var _ = json.NewDecoder
84 var _ = io.Copy
85 var _ = url.Parse
86 var _ = gensupport.MarshalJSON
87 var _ = googleapi.Version
88 var _ = errors.New
89 var _ = strings.Replace
90 var _ = context.Canceled
91 var _ = internaloption.WithDefaultEndpoint
92 var _ = internal.Version
93
94 const apiId = "drivelabels:v2"
95 const apiName = "drivelabels"
96 const apiVersion = "v2"
97 const basePath = "https://drivelabels.googleapis.com/"
98 const basePathTemplate = "https://drivelabels.UNIVERSE_DOMAIN/"
99 const mtlsBasePath = "https://drivelabels.mtls.googleapis.com/"
100
101
102 const (
103
104
105 DriveAdminLabelsScope = "https://www.googleapis.com/auth/drive.admin.labels"
106
107
108
109 DriveAdminLabelsReadonlyScope = "https://www.googleapis.com/auth/drive.admin.labels.readonly"
110
111
112 DriveLabelsScope = "https://www.googleapis.com/auth/drive.labels"
113
114
115 DriveLabelsReadonlyScope = "https://www.googleapis.com/auth/drive.labels.readonly"
116 )
117
118
119 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
120 scopesOption := internaloption.WithDefaultScopes(
121 "https://www.googleapis.com/auth/drive.admin.labels",
122 "https://www.googleapis.com/auth/drive.admin.labels.readonly",
123 "https://www.googleapis.com/auth/drive.labels",
124 "https://www.googleapis.com/auth/drive.labels.readonly",
125 )
126
127 opts = append([]option.ClientOption{scopesOption}, opts...)
128 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
129 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
130 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
131 opts = append(opts, internaloption.EnableNewAuthLibrary())
132 client, endpoint, err := htransport.NewClient(ctx, opts...)
133 if err != nil {
134 return nil, err
135 }
136 s, err := New(client)
137 if err != nil {
138 return nil, err
139 }
140 if endpoint != "" {
141 s.BasePath = endpoint
142 }
143 return s, nil
144 }
145
146
147
148
149
150
151 func New(client *http.Client) (*Service, error) {
152 if client == nil {
153 return nil, errors.New("client is nil")
154 }
155 s := &Service{client: client, BasePath: basePath}
156 s.Labels = NewLabelsService(s)
157 s.Limits = NewLimitsService(s)
158 s.Users = NewUsersService(s)
159 return s, nil
160 }
161
162 type Service struct {
163 client *http.Client
164 BasePath string
165 UserAgent string
166
167 Labels *LabelsService
168
169 Limits *LimitsService
170
171 Users *UsersService
172 }
173
174 func (s *Service) userAgent() string {
175 if s.UserAgent == "" {
176 return googleapi.UserAgent
177 }
178 return googleapi.UserAgent + " " + s.UserAgent
179 }
180
181 func NewLabelsService(s *Service) *LabelsService {
182 rs := &LabelsService{s: s}
183 rs.Locks = NewLabelsLocksService(s)
184 rs.Permissions = NewLabelsPermissionsService(s)
185 rs.Revisions = NewLabelsRevisionsService(s)
186 return rs
187 }
188
189 type LabelsService struct {
190 s *Service
191
192 Locks *LabelsLocksService
193
194 Permissions *LabelsPermissionsService
195
196 Revisions *LabelsRevisionsService
197 }
198
199 func NewLabelsLocksService(s *Service) *LabelsLocksService {
200 rs := &LabelsLocksService{s: s}
201 return rs
202 }
203
204 type LabelsLocksService struct {
205 s *Service
206 }
207
208 func NewLabelsPermissionsService(s *Service) *LabelsPermissionsService {
209 rs := &LabelsPermissionsService{s: s}
210 return rs
211 }
212
213 type LabelsPermissionsService struct {
214 s *Service
215 }
216
217 func NewLabelsRevisionsService(s *Service) *LabelsRevisionsService {
218 rs := &LabelsRevisionsService{s: s}
219 rs.Locks = NewLabelsRevisionsLocksService(s)
220 rs.Permissions = NewLabelsRevisionsPermissionsService(s)
221 return rs
222 }
223
224 type LabelsRevisionsService struct {
225 s *Service
226
227 Locks *LabelsRevisionsLocksService
228
229 Permissions *LabelsRevisionsPermissionsService
230 }
231
232 func NewLabelsRevisionsLocksService(s *Service) *LabelsRevisionsLocksService {
233 rs := &LabelsRevisionsLocksService{s: s}
234 return rs
235 }
236
237 type LabelsRevisionsLocksService struct {
238 s *Service
239 }
240
241 func NewLabelsRevisionsPermissionsService(s *Service) *LabelsRevisionsPermissionsService {
242 rs := &LabelsRevisionsPermissionsService{s: s}
243 return rs
244 }
245
246 type LabelsRevisionsPermissionsService struct {
247 s *Service
248 }
249
250 func NewLimitsService(s *Service) *LimitsService {
251 rs := &LimitsService{s: s}
252 return rs
253 }
254
255 type LimitsService struct {
256 s *Service
257 }
258
259 func NewUsersService(s *Service) *UsersService {
260 rs := &UsersService{s: s}
261 return rs
262 }
263
264 type UsersService struct {
265 s *Service
266 }
267
268
269
270 type GoogleAppsDriveLabelsV2BadgeColors struct {
271
272
273 BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"`
274
275
276 ForegroundColor *GoogleTypeColor `json:"foregroundColor,omitempty"`
277
278
279 SoloColor *GoogleTypeColor `json:"soloColor,omitempty"`
280
281
282
283
284
285 ForceSendFields []string `json:"-"`
286
287
288
289
290 NullFields []string `json:"-"`
291 }
292
293 func (s *GoogleAppsDriveLabelsV2BadgeColors) MarshalJSON() ([]byte, error) {
294 type NoMethod GoogleAppsDriveLabelsV2BadgeColors
295 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
296 }
297
298
299 type GoogleAppsDriveLabelsV2BadgeConfig struct {
300
301
302
303 Color *GoogleTypeColor `json:"color,omitempty"`
304
305
306 PriorityOverride int64 `json:"priorityOverride,omitempty,string"`
307
308
309
310
311
312 ForceSendFields []string `json:"-"`
313
314
315
316
317 NullFields []string `json:"-"`
318 }
319
320 func (s *GoogleAppsDriveLabelsV2BadgeConfig) MarshalJSON() ([]byte, error) {
321 type NoMethod GoogleAppsDriveLabelsV2BadgeConfig
322 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
323 }
324
325
326
327 type GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest struct {
328
329 Requests []*GoogleAppsDriveLabelsV2DeleteLabelPermissionRequest `json:"requests,omitempty"`
330
331
332
333
334
335 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
336
337
338
339
340
341 ForceSendFields []string `json:"-"`
342
343
344
345
346 NullFields []string `json:"-"`
347 }
348
349 func (s *GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest) MarshalJSON() ([]byte, error) {
350 type NoMethod GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest
351 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
352 }
353
354
355
356 type GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest struct {
357
358 Requests []*GoogleAppsDriveLabelsV2UpdateLabelPermissionRequest `json:"requests,omitempty"`
359
360
361
362
363
364 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
365
366
367
368
369
370 ForceSendFields []string `json:"-"`
371
372
373
374
375 NullFields []string `json:"-"`
376 }
377
378 func (s *GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest) MarshalJSON() ([]byte, error) {
379 type NoMethod GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest
380 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
381 }
382
383
384
385 type GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse struct {
386
387 Permissions []*GoogleAppsDriveLabelsV2LabelPermission `json:"permissions,omitempty"`
388
389
390 googleapi.ServerResponse `json:"-"`
391
392
393
394
395
396 ForceSendFields []string `json:"-"`
397
398
399
400
401 NullFields []string `json:"-"`
402 }
403
404 func (s *GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse) MarshalJSON() ([]byte, error) {
405 type NoMethod GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse
406 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
407 }
408
409
410 type GoogleAppsDriveLabelsV2DateLimits struct {
411
412 MaxValue *GoogleTypeDate `json:"maxValue,omitempty"`
413
414 MinValue *GoogleTypeDate `json:"minValue,omitempty"`
415
416
417
418
419
420 ForceSendFields []string `json:"-"`
421
422
423
424
425 NullFields []string `json:"-"`
426 }
427
428 func (s *GoogleAppsDriveLabelsV2DateLimits) MarshalJSON() ([]byte, error) {
429 type NoMethod GoogleAppsDriveLabelsV2DateLimits
430 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
431 }
432
433
434
435
436 type GoogleAppsDriveLabelsV2DeleteLabelPermissionRequest struct {
437
438 Name string `json:"name,omitempty"`
439
440
441
442 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
443
444
445
446
447
448 ForceSendFields []string `json:"-"`
449
450
451
452
453 NullFields []string `json:"-"`
454 }
455
456 func (s *GoogleAppsDriveLabelsV2DeleteLabelPermissionRequest) MarshalJSON() ([]byte, error) {
457 type NoMethod GoogleAppsDriveLabelsV2DeleteLabelPermissionRequest
458 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
459 }
460
461
462
463
464 type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest struct {
465
466
467 LanguageCode string `json:"languageCode,omitempty"`
468
469
470 Requests []*GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestRequest `json:"requests,omitempty"`
471
472
473
474 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
475
476
477
478
479
480
481
482 View string `json:"view,omitempty"`
483
484 WriteControl *GoogleAppsDriveLabelsV2WriteControl `json:"writeControl,omitempty"`
485
486
487
488
489
490 ForceSendFields []string `json:"-"`
491
492
493
494
495 NullFields []string `json:"-"`
496 }
497
498 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest) MarshalJSON() ([]byte, error) {
499 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest
500 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
501 }
502
503
504
505 type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateFieldRequest struct {
506
507 Field *GoogleAppsDriveLabelsV2Field `json:"field,omitempty"`
508
509
510
511
512
513 ForceSendFields []string `json:"-"`
514
515
516
517
518 NullFields []string `json:"-"`
519 }
520
521 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateFieldRequest) MarshalJSON() ([]byte, error) {
522 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateFieldRequest
523 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
524 }
525
526
527
528 type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateSelectionChoiceRequest struct {
529
530 Choice *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice `json:"choice,omitempty"`
531
532 FieldId string `json:"fieldId,omitempty"`
533
534
535
536
537
538 ForceSendFields []string `json:"-"`
539
540
541
542
543 NullFields []string `json:"-"`
544 }
545
546 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateSelectionChoiceRequest) MarshalJSON() ([]byte, error) {
547 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateSelectionChoiceRequest
548 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
549 }
550
551
552
553 type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteFieldRequest struct {
554
555 Id string `json:"id,omitempty"`
556
557
558
559
560
561 ForceSendFields []string `json:"-"`
562
563
564
565
566 NullFields []string `json:"-"`
567 }
568
569 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteFieldRequest) MarshalJSON() ([]byte, error) {
570 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteFieldRequest
571 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
572 }
573
574
575
576 type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteSelectionChoiceRequest struct {
577
578 FieldId string `json:"fieldId,omitempty"`
579
580 Id string `json:"id,omitempty"`
581
582
583
584
585
586 ForceSendFields []string `json:"-"`
587
588
589
590
591 NullFields []string `json:"-"`
592 }
593
594 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteSelectionChoiceRequest) MarshalJSON() ([]byte, error) {
595 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteSelectionChoiceRequest
596 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
597 }
598
599
600
601 type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableFieldRequest struct {
602
603 DisabledPolicy *GoogleAppsDriveLabelsV2LifecycleDisabledPolicy `json:"disabledPolicy,omitempty"`
604
605 Id string `json:"id,omitempty"`
606
607
608
609 UpdateMask string `json:"updateMask,omitempty"`
610
611
612
613
614
615 ForceSendFields []string `json:"-"`
616
617
618
619
620 NullFields []string `json:"-"`
621 }
622
623 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableFieldRequest) MarshalJSON() ([]byte, error) {
624 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableFieldRequest
625 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
626 }
627
628
629
630 type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableSelectionChoiceRequest struct {
631
632 DisabledPolicy *GoogleAppsDriveLabelsV2LifecycleDisabledPolicy `json:"disabledPolicy,omitempty"`
633
634 FieldId string `json:"fieldId,omitempty"`
635
636 Id string `json:"id,omitempty"`
637
638
639
640 UpdateMask string `json:"updateMask,omitempty"`
641
642
643
644
645
646 ForceSendFields []string `json:"-"`
647
648
649
650
651 NullFields []string `json:"-"`
652 }
653
654 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableSelectionChoiceRequest) MarshalJSON() ([]byte, error) {
655 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableSelectionChoiceRequest
656 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
657 }
658
659
660
661 type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableFieldRequest struct {
662
663 Id string `json:"id,omitempty"`
664
665
666
667
668
669 ForceSendFields []string `json:"-"`
670
671
672
673
674 NullFields []string `json:"-"`
675 }
676
677 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableFieldRequest) MarshalJSON() ([]byte, error) {
678 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableFieldRequest
679 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
680 }
681
682
683
684 type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableSelectionChoiceRequest struct {
685
686 FieldId string `json:"fieldId,omitempty"`
687
688 Id string `json:"id,omitempty"`
689
690
691
692
693
694 ForceSendFields []string `json:"-"`
695
696
697
698
699 NullFields []string `json:"-"`
700 }
701
702 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableSelectionChoiceRequest) MarshalJSON() ([]byte, error) {
703 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableSelectionChoiceRequest
704 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
705 }
706
707
708
709 type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestRequest struct {
710
711 CreateField *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateFieldRequest `json:"createField,omitempty"`
712
713 CreateSelectionChoice *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestCreateSelectionChoiceRequest `json:"createSelectionChoice,omitempty"`
714
715 DeleteField *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteFieldRequest `json:"deleteField,omitempty"`
716
717 DeleteSelectionChoice *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDeleteSelectionChoiceRequest `json:"deleteSelectionChoice,omitempty"`
718
719 DisableField *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableFieldRequest `json:"disableField,omitempty"`
720
721 DisableSelectionChoice *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestDisableSelectionChoiceRequest `json:"disableSelectionChoice,omitempty"`
722
723 EnableField *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableFieldRequest `json:"enableField,omitempty"`
724
725 EnableSelectionChoice *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestEnableSelectionChoiceRequest `json:"enableSelectionChoice,omitempty"`
726
727 UpdateField *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldPropertiesRequest `json:"updateField,omitempty"`
728
729 UpdateFieldType *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldTypeRequest `json:"updateFieldType,omitempty"`
730
731 UpdateLabel *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateLabelPropertiesRequest `json:"updateLabel,omitempty"`
732
733
734 UpdateSelectionChoiceProperties *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest `json:"updateSelectionChoiceProperties,omitempty"`
735
736
737
738
739
740 ForceSendFields []string `json:"-"`
741
742
743
744
745 NullFields []string `json:"-"`
746 }
747
748 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestRequest) MarshalJSON() ([]byte, error) {
749 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestRequest
750 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
751 }
752
753
754
755 type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldPropertiesRequest struct {
756
757 Id string `json:"id,omitempty"`
758
759 Properties *GoogleAppsDriveLabelsV2FieldProperties `json:"properties,omitempty"`
760
761
762
763 UpdateMask string `json:"updateMask,omitempty"`
764
765
766
767
768
769 ForceSendFields []string `json:"-"`
770
771
772
773
774 NullFields []string `json:"-"`
775 }
776
777 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldPropertiesRequest) MarshalJSON() ([]byte, error) {
778 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldPropertiesRequest
779 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
780 }
781
782
783
784 type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldTypeRequest struct {
785
786 DateOptions *GoogleAppsDriveLabelsV2FieldDateOptions `json:"dateOptions,omitempty"`
787
788 Id string `json:"id,omitempty"`
789
790 IntegerOptions *GoogleAppsDriveLabelsV2FieldIntegerOptions `json:"integerOptions,omitempty"`
791
792 SelectionOptions *GoogleAppsDriveLabelsV2FieldSelectionOptions `json:"selectionOptions,omitempty"`
793
794 TextOptions *GoogleAppsDriveLabelsV2FieldTextOptions `json:"textOptions,omitempty"`
795
796
797
798 UpdateMask string `json:"updateMask,omitempty"`
799
800 UserOptions *GoogleAppsDriveLabelsV2FieldUserOptions `json:"userOptions,omitempty"`
801
802
803
804
805
806 ForceSendFields []string `json:"-"`
807
808
809
810
811 NullFields []string `json:"-"`
812 }
813
814 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldTypeRequest) MarshalJSON() ([]byte, error) {
815 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateFieldTypeRequest
816 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
817 }
818
819
820
821 type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateLabelPropertiesRequest struct {
822
823 Properties *GoogleAppsDriveLabelsV2LabelProperties `json:"properties,omitempty"`
824
825
826
827 UpdateMask string `json:"updateMask,omitempty"`
828
829
830
831
832
833 ForceSendFields []string `json:"-"`
834
835
836
837
838 NullFields []string `json:"-"`
839 }
840
841 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateLabelPropertiesRequest) MarshalJSON() ([]byte, error) {
842 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateLabelPropertiesRequest
843 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
844 }
845
846
847
848 type GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest struct {
849
850 FieldId string `json:"fieldId,omitempty"`
851
852 Id string `json:"id,omitempty"`
853
854 Properties *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties `json:"properties,omitempty"`
855
856
857
858 UpdateMask string `json:"updateMask,omitempty"`
859
860
861
862
863
864 ForceSendFields []string `json:"-"`
865
866
867
868
869 NullFields []string `json:"-"`
870 }
871
872 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest) MarshalJSON() ([]byte, error) {
873 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest
874 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
875 }
876
877
878 type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse struct {
879
880
881 Responses []*GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseResponse `json:"responses,omitempty"`
882
883
884
885 UpdatedLabel *GoogleAppsDriveLabelsV2Label `json:"updatedLabel,omitempty"`
886
887
888 googleapi.ServerResponse `json:"-"`
889
890
891
892
893
894 ForceSendFields []string `json:"-"`
895
896
897
898
899 NullFields []string `json:"-"`
900 }
901
902 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse) MarshalJSON() ([]byte, error) {
903 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse
904 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
905 }
906
907
908
909 type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateFieldResponse struct {
910
911
912 Id string `json:"id,omitempty"`
913
914
915 Priority int64 `json:"priority,omitempty"`
916
917
918
919
920
921 ForceSendFields []string `json:"-"`
922
923
924
925
926 NullFields []string `json:"-"`
927 }
928
929 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateFieldResponse) MarshalJSON() ([]byte, error) {
930 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateFieldResponse
931 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
932 }
933
934
935
936
937 type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateSelectionChoiceResponse struct {
938
939 FieldId string `json:"fieldId,omitempty"`
940
941 Id string `json:"id,omitempty"`
942
943
944
945
946
947 ForceSendFields []string `json:"-"`
948
949
950
951
952 NullFields []string `json:"-"`
953 }
954
955 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateSelectionChoiceResponse) MarshalJSON() ([]byte, error) {
956 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateSelectionChoiceResponse
957 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
958 }
959
960
961
962 type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDeleteFieldResponse struct {
963 }
964
965
966
967
968 type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDeleteSelectionChoiceResponse struct {
969 }
970
971
972
973 type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDisableFieldResponse struct {
974 }
975
976
977
978 type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDisableSelectionChoiceResponse struct {
979 }
980
981
982
983 type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseEnableFieldResponse struct {
984 }
985
986
987
988
989 type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseEnableSelectionChoiceResponse struct {
990 }
991
992
993
994 type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseResponse struct {
995
996 CreateField *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateFieldResponse `json:"createField,omitempty"`
997
998
999 CreateSelectionChoice *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseCreateSelectionChoiceResponse `json:"createSelectionChoice,omitempty"`
1000
1001 DeleteField *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDeleteFieldResponse `json:"deleteField,omitempty"`
1002
1003 DeleteSelectionChoice *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDeleteSelectionChoiceResponse `json:"deleteSelectionChoice,omitempty"`
1004
1005 DisableField *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDisableFieldResponse `json:"disableField,omitempty"`
1006
1007 DisableSelectionChoice *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseDisableSelectionChoiceResponse `json:"disableSelectionChoice,omitempty"`
1008
1009 EnableField *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseEnableFieldResponse `json:"enableField,omitempty"`
1010
1011 EnableSelectionChoice *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseEnableSelectionChoiceResponse `json:"enableSelectionChoice,omitempty"`
1012
1013 UpdateField *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldPropertiesResponse `json:"updateField,omitempty"`
1014
1015 UpdateFieldType *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldTypeResponse `json:"updateFieldType,omitempty"`
1016
1017 UpdateLabel *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateLabelPropertiesResponse `json:"updateLabel,omitempty"`
1018
1019 UpdateSelectionChoiceProperties *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse `json:"updateSelectionChoiceProperties,omitempty"`
1020
1021
1022
1023
1024
1025 ForceSendFields []string `json:"-"`
1026
1027
1028
1029
1030 NullFields []string `json:"-"`
1031 }
1032
1033 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseResponse) MarshalJSON() ([]byte, error) {
1034 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseResponse
1035 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1036 }
1037
1038
1039
1040
1041 type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldPropertiesResponse struct {
1042
1043
1044 Priority int64 `json:"priority,omitempty"`
1045
1046
1047
1048
1049
1050 ForceSendFields []string `json:"-"`
1051
1052
1053
1054
1055 NullFields []string `json:"-"`
1056 }
1057
1058 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldPropertiesResponse) MarshalJSON() ([]byte, error) {
1059 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldPropertiesResponse
1060 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1061 }
1062
1063
1064
1065 type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateFieldTypeResponse struct {
1066 }
1067
1068
1069
1070
1071 type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateLabelPropertiesResponse struct {
1072 }
1073
1074
1075
1076 type GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse struct {
1077
1078
1079 Priority int64 `json:"priority,omitempty"`
1080
1081
1082
1083
1084
1085 ForceSendFields []string `json:"-"`
1086
1087
1088
1089
1090 NullFields []string `json:"-"`
1091 }
1092
1093 func (s *GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse) MarshalJSON() ([]byte, error) {
1094 type NoMethod GoogleAppsDriveLabelsV2DeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse
1095 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1096 }
1097
1098
1099
1100 type GoogleAppsDriveLabelsV2DisableLabelRequest struct {
1101
1102 DisabledPolicy *GoogleAppsDriveLabelsV2LifecycleDisabledPolicy `json:"disabledPolicy,omitempty"`
1103
1104
1105
1106 LanguageCode string `json:"languageCode,omitempty"`
1107
1108
1109
1110 UpdateMask string `json:"updateMask,omitempty"`
1111
1112
1113
1114 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
1115
1116
1117 WriteControl *GoogleAppsDriveLabelsV2WriteControl `json:"writeControl,omitempty"`
1118
1119
1120
1121
1122
1123 ForceSendFields []string `json:"-"`
1124
1125
1126
1127
1128 NullFields []string `json:"-"`
1129 }
1130
1131 func (s *GoogleAppsDriveLabelsV2DisableLabelRequest) MarshalJSON() ([]byte, error) {
1132 type NoMethod GoogleAppsDriveLabelsV2DisableLabelRequest
1133 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1134 }
1135
1136
1137 type GoogleAppsDriveLabelsV2EnableLabelRequest struct {
1138
1139
1140
1141 LanguageCode string `json:"languageCode,omitempty"`
1142
1143
1144
1145 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
1146
1147
1148 WriteControl *GoogleAppsDriveLabelsV2WriteControl `json:"writeControl,omitempty"`
1149
1150
1151
1152
1153
1154 ForceSendFields []string `json:"-"`
1155
1156
1157
1158
1159 NullFields []string `json:"-"`
1160 }
1161
1162 func (s *GoogleAppsDriveLabelsV2EnableLabelRequest) MarshalJSON() ([]byte, error) {
1163 type NoMethod GoogleAppsDriveLabelsV2EnableLabelRequest
1164 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1165 }
1166
1167
1168
1169
1170 type GoogleAppsDriveLabelsV2Field struct {
1171
1172
1173 AppliedCapabilities *GoogleAppsDriveLabelsV2FieldAppliedCapabilities `json:"appliedCapabilities,omitempty"`
1174
1175 CreateTime string `json:"createTime,omitempty"`
1176
1177 Creator *GoogleAppsDriveLabelsV2UserInfo `json:"creator,omitempty"`
1178
1179 DateOptions *GoogleAppsDriveLabelsV2FieldDateOptions `json:"dateOptions,omitempty"`
1180
1181
1182 DisableTime string `json:"disableTime,omitempty"`
1183
1184
1185 Disabler *GoogleAppsDriveLabelsV2UserInfo `json:"disabler,omitempty"`
1186
1187 DisplayHints *GoogleAppsDriveLabelsV2FieldDisplayHints `json:"displayHints,omitempty"`
1188
1189
1190 Id string `json:"id,omitempty"`
1191
1192 IntegerOptions *GoogleAppsDriveLabelsV2FieldIntegerOptions `json:"integerOptions,omitempty"`
1193
1194 Lifecycle *GoogleAppsDriveLabelsV2Lifecycle `json:"lifecycle,omitempty"`
1195
1196 LockStatus *GoogleAppsDriveLabelsV2LockStatus `json:"lockStatus,omitempty"`
1197
1198 Properties *GoogleAppsDriveLabelsV2FieldProperties `json:"properties,omitempty"`
1199
1200
1201 Publisher *GoogleAppsDriveLabelsV2UserInfo `json:"publisher,omitempty"`
1202
1203
1204
1205 QueryKey string `json:"queryKey,omitempty"`
1206
1207
1208 SchemaCapabilities *GoogleAppsDriveLabelsV2FieldSchemaCapabilities `json:"schemaCapabilities,omitempty"`
1209
1210 SelectionOptions *GoogleAppsDriveLabelsV2FieldSelectionOptions `json:"selectionOptions,omitempty"`
1211
1212 TextOptions *GoogleAppsDriveLabelsV2FieldTextOptions `json:"textOptions,omitempty"`
1213
1214 UpdateTime string `json:"updateTime,omitempty"`
1215
1216 Updater *GoogleAppsDriveLabelsV2UserInfo `json:"updater,omitempty"`
1217
1218 UserOptions *GoogleAppsDriveLabelsV2FieldUserOptions `json:"userOptions,omitempty"`
1219
1220
1221
1222
1223
1224 ForceSendFields []string `json:"-"`
1225
1226
1227
1228
1229 NullFields []string `json:"-"`
1230 }
1231
1232 func (s *GoogleAppsDriveLabelsV2Field) MarshalJSON() ([]byte, error) {
1233 type NoMethod GoogleAppsDriveLabelsV2Field
1234 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1235 }
1236
1237
1238
1239 type GoogleAppsDriveLabelsV2FieldAppliedCapabilities struct {
1240
1241 CanRead bool `json:"canRead,omitempty"`
1242
1243
1244 CanSearch bool `json:"canSearch,omitempty"`
1245
1246 CanWrite bool `json:"canWrite,omitempty"`
1247
1248
1249
1250
1251
1252 ForceSendFields []string `json:"-"`
1253
1254
1255
1256
1257 NullFields []string `json:"-"`
1258 }
1259
1260 func (s *GoogleAppsDriveLabelsV2FieldAppliedCapabilities) MarshalJSON() ([]byte, error) {
1261 type NoMethod GoogleAppsDriveLabelsV2FieldAppliedCapabilities
1262 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1263 }
1264
1265
1266 type GoogleAppsDriveLabelsV2FieldDateOptions struct {
1267
1268 DateFormat string `json:"dateFormat,omitempty"`
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278 DateFormatType string `json:"dateFormatType,omitempty"`
1279
1280 MaxValue *GoogleTypeDate `json:"maxValue,omitempty"`
1281
1282 MinValue *GoogleTypeDate `json:"minValue,omitempty"`
1283
1284
1285
1286
1287
1288 ForceSendFields []string `json:"-"`
1289
1290
1291
1292
1293 NullFields []string `json:"-"`
1294 }
1295
1296 func (s *GoogleAppsDriveLabelsV2FieldDateOptions) MarshalJSON() ([]byte, error) {
1297 type NoMethod GoogleAppsDriveLabelsV2FieldDateOptions
1298 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1299 }
1300
1301
1302
1303 type GoogleAppsDriveLabelsV2FieldDisplayHints struct {
1304
1305 Disabled bool `json:"disabled,omitempty"`
1306
1307
1308 HiddenInSearch bool `json:"hiddenInSearch,omitempty"`
1309
1310 Required bool `json:"required,omitempty"`
1311
1312
1313 ShownInApply bool `json:"shownInApply,omitempty"`
1314
1315
1316
1317
1318
1319 ForceSendFields []string `json:"-"`
1320
1321
1322
1323
1324 NullFields []string `json:"-"`
1325 }
1326
1327 func (s *GoogleAppsDriveLabelsV2FieldDisplayHints) MarshalJSON() ([]byte, error) {
1328 type NoMethod GoogleAppsDriveLabelsV2FieldDisplayHints
1329 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1330 }
1331
1332
1333
1334 type GoogleAppsDriveLabelsV2FieldIntegerOptions struct {
1335
1336 MaxValue int64 `json:"maxValue,omitempty,string"`
1337
1338 MinValue int64 `json:"minValue,omitempty,string"`
1339
1340
1341
1342
1343
1344 ForceSendFields []string `json:"-"`
1345
1346
1347
1348
1349 NullFields []string `json:"-"`
1350 }
1351
1352 func (s *GoogleAppsDriveLabelsV2FieldIntegerOptions) MarshalJSON() ([]byte, error) {
1353 type NoMethod GoogleAppsDriveLabelsV2FieldIntegerOptions
1354 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1355 }
1356
1357
1358
1359
1360 type GoogleAppsDriveLabelsV2FieldLimits struct {
1361
1362 DateLimits *GoogleAppsDriveLabelsV2DateLimits `json:"dateLimits,omitempty"`
1363
1364 IntegerLimits *GoogleAppsDriveLabelsV2IntegerLimits `json:"integerLimits,omitempty"`
1365
1366 LongTextLimits *GoogleAppsDriveLabelsV2LongTextLimits `json:"longTextLimits,omitempty"`
1367
1368 MaxDescriptionLength int64 `json:"maxDescriptionLength,omitempty"`
1369
1370 MaxDisplayNameLength int64 `json:"maxDisplayNameLength,omitempty"`
1371
1372 MaxIdLength int64 `json:"maxIdLength,omitempty"`
1373
1374 SelectionLimits *GoogleAppsDriveLabelsV2SelectionLimits `json:"selectionLimits,omitempty"`
1375
1376
1377 TextLimits *GoogleAppsDriveLabelsV2TextLimits `json:"textLimits,omitempty"`
1378
1379 UserLimits *GoogleAppsDriveLabelsV2UserLimits `json:"userLimits,omitempty"`
1380
1381
1382
1383
1384
1385 ForceSendFields []string `json:"-"`
1386
1387
1388
1389
1390 NullFields []string `json:"-"`
1391 }
1392
1393 func (s *GoogleAppsDriveLabelsV2FieldLimits) MarshalJSON() ([]byte, error) {
1394 type NoMethod GoogleAppsDriveLabelsV2FieldLimits
1395 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1396 }
1397
1398
1399
1400 type GoogleAppsDriveLabelsV2FieldListOptions struct {
1401
1402 MaxEntries int64 `json:"maxEntries,omitempty"`
1403
1404
1405
1406
1407
1408 ForceSendFields []string `json:"-"`
1409
1410
1411
1412
1413 NullFields []string `json:"-"`
1414 }
1415
1416 func (s *GoogleAppsDriveLabelsV2FieldListOptions) MarshalJSON() ([]byte, error) {
1417 type NoMethod GoogleAppsDriveLabelsV2FieldListOptions
1418 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1419 }
1420
1421
1422 type GoogleAppsDriveLabelsV2FieldProperties struct {
1423
1424
1425 DisplayName string `json:"displayName,omitempty"`
1426
1427
1428 InsertBeforeField string `json:"insertBeforeField,omitempty"`
1429
1430 Required bool `json:"required,omitempty"`
1431
1432
1433
1434
1435
1436 ForceSendFields []string `json:"-"`
1437
1438
1439
1440
1441 NullFields []string `json:"-"`
1442 }
1443
1444 func (s *GoogleAppsDriveLabelsV2FieldProperties) MarshalJSON() ([]byte, error) {
1445 type NoMethod GoogleAppsDriveLabelsV2FieldProperties
1446 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1447 }
1448
1449
1450
1451 type GoogleAppsDriveLabelsV2FieldSchemaCapabilities struct {
1452
1453
1454 CanDelete bool `json:"canDelete,omitempty"`
1455
1456
1457 CanDisable bool `json:"canDisable,omitempty"`
1458
1459
1460 CanEnable bool `json:"canEnable,omitempty"`
1461
1462 CanUpdate bool `json:"canUpdate,omitempty"`
1463
1464
1465
1466
1467
1468 ForceSendFields []string `json:"-"`
1469
1470
1471
1472
1473 NullFields []string `json:"-"`
1474 }
1475
1476 func (s *GoogleAppsDriveLabelsV2FieldSchemaCapabilities) MarshalJSON() ([]byte, error) {
1477 type NoMethod GoogleAppsDriveLabelsV2FieldSchemaCapabilities
1478 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1479 }
1480
1481
1482
1483 type GoogleAppsDriveLabelsV2FieldSelectionOptions struct {
1484
1485
1486 Choices []*GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice `json:"choices,omitempty"`
1487
1488
1489 ListOptions *GoogleAppsDriveLabelsV2FieldListOptions `json:"listOptions,omitempty"`
1490
1491
1492
1493
1494
1495 ForceSendFields []string `json:"-"`
1496
1497
1498
1499
1500 NullFields []string `json:"-"`
1501 }
1502
1503 func (s *GoogleAppsDriveLabelsV2FieldSelectionOptions) MarshalJSON() ([]byte, error) {
1504 type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptions
1505 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1506 }
1507
1508
1509 type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice struct {
1510
1511
1512 AppliedCapabilities *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities `json:"appliedCapabilities,omitempty"`
1513
1514 CreateTime string `json:"createTime,omitempty"`
1515
1516 Creator *GoogleAppsDriveLabelsV2UserInfo `json:"creator,omitempty"`
1517
1518
1519 DisableTime string `json:"disableTime,omitempty"`
1520
1521
1522 Disabler *GoogleAppsDriveLabelsV2UserInfo `json:"disabler,omitempty"`
1523
1524 DisplayHints *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints `json:"displayHints,omitempty"`
1525
1526
1527 Id string `json:"id,omitempty"`
1528
1529 Lifecycle *GoogleAppsDriveLabelsV2Lifecycle `json:"lifecycle,omitempty"`
1530
1531 LockStatus *GoogleAppsDriveLabelsV2LockStatus `json:"lockStatus,omitempty"`
1532
1533 Properties *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties `json:"properties,omitempty"`
1534
1535
1536 PublishTime string `json:"publishTime,omitempty"`
1537
1538
1539 Publisher *GoogleAppsDriveLabelsV2UserInfo `json:"publisher,omitempty"`
1540
1541
1542 SchemaCapabilities *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities `json:"schemaCapabilities,omitempty"`
1543
1544 UpdateTime string `json:"updateTime,omitempty"`
1545
1546 Updater *GoogleAppsDriveLabelsV2UserInfo `json:"updater,omitempty"`
1547
1548
1549
1550
1551
1552 ForceSendFields []string `json:"-"`
1553
1554
1555
1556
1557 NullFields []string `json:"-"`
1558 }
1559
1560 func (s *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice) MarshalJSON() ([]byte, error) {
1561 type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice
1562 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1563 }
1564
1565
1566
1567 type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities struct {
1568
1569 CanRead bool `json:"canRead,omitempty"`
1570
1571 CanSearch bool `json:"canSearch,omitempty"`
1572
1573 CanSelect bool `json:"canSelect,omitempty"`
1574
1575
1576
1577
1578
1579 ForceSendFields []string `json:"-"`
1580
1581
1582
1583
1584 NullFields []string `json:"-"`
1585 }
1586
1587 func (s *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities) MarshalJSON() ([]byte, error) {
1588 type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities
1589 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1590 }
1591
1592
1593
1594 type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints struct {
1595
1596
1597 BadgeColors *GoogleAppsDriveLabelsV2BadgeColors `json:"badgeColors,omitempty"`
1598
1599
1600
1601
1602
1603 BadgePriority int64 `json:"badgePriority,omitempty,string"`
1604
1605
1606 DarkBadgeColors *GoogleAppsDriveLabelsV2BadgeColors `json:"darkBadgeColors,omitempty"`
1607
1608 Disabled bool `json:"disabled,omitempty"`
1609
1610
1611 HiddenInSearch bool `json:"hiddenInSearch,omitempty"`
1612
1613
1614 ShownInApply bool `json:"shownInApply,omitempty"`
1615
1616
1617
1618
1619
1620 ForceSendFields []string `json:"-"`
1621
1622
1623
1624
1625 NullFields []string `json:"-"`
1626 }
1627
1628 func (s *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints) MarshalJSON() ([]byte, error) {
1629 type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints
1630 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1631 }
1632
1633
1634
1635 type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties struct {
1636
1637
1638 BadgeConfig *GoogleAppsDriveLabelsV2BadgeConfig `json:"badgeConfig,omitempty"`
1639
1640 Description string `json:"description,omitempty"`
1641
1642
1643 DisplayName string `json:"displayName,omitempty"`
1644
1645
1646 InsertBeforeChoice string `json:"insertBeforeChoice,omitempty"`
1647
1648
1649
1650
1651
1652 ForceSendFields []string `json:"-"`
1653
1654
1655
1656
1657 NullFields []string `json:"-"`
1658 }
1659
1660 func (s *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties) MarshalJSON() ([]byte, error) {
1661 type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties
1662 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1663 }
1664
1665
1666
1667 type GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities struct {
1668
1669 CanDelete bool `json:"canDelete,omitempty"`
1670
1671 CanDisable bool `json:"canDisable,omitempty"`
1672
1673 CanEnable bool `json:"canEnable,omitempty"`
1674
1675 CanUpdate bool `json:"canUpdate,omitempty"`
1676
1677
1678
1679
1680
1681 ForceSendFields []string `json:"-"`
1682
1683
1684
1685
1686 NullFields []string `json:"-"`
1687 }
1688
1689 func (s *GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities) MarshalJSON() ([]byte, error) {
1690 type NoMethod GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities
1691 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1692 }
1693
1694
1695 type GoogleAppsDriveLabelsV2FieldTextOptions struct {
1696
1697
1698 MaxLength int64 `json:"maxLength,omitempty"`
1699
1700
1701 MinLength int64 `json:"minLength,omitempty"`
1702
1703
1704
1705
1706
1707 ForceSendFields []string `json:"-"`
1708
1709
1710
1711
1712 NullFields []string `json:"-"`
1713 }
1714
1715 func (s *GoogleAppsDriveLabelsV2FieldTextOptions) MarshalJSON() ([]byte, error) {
1716 type NoMethod GoogleAppsDriveLabelsV2FieldTextOptions
1717 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1718 }
1719
1720
1721 type GoogleAppsDriveLabelsV2FieldUserOptions struct {
1722
1723
1724 ListOptions *GoogleAppsDriveLabelsV2FieldListOptions `json:"listOptions,omitempty"`
1725
1726
1727
1728
1729
1730 ForceSendFields []string `json:"-"`
1731
1732
1733
1734
1735 NullFields []string `json:"-"`
1736 }
1737
1738 func (s *GoogleAppsDriveLabelsV2FieldUserOptions) MarshalJSON() ([]byte, error) {
1739 type NoMethod GoogleAppsDriveLabelsV2FieldUserOptions
1740 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1741 }
1742
1743
1744 type GoogleAppsDriveLabelsV2IntegerLimits struct {
1745
1746 MaxValue int64 `json:"maxValue,omitempty,string"`
1747
1748 MinValue int64 `json:"minValue,omitempty,string"`
1749
1750
1751
1752
1753
1754 ForceSendFields []string `json:"-"`
1755
1756
1757
1758
1759 NullFields []string `json:"-"`
1760 }
1761
1762 func (s *GoogleAppsDriveLabelsV2IntegerLimits) MarshalJSON() ([]byte, error) {
1763 type NoMethod GoogleAppsDriveLabelsV2IntegerLimits
1764 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1765 }
1766
1767
1768
1769
1770
1771 type GoogleAppsDriveLabelsV2Label struct {
1772
1773
1774 AppliedCapabilities *GoogleAppsDriveLabelsV2LabelAppliedCapabilities `json:"appliedCapabilities,omitempty"`
1775
1776
1777 AppliedLabelPolicy *GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy `json:"appliedLabelPolicy,omitempty"`
1778
1779 CreateTime string `json:"createTime,omitempty"`
1780
1781 Creator *GoogleAppsDriveLabelsV2UserInfo `json:"creator,omitempty"`
1782
1783
1784 Customer string `json:"customer,omitempty"`
1785
1786
1787 DisableTime string `json:"disableTime,omitempty"`
1788
1789
1790 Disabler *GoogleAppsDriveLabelsV2UserInfo `json:"disabler,omitempty"`
1791
1792 DisplayHints *GoogleAppsDriveLabelsV2LabelDisplayHints `json:"displayHints,omitempty"`
1793
1794 Fields []*GoogleAppsDriveLabelsV2Field `json:"fields,omitempty"`
1795
1796
1797
1798 Id string `json:"id,omitempty"`
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808 LabelType string `json:"labelType,omitempty"`
1809
1810
1811 LearnMoreUri string `json:"learnMoreUri,omitempty"`
1812
1813
1814 Lifecycle *GoogleAppsDriveLabelsV2Lifecycle `json:"lifecycle,omitempty"`
1815
1816 LockStatus *GoogleAppsDriveLabelsV2LockStatus `json:"lockStatus,omitempty"`
1817
1818
1819
1820 Name string `json:"name,omitempty"`
1821
1822 Properties *GoogleAppsDriveLabelsV2LabelProperties `json:"properties,omitempty"`
1823
1824
1825 PublishTime string `json:"publishTime,omitempty"`
1826
1827
1828 Publisher *GoogleAppsDriveLabelsV2UserInfo `json:"publisher,omitempty"`
1829
1830 RevisionCreateTime string `json:"revisionCreateTime,omitempty"`
1831
1832 RevisionCreator *GoogleAppsDriveLabelsV2UserInfo `json:"revisionCreator,omitempty"`
1833
1834
1835
1836
1837 RevisionId string `json:"revisionId,omitempty"`
1838
1839
1840 SchemaCapabilities *GoogleAppsDriveLabelsV2LabelSchemaCapabilities `json:"schemaCapabilities,omitempty"`
1841
1842
1843 googleapi.ServerResponse `json:"-"`
1844
1845
1846
1847
1848
1849 ForceSendFields []string `json:"-"`
1850
1851
1852
1853
1854 NullFields []string `json:"-"`
1855 }
1856
1857 func (s *GoogleAppsDriveLabelsV2Label) MarshalJSON() ([]byte, error) {
1858 type NoMethod GoogleAppsDriveLabelsV2Label
1859 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1860 }
1861
1862
1863
1864 type GoogleAppsDriveLabelsV2LabelAppliedCapabilities struct {
1865
1866 CanApply bool `json:"canApply,omitempty"`
1867
1868 CanRead bool `json:"canRead,omitempty"`
1869
1870 CanRemove bool `json:"canRemove,omitempty"`
1871
1872
1873
1874
1875
1876 ForceSendFields []string `json:"-"`
1877
1878
1879
1880
1881 NullFields []string `json:"-"`
1882 }
1883
1884 func (s *GoogleAppsDriveLabelsV2LabelAppliedCapabilities) MarshalJSON() ([]byte, error) {
1885 type NoMethod GoogleAppsDriveLabelsV2LabelAppliedCapabilities
1886 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1887 }
1888
1889
1890
1891 type GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy struct {
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903 CopyMode string `json:"copyMode,omitempty"`
1904
1905
1906
1907
1908
1909 ForceSendFields []string `json:"-"`
1910
1911
1912
1913
1914 NullFields []string `json:"-"`
1915 }
1916
1917 func (s *GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy) MarshalJSON() ([]byte, error) {
1918 type NoMethod GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy
1919 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1920 }
1921
1922
1923
1924 type GoogleAppsDriveLabelsV2LabelDisplayHints struct {
1925
1926 Disabled bool `json:"disabled,omitempty"`
1927
1928
1929 HiddenInSearch bool `json:"hiddenInSearch,omitempty"`
1930
1931 Priority int64 `json:"priority,omitempty,string"`
1932
1933
1934 ShownInApply bool `json:"shownInApply,omitempty"`
1935
1936
1937
1938
1939
1940 ForceSendFields []string `json:"-"`
1941
1942
1943
1944
1945 NullFields []string `json:"-"`
1946 }
1947
1948 func (s *GoogleAppsDriveLabelsV2LabelDisplayHints) MarshalJSON() ([]byte, error) {
1949 type NoMethod GoogleAppsDriveLabelsV2LabelDisplayHints
1950 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1951 }
1952
1953
1954
1955
1956 type GoogleAppsDriveLabelsV2LabelLimits struct {
1957
1958 FieldLimits *GoogleAppsDriveLabelsV2FieldLimits `json:"fieldLimits,omitempty"`
1959
1960
1961 MaxDeletedFields int64 `json:"maxDeletedFields,omitempty"`
1962
1963
1964 MaxDescriptionLength int64 `json:"maxDescriptionLength,omitempty"`
1965
1966
1967 MaxDraftRevisions int64 `json:"maxDraftRevisions,omitempty"`
1968
1969 MaxFields int64 `json:"maxFields,omitempty"`
1970
1971 MaxTitleLength int64 `json:"maxTitleLength,omitempty"`
1972
1973 Name string `json:"name,omitempty"`
1974
1975
1976 googleapi.ServerResponse `json:"-"`
1977
1978
1979
1980
1981
1982 ForceSendFields []string `json:"-"`
1983
1984
1985
1986
1987 NullFields []string `json:"-"`
1988 }
1989
1990 func (s *GoogleAppsDriveLabelsV2LabelLimits) MarshalJSON() ([]byte, error) {
1991 type NoMethod GoogleAppsDriveLabelsV2LabelLimits
1992 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1993 }
1994
1995
1996
1997 type GoogleAppsDriveLabelsV2LabelLock struct {
1998
1999 Capabilities *GoogleAppsDriveLabelsV2LabelLockCapabilities `json:"capabilities,omitempty"`
2000
2001
2002 ChoiceId string `json:"choiceId,omitempty"`
2003
2004 CreateTime string `json:"createTime,omitempty"`
2005
2006
2007
2008 Creator *GoogleAppsDriveLabelsV2UserInfo `json:"creator,omitempty"`
2009
2010
2011
2012 DeleteTime string `json:"deleteTime,omitempty"`
2013
2014
2015 FieldId string `json:"fieldId,omitempty"`
2016
2017 Name string `json:"name,omitempty"`
2018
2019
2020
2021
2022
2023
2024
2025 State string `json:"state,omitempty"`
2026
2027
2028
2029
2030
2031 ForceSendFields []string `json:"-"`
2032
2033
2034
2035
2036 NullFields []string `json:"-"`
2037 }
2038
2039 func (s *GoogleAppsDriveLabelsV2LabelLock) MarshalJSON() ([]byte, error) {
2040 type NoMethod GoogleAppsDriveLabelsV2LabelLock
2041 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2042 }
2043
2044
2045
2046 type GoogleAppsDriveLabelsV2LabelLockCapabilities struct {
2047
2048 CanViewPolicy bool `json:"canViewPolicy,omitempty"`
2049
2050
2051
2052
2053
2054 ForceSendFields []string `json:"-"`
2055
2056
2057
2058
2059 NullFields []string `json:"-"`
2060 }
2061
2062 func (s *GoogleAppsDriveLabelsV2LabelLockCapabilities) MarshalJSON() ([]byte, error) {
2063 type NoMethod GoogleAppsDriveLabelsV2LabelLockCapabilities
2064 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2065 }
2066
2067
2068
2069 type GoogleAppsDriveLabelsV2LabelPermission struct {
2070
2071
2072
2073 Audience string `json:"audience,omitempty"`
2074
2075
2076
2077
2078 Email string `json:"email,omitempty"`
2079
2080 Group string `json:"group,omitempty"`
2081
2082 Name string `json:"name,omitempty"`
2083
2084 Person string `json:"person,omitempty"`
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097 Role string `json:"role,omitempty"`
2098
2099
2100 googleapi.ServerResponse `json:"-"`
2101
2102
2103
2104
2105
2106 ForceSendFields []string `json:"-"`
2107
2108
2109
2110
2111 NullFields []string `json:"-"`
2112 }
2113
2114 func (s *GoogleAppsDriveLabelsV2LabelPermission) MarshalJSON() ([]byte, error) {
2115 type NoMethod GoogleAppsDriveLabelsV2LabelPermission
2116 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2117 }
2118
2119
2120 type GoogleAppsDriveLabelsV2LabelProperties struct {
2121
2122 Description string `json:"description,omitempty"`
2123
2124 Title string `json:"title,omitempty"`
2125
2126
2127
2128
2129
2130 ForceSendFields []string `json:"-"`
2131
2132
2133
2134
2135 NullFields []string `json:"-"`
2136 }
2137
2138 func (s *GoogleAppsDriveLabelsV2LabelProperties) MarshalJSON() ([]byte, error) {
2139 type NoMethod GoogleAppsDriveLabelsV2LabelProperties
2140 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2141 }
2142
2143
2144
2145 type GoogleAppsDriveLabelsV2LabelSchemaCapabilities struct {
2146
2147
2148 CanDelete bool `json:"canDelete,omitempty"`
2149
2150
2151 CanDisable bool `json:"canDisable,omitempty"`
2152
2153
2154 CanEnable bool `json:"canEnable,omitempty"`
2155
2156 CanUpdate bool `json:"canUpdate,omitempty"`
2157
2158
2159
2160
2161
2162 ForceSendFields []string `json:"-"`
2163
2164
2165
2166
2167 NullFields []string `json:"-"`
2168 }
2169
2170 func (s *GoogleAppsDriveLabelsV2LabelSchemaCapabilities) MarshalJSON() ([]byte, error) {
2171 type NoMethod GoogleAppsDriveLabelsV2LabelSchemaCapabilities
2172 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2173 }
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186 type GoogleAppsDriveLabelsV2Lifecycle struct {
2187
2188
2189 DisabledPolicy *GoogleAppsDriveLabelsV2LifecycleDisabledPolicy `json:"disabledPolicy,omitempty"`
2190
2191
2192 HasUnpublishedChanges bool `json:"hasUnpublishedChanges,omitempty"`
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206 State string `json:"state,omitempty"`
2207
2208
2209
2210
2211
2212 ForceSendFields []string `json:"-"`
2213
2214
2215
2216
2217 NullFields []string `json:"-"`
2218 }
2219
2220 func (s *GoogleAppsDriveLabelsV2Lifecycle) MarshalJSON() ([]byte, error) {
2221 type NoMethod GoogleAppsDriveLabelsV2Lifecycle
2222 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2223 }
2224
2225
2226
2227 type GoogleAppsDriveLabelsV2LifecycleDisabledPolicy struct {
2228
2229
2230
2231
2232
2233 HideInSearch bool `json:"hideInSearch,omitempty"`
2234
2235
2236
2237
2238 ShowInApply bool `json:"showInApply,omitempty"`
2239
2240
2241
2242
2243
2244 ForceSendFields []string `json:"-"`
2245
2246
2247
2248
2249 NullFields []string `json:"-"`
2250 }
2251
2252 func (s *GoogleAppsDriveLabelsV2LifecycleDisabledPolicy) MarshalJSON() ([]byte, error) {
2253 type NoMethod GoogleAppsDriveLabelsV2LifecycleDisabledPolicy
2254 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2255 }
2256
2257
2258
2259 type GoogleAppsDriveLabelsV2ListLabelLocksResponse struct {
2260
2261 LabelLocks []*GoogleAppsDriveLabelsV2LabelLock `json:"labelLocks,omitempty"`
2262
2263 NextPageToken string `json:"nextPageToken,omitempty"`
2264
2265
2266 googleapi.ServerResponse `json:"-"`
2267
2268
2269
2270
2271
2272 ForceSendFields []string `json:"-"`
2273
2274
2275
2276
2277 NullFields []string `json:"-"`
2278 }
2279
2280 func (s *GoogleAppsDriveLabelsV2ListLabelLocksResponse) MarshalJSON() ([]byte, error) {
2281 type NoMethod GoogleAppsDriveLabelsV2ListLabelLocksResponse
2282 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2283 }
2284
2285
2286
2287 type GoogleAppsDriveLabelsV2ListLabelPermissionsResponse struct {
2288
2289 LabelPermissions []*GoogleAppsDriveLabelsV2LabelPermission `json:"labelPermissions,omitempty"`
2290
2291 NextPageToken string `json:"nextPageToken,omitempty"`
2292
2293
2294 googleapi.ServerResponse `json:"-"`
2295
2296
2297
2298
2299
2300 ForceSendFields []string `json:"-"`
2301
2302
2303
2304
2305 NullFields []string `json:"-"`
2306 }
2307
2308 func (s *GoogleAppsDriveLabelsV2ListLabelPermissionsResponse) MarshalJSON() ([]byte, error) {
2309 type NoMethod GoogleAppsDriveLabelsV2ListLabelPermissionsResponse
2310 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2311 }
2312
2313
2314 type GoogleAppsDriveLabelsV2ListLabelsResponse struct {
2315
2316 Labels []*GoogleAppsDriveLabelsV2Label `json:"labels,omitempty"`
2317
2318 NextPageToken string `json:"nextPageToken,omitempty"`
2319
2320
2321 googleapi.ServerResponse `json:"-"`
2322
2323
2324
2325
2326
2327 ForceSendFields []string `json:"-"`
2328
2329
2330
2331
2332 NullFields []string `json:"-"`
2333 }
2334
2335 func (s *GoogleAppsDriveLabelsV2ListLabelsResponse) MarshalJSON() ([]byte, error) {
2336 type NoMethod GoogleAppsDriveLabelsV2ListLabelsResponse
2337 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2338 }
2339
2340
2341 type GoogleAppsDriveLabelsV2ListLimits struct {
2342
2343 MaxEntries int64 `json:"maxEntries,omitempty"`
2344
2345
2346
2347
2348
2349 ForceSendFields []string `json:"-"`
2350
2351
2352
2353
2354 NullFields []string `json:"-"`
2355 }
2356
2357 func (s *GoogleAppsDriveLabelsV2ListLimits) MarshalJSON() ([]byte, error) {
2358 type NoMethod GoogleAppsDriveLabelsV2ListLimits
2359 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2360 }
2361
2362
2363
2364 type GoogleAppsDriveLabelsV2LockStatus struct {
2365
2366
2367
2368
2369 Locked bool `json:"locked,omitempty"`
2370
2371
2372
2373
2374
2375 ForceSendFields []string `json:"-"`
2376
2377
2378
2379
2380 NullFields []string `json:"-"`
2381 }
2382
2383 func (s *GoogleAppsDriveLabelsV2LockStatus) MarshalJSON() ([]byte, error) {
2384 type NoMethod GoogleAppsDriveLabelsV2LockStatus
2385 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2386 }
2387
2388
2389 type GoogleAppsDriveLabelsV2LongTextLimits struct {
2390
2391 MaxLength int64 `json:"maxLength,omitempty"`
2392
2393 MinLength int64 `json:"minLength,omitempty"`
2394
2395
2396
2397
2398
2399 ForceSendFields []string `json:"-"`
2400
2401
2402
2403
2404 NullFields []string `json:"-"`
2405 }
2406
2407 func (s *GoogleAppsDriveLabelsV2LongTextLimits) MarshalJSON() ([]byte, error) {
2408 type NoMethod GoogleAppsDriveLabelsV2LongTextLimits
2409 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2410 }
2411
2412
2413 type GoogleAppsDriveLabelsV2PublishLabelRequest struct {
2414
2415
2416
2417 LanguageCode string `json:"languageCode,omitempty"`
2418
2419
2420
2421 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
2422
2423
2424 WriteControl *GoogleAppsDriveLabelsV2WriteControl `json:"writeControl,omitempty"`
2425
2426
2427
2428
2429
2430 ForceSendFields []string `json:"-"`
2431
2432
2433
2434
2435 NullFields []string `json:"-"`
2436 }
2437
2438 func (s *GoogleAppsDriveLabelsV2PublishLabelRequest) MarshalJSON() ([]byte, error) {
2439 type NoMethod GoogleAppsDriveLabelsV2PublishLabelRequest
2440 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2441 }
2442
2443
2444 type GoogleAppsDriveLabelsV2SelectionLimits struct {
2445
2446 ListLimits *GoogleAppsDriveLabelsV2ListLimits `json:"listLimits,omitempty"`
2447
2448 MaxChoices int64 `json:"maxChoices,omitempty"`
2449
2450 MaxDeletedChoices int64 `json:"maxDeletedChoices,omitempty"`
2451
2452 MaxDisplayNameLength int64 `json:"maxDisplayNameLength,omitempty"`
2453
2454 MaxIdLength int64 `json:"maxIdLength,omitempty"`
2455
2456
2457
2458
2459
2460 ForceSendFields []string `json:"-"`
2461
2462
2463
2464
2465 NullFields []string `json:"-"`
2466 }
2467
2468 func (s *GoogleAppsDriveLabelsV2SelectionLimits) MarshalJSON() ([]byte, error) {
2469 type NoMethod GoogleAppsDriveLabelsV2SelectionLimits
2470 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2471 }
2472
2473
2474 type GoogleAppsDriveLabelsV2TextLimits struct {
2475
2476 MaxLength int64 `json:"maxLength,omitempty"`
2477
2478 MinLength int64 `json:"minLength,omitempty"`
2479
2480
2481
2482
2483
2484 ForceSendFields []string `json:"-"`
2485
2486
2487
2488
2489 NullFields []string `json:"-"`
2490 }
2491
2492 func (s *GoogleAppsDriveLabelsV2TextLimits) MarshalJSON() ([]byte, error) {
2493 type NoMethod GoogleAppsDriveLabelsV2TextLimits
2494 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2495 }
2496
2497
2498
2499
2500 type GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest struct {
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512 CopyMode string `json:"copyMode,omitempty"`
2513
2514
2515
2516 LanguageCode string `json:"languageCode,omitempty"`
2517
2518
2519
2520 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
2521
2522
2523
2524
2525
2526
2527
2528 View string `json:"view,omitempty"`
2529
2530
2531
2532
2533
2534 ForceSendFields []string `json:"-"`
2535
2536
2537
2538
2539 NullFields []string `json:"-"`
2540 }
2541
2542 func (s *GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest) MarshalJSON() ([]byte, error) {
2543 type NoMethod GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest
2544 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2545 }
2546
2547
2548
2549
2550 type GoogleAppsDriveLabelsV2UpdateLabelPermissionRequest struct {
2551
2552 LabelPermission *GoogleAppsDriveLabelsV2LabelPermission `json:"labelPermission,omitempty"`
2553
2554 Parent string `json:"parent,omitempty"`
2555
2556
2557
2558 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
2559
2560
2561
2562
2563
2564 ForceSendFields []string `json:"-"`
2565
2566
2567
2568
2569 NullFields []string `json:"-"`
2570 }
2571
2572 func (s *GoogleAppsDriveLabelsV2UpdateLabelPermissionRequest) MarshalJSON() ([]byte, error) {
2573 type NoMethod GoogleAppsDriveLabelsV2UpdateLabelPermissionRequest
2574 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2575 }
2576
2577
2578 type GoogleAppsDriveLabelsV2UserCapabilities struct {
2579
2580
2581 CanAccessLabelManager bool `json:"canAccessLabelManager,omitempty"`
2582
2583
2584 CanAdministrateLabels bool `json:"canAdministrateLabels,omitempty"`
2585
2586
2587 CanCreateAdminLabels bool `json:"canCreateAdminLabels,omitempty"`
2588
2589
2590 CanCreateSharedLabels bool `json:"canCreateSharedLabels,omitempty"`
2591
2592 Name string `json:"name,omitempty"`
2593
2594
2595 googleapi.ServerResponse `json:"-"`
2596
2597
2598
2599
2600
2601 ForceSendFields []string `json:"-"`
2602
2603
2604
2605
2606 NullFields []string `json:"-"`
2607 }
2608
2609 func (s *GoogleAppsDriveLabelsV2UserCapabilities) MarshalJSON() ([]byte, error) {
2610 type NoMethod GoogleAppsDriveLabelsV2UserCapabilities
2611 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2612 }
2613
2614
2615 type GoogleAppsDriveLabelsV2UserInfo struct {
2616
2617
2618 Person string `json:"person,omitempty"`
2619
2620
2621
2622
2623
2624 ForceSendFields []string `json:"-"`
2625
2626
2627
2628
2629 NullFields []string `json:"-"`
2630 }
2631
2632 func (s *GoogleAppsDriveLabelsV2UserInfo) MarshalJSON() ([]byte, error) {
2633 type NoMethod GoogleAppsDriveLabelsV2UserInfo
2634 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2635 }
2636
2637
2638 type GoogleAppsDriveLabelsV2UserLimits struct {
2639
2640 ListLimits *GoogleAppsDriveLabelsV2ListLimits `json:"listLimits,omitempty"`
2641
2642
2643
2644
2645
2646 ForceSendFields []string `json:"-"`
2647
2648
2649
2650
2651 NullFields []string `json:"-"`
2652 }
2653
2654 func (s *GoogleAppsDriveLabelsV2UserLimits) MarshalJSON() ([]byte, error) {
2655 type NoMethod GoogleAppsDriveLabelsV2UserLimits
2656 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2657 }
2658
2659
2660
2661 type GoogleAppsDriveLabelsV2WriteControl struct {
2662
2663
2664
2665 RequiredRevisionId string `json:"requiredRevisionId,omitempty"`
2666
2667
2668
2669
2670
2671 ForceSendFields []string `json:"-"`
2672
2673
2674
2675
2676 NullFields []string `json:"-"`
2677 }
2678
2679 func (s *GoogleAppsDriveLabelsV2WriteControl) MarshalJSON() ([]byte, error) {
2680 type NoMethod GoogleAppsDriveLabelsV2WriteControl
2681 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2682 }
2683
2684
2685
2686
2687
2688
2689 type GoogleProtobufEmpty struct {
2690
2691 googleapi.ServerResponse `json:"-"`
2692 }
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742 type GoogleTypeColor struct {
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752 Alpha float64 `json:"alpha,omitempty"`
2753
2754 Blue float64 `json:"blue,omitempty"`
2755
2756 Green float64 `json:"green,omitempty"`
2757
2758 Red float64 `json:"red,omitempty"`
2759
2760
2761
2762
2763
2764 ForceSendFields []string `json:"-"`
2765
2766
2767
2768
2769 NullFields []string `json:"-"`
2770 }
2771
2772 func (s *GoogleTypeColor) MarshalJSON() ([]byte, error) {
2773 type NoMethod GoogleTypeColor
2774 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2775 }
2776
2777 func (s *GoogleTypeColor) UnmarshalJSON(data []byte) error {
2778 type NoMethod GoogleTypeColor
2779 var s1 struct {
2780 Alpha gensupport.JSONFloat64 `json:"alpha"`
2781 Blue gensupport.JSONFloat64 `json:"blue"`
2782 Green gensupport.JSONFloat64 `json:"green"`
2783 Red gensupport.JSONFloat64 `json:"red"`
2784 *NoMethod
2785 }
2786 s1.NoMethod = (*NoMethod)(s)
2787 if err := json.Unmarshal(data, &s1); err != nil {
2788 return err
2789 }
2790 s.Alpha = float64(s1.Alpha)
2791 s.Blue = float64(s1.Blue)
2792 s.Green = float64(s1.Green)
2793 s.Red = float64(s1.Red)
2794 return nil
2795 }
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806 type GoogleTypeDate struct {
2807
2808
2809
2810 Day int64 `json:"day,omitempty"`
2811
2812
2813 Month int64 `json:"month,omitempty"`
2814
2815
2816 Year int64 `json:"year,omitempty"`
2817
2818
2819
2820
2821
2822 ForceSendFields []string `json:"-"`
2823
2824
2825
2826
2827 NullFields []string `json:"-"`
2828 }
2829
2830 func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) {
2831 type NoMethod GoogleTypeDate
2832 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2833 }
2834
2835 type LabelsCreateCall struct {
2836 s *Service
2837 googleappsdrivelabelsv2label *GoogleAppsDriveLabelsV2Label
2838 urlParams_ gensupport.URLParams
2839 ctx_ context.Context
2840 header_ http.Header
2841 }
2842
2843
2844 func (r *LabelsService) Create(googleappsdrivelabelsv2label *GoogleAppsDriveLabelsV2Label) *LabelsCreateCall {
2845 c := &LabelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2846 c.googleappsdrivelabelsv2label = googleappsdrivelabelsv2label
2847 return c
2848 }
2849
2850
2851
2852
2853 func (c *LabelsCreateCall) LanguageCode(languageCode string) *LabelsCreateCall {
2854 c.urlParams_.Set("languageCode", languageCode)
2855 return c
2856 }
2857
2858
2859
2860
2861 func (c *LabelsCreateCall) UseAdminAccess(useAdminAccess bool) *LabelsCreateCall {
2862 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
2863 return c
2864 }
2865
2866
2867
2868
2869 func (c *LabelsCreateCall) Fields(s ...googleapi.Field) *LabelsCreateCall {
2870 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2871 return c
2872 }
2873
2874
2875 func (c *LabelsCreateCall) Context(ctx context.Context) *LabelsCreateCall {
2876 c.ctx_ = ctx
2877 return c
2878 }
2879
2880
2881
2882 func (c *LabelsCreateCall) Header() http.Header {
2883 if c.header_ == nil {
2884 c.header_ = make(http.Header)
2885 }
2886 return c.header_
2887 }
2888
2889 func (c *LabelsCreateCall) doRequest(alt string) (*http.Response, error) {
2890 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2891 var body io.Reader = nil
2892 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleappsdrivelabelsv2label)
2893 if err != nil {
2894 return nil, err
2895 }
2896 c.urlParams_.Set("alt", alt)
2897 c.urlParams_.Set("prettyPrint", "false")
2898 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/labels")
2899 urls += "?" + c.urlParams_.Encode()
2900 req, err := http.NewRequest("POST", urls, body)
2901 if err != nil {
2902 return nil, err
2903 }
2904 req.Header = reqHeaders
2905 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2906 }
2907
2908
2909
2910
2911
2912
2913
2914 func (c *LabelsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2Label, error) {
2915 gensupport.SetOptions(c.urlParams_, opts...)
2916 res, err := c.doRequest("json")
2917 if res != nil && res.StatusCode == http.StatusNotModified {
2918 if res.Body != nil {
2919 res.Body.Close()
2920 }
2921 return nil, gensupport.WrapError(&googleapi.Error{
2922 Code: res.StatusCode,
2923 Header: res.Header,
2924 })
2925 }
2926 if err != nil {
2927 return nil, err
2928 }
2929 defer googleapi.CloseBody(res)
2930 if err := googleapi.CheckResponse(res); err != nil {
2931 return nil, gensupport.WrapError(err)
2932 }
2933 ret := &GoogleAppsDriveLabelsV2Label{
2934 ServerResponse: googleapi.ServerResponse{
2935 Header: res.Header,
2936 HTTPStatusCode: res.StatusCode,
2937 },
2938 }
2939 target := &ret
2940 if err := gensupport.DecodeResponse(target, res); err != nil {
2941 return nil, err
2942 }
2943 return ret, nil
2944 }
2945
2946 type LabelsDeleteCall struct {
2947 s *Service
2948 name string
2949 urlParams_ gensupport.URLParams
2950 ctx_ context.Context
2951 header_ http.Header
2952 }
2953
2954
2955
2956
2957
2958
2959 func (r *LabelsService) Delete(name string) *LabelsDeleteCall {
2960 c := &LabelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2961 c.name = name
2962 return c
2963 }
2964
2965
2966
2967
2968 func (c *LabelsDeleteCall) UseAdminAccess(useAdminAccess bool) *LabelsDeleteCall {
2969 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
2970 return c
2971 }
2972
2973
2974
2975
2976
2977
2978 func (c *LabelsDeleteCall) WriteControlRequiredRevisionId(writeControlRequiredRevisionId string) *LabelsDeleteCall {
2979 c.urlParams_.Set("writeControl.requiredRevisionId", writeControlRequiredRevisionId)
2980 return c
2981 }
2982
2983
2984
2985
2986 func (c *LabelsDeleteCall) Fields(s ...googleapi.Field) *LabelsDeleteCall {
2987 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2988 return c
2989 }
2990
2991
2992 func (c *LabelsDeleteCall) Context(ctx context.Context) *LabelsDeleteCall {
2993 c.ctx_ = ctx
2994 return c
2995 }
2996
2997
2998
2999 func (c *LabelsDeleteCall) Header() http.Header {
3000 if c.header_ == nil {
3001 c.header_ = make(http.Header)
3002 }
3003 return c.header_
3004 }
3005
3006 func (c *LabelsDeleteCall) doRequest(alt string) (*http.Response, error) {
3007 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3008 var body io.Reader = nil
3009 c.urlParams_.Set("alt", alt)
3010 c.urlParams_.Set("prettyPrint", "false")
3011 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
3012 urls += "?" + c.urlParams_.Encode()
3013 req, err := http.NewRequest("DELETE", urls, body)
3014 if err != nil {
3015 return nil, err
3016 }
3017 req.Header = reqHeaders
3018 googleapi.Expand(req.URL, map[string]string{
3019 "name": c.name,
3020 })
3021 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3022 }
3023
3024
3025
3026
3027
3028
3029
3030 func (c *LabelsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
3031 gensupport.SetOptions(c.urlParams_, opts...)
3032 res, err := c.doRequest("json")
3033 if res != nil && res.StatusCode == http.StatusNotModified {
3034 if res.Body != nil {
3035 res.Body.Close()
3036 }
3037 return nil, gensupport.WrapError(&googleapi.Error{
3038 Code: res.StatusCode,
3039 Header: res.Header,
3040 })
3041 }
3042 if err != nil {
3043 return nil, err
3044 }
3045 defer googleapi.CloseBody(res)
3046 if err := googleapi.CheckResponse(res); err != nil {
3047 return nil, gensupport.WrapError(err)
3048 }
3049 ret := &GoogleProtobufEmpty{
3050 ServerResponse: googleapi.ServerResponse{
3051 Header: res.Header,
3052 HTTPStatusCode: res.StatusCode,
3053 },
3054 }
3055 target := &ret
3056 if err := gensupport.DecodeResponse(target, res); err != nil {
3057 return nil, err
3058 }
3059 return ret, nil
3060 }
3061
3062 type LabelsDeltaCall struct {
3063 s *Service
3064 name string
3065 googleappsdrivelabelsv2deltaupdatelabelrequest *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest
3066 urlParams_ gensupport.URLParams
3067 ctx_ context.Context
3068 header_ http.Header
3069 }
3070
3071
3072
3073
3074
3075
3076
3077 func (r *LabelsService) Delta(name string, googleappsdrivelabelsv2deltaupdatelabelrequest *GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest) *LabelsDeltaCall {
3078 c := &LabelsDeltaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3079 c.name = name
3080 c.googleappsdrivelabelsv2deltaupdatelabelrequest = googleappsdrivelabelsv2deltaupdatelabelrequest
3081 return c
3082 }
3083
3084
3085
3086
3087 func (c *LabelsDeltaCall) Fields(s ...googleapi.Field) *LabelsDeltaCall {
3088 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3089 return c
3090 }
3091
3092
3093 func (c *LabelsDeltaCall) Context(ctx context.Context) *LabelsDeltaCall {
3094 c.ctx_ = ctx
3095 return c
3096 }
3097
3098
3099
3100 func (c *LabelsDeltaCall) Header() http.Header {
3101 if c.header_ == nil {
3102 c.header_ = make(http.Header)
3103 }
3104 return c.header_
3105 }
3106
3107 func (c *LabelsDeltaCall) doRequest(alt string) (*http.Response, error) {
3108 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3109 var body io.Reader = nil
3110 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleappsdrivelabelsv2deltaupdatelabelrequest)
3111 if err != nil {
3112 return nil, err
3113 }
3114 c.urlParams_.Set("alt", alt)
3115 c.urlParams_.Set("prettyPrint", "false")
3116 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:delta")
3117 urls += "?" + c.urlParams_.Encode()
3118 req, err := http.NewRequest("POST", urls, body)
3119 if err != nil {
3120 return nil, err
3121 }
3122 req.Header = reqHeaders
3123 googleapi.Expand(req.URL, map[string]string{
3124 "name": c.name,
3125 })
3126 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3127 }
3128
3129
3130
3131
3132
3133
3134
3135 func (c *LabelsDeltaCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse, error) {
3136 gensupport.SetOptions(c.urlParams_, opts...)
3137 res, err := c.doRequest("json")
3138 if res != nil && res.StatusCode == http.StatusNotModified {
3139 if res.Body != nil {
3140 res.Body.Close()
3141 }
3142 return nil, gensupport.WrapError(&googleapi.Error{
3143 Code: res.StatusCode,
3144 Header: res.Header,
3145 })
3146 }
3147 if err != nil {
3148 return nil, err
3149 }
3150 defer googleapi.CloseBody(res)
3151 if err := googleapi.CheckResponse(res); err != nil {
3152 return nil, gensupport.WrapError(err)
3153 }
3154 ret := &GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse{
3155 ServerResponse: googleapi.ServerResponse{
3156 Header: res.Header,
3157 HTTPStatusCode: res.StatusCode,
3158 },
3159 }
3160 target := &ret
3161 if err := gensupport.DecodeResponse(target, res); err != nil {
3162 return nil, err
3163 }
3164 return ret, nil
3165 }
3166
3167 type LabelsDisableCall struct {
3168 s *Service
3169 name string
3170 googleappsdrivelabelsv2disablelabelrequest *GoogleAppsDriveLabelsV2DisableLabelRequest
3171 urlParams_ gensupport.URLParams
3172 ctx_ context.Context
3173 header_ http.Header
3174 }
3175
3176
3177
3178
3179
3180
3181
3182
3183 func (r *LabelsService) Disable(name string, googleappsdrivelabelsv2disablelabelrequest *GoogleAppsDriveLabelsV2DisableLabelRequest) *LabelsDisableCall {
3184 c := &LabelsDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3185 c.name = name
3186 c.googleappsdrivelabelsv2disablelabelrequest = googleappsdrivelabelsv2disablelabelrequest
3187 return c
3188 }
3189
3190
3191
3192
3193 func (c *LabelsDisableCall) Fields(s ...googleapi.Field) *LabelsDisableCall {
3194 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3195 return c
3196 }
3197
3198
3199 func (c *LabelsDisableCall) Context(ctx context.Context) *LabelsDisableCall {
3200 c.ctx_ = ctx
3201 return c
3202 }
3203
3204
3205
3206 func (c *LabelsDisableCall) Header() http.Header {
3207 if c.header_ == nil {
3208 c.header_ = make(http.Header)
3209 }
3210 return c.header_
3211 }
3212
3213 func (c *LabelsDisableCall) doRequest(alt string) (*http.Response, error) {
3214 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3215 var body io.Reader = nil
3216 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleappsdrivelabelsv2disablelabelrequest)
3217 if err != nil {
3218 return nil, err
3219 }
3220 c.urlParams_.Set("alt", alt)
3221 c.urlParams_.Set("prettyPrint", "false")
3222 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:disable")
3223 urls += "?" + c.urlParams_.Encode()
3224 req, err := http.NewRequest("POST", urls, body)
3225 if err != nil {
3226 return nil, err
3227 }
3228 req.Header = reqHeaders
3229 googleapi.Expand(req.URL, map[string]string{
3230 "name": c.name,
3231 })
3232 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3233 }
3234
3235
3236
3237
3238
3239
3240
3241 func (c *LabelsDisableCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2Label, error) {
3242 gensupport.SetOptions(c.urlParams_, opts...)
3243 res, err := c.doRequest("json")
3244 if res != nil && res.StatusCode == http.StatusNotModified {
3245 if res.Body != nil {
3246 res.Body.Close()
3247 }
3248 return nil, gensupport.WrapError(&googleapi.Error{
3249 Code: res.StatusCode,
3250 Header: res.Header,
3251 })
3252 }
3253 if err != nil {
3254 return nil, err
3255 }
3256 defer googleapi.CloseBody(res)
3257 if err := googleapi.CheckResponse(res); err != nil {
3258 return nil, gensupport.WrapError(err)
3259 }
3260 ret := &GoogleAppsDriveLabelsV2Label{
3261 ServerResponse: googleapi.ServerResponse{
3262 Header: res.Header,
3263 HTTPStatusCode: res.StatusCode,
3264 },
3265 }
3266 target := &ret
3267 if err := gensupport.DecodeResponse(target, res); err != nil {
3268 return nil, err
3269 }
3270 return ret, nil
3271 }
3272
3273 type LabelsEnableCall struct {
3274 s *Service
3275 name string
3276 googleappsdrivelabelsv2enablelabelrequest *GoogleAppsDriveLabelsV2EnableLabelRequest
3277 urlParams_ gensupport.URLParams
3278 ctx_ context.Context
3279 header_ http.Header
3280 }
3281
3282
3283
3284
3285
3286
3287
3288 func (r *LabelsService) Enable(name string, googleappsdrivelabelsv2enablelabelrequest *GoogleAppsDriveLabelsV2EnableLabelRequest) *LabelsEnableCall {
3289 c := &LabelsEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3290 c.name = name
3291 c.googleappsdrivelabelsv2enablelabelrequest = googleappsdrivelabelsv2enablelabelrequest
3292 return c
3293 }
3294
3295
3296
3297
3298 func (c *LabelsEnableCall) Fields(s ...googleapi.Field) *LabelsEnableCall {
3299 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3300 return c
3301 }
3302
3303
3304 func (c *LabelsEnableCall) Context(ctx context.Context) *LabelsEnableCall {
3305 c.ctx_ = ctx
3306 return c
3307 }
3308
3309
3310
3311 func (c *LabelsEnableCall) Header() http.Header {
3312 if c.header_ == nil {
3313 c.header_ = make(http.Header)
3314 }
3315 return c.header_
3316 }
3317
3318 func (c *LabelsEnableCall) doRequest(alt string) (*http.Response, error) {
3319 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3320 var body io.Reader = nil
3321 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleappsdrivelabelsv2enablelabelrequest)
3322 if err != nil {
3323 return nil, err
3324 }
3325 c.urlParams_.Set("alt", alt)
3326 c.urlParams_.Set("prettyPrint", "false")
3327 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:enable")
3328 urls += "?" + c.urlParams_.Encode()
3329 req, err := http.NewRequest("POST", urls, body)
3330 if err != nil {
3331 return nil, err
3332 }
3333 req.Header = reqHeaders
3334 googleapi.Expand(req.URL, map[string]string{
3335 "name": c.name,
3336 })
3337 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3338 }
3339
3340
3341
3342
3343
3344
3345
3346 func (c *LabelsEnableCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2Label, error) {
3347 gensupport.SetOptions(c.urlParams_, opts...)
3348 res, err := c.doRequest("json")
3349 if res != nil && res.StatusCode == http.StatusNotModified {
3350 if res.Body != nil {
3351 res.Body.Close()
3352 }
3353 return nil, gensupport.WrapError(&googleapi.Error{
3354 Code: res.StatusCode,
3355 Header: res.Header,
3356 })
3357 }
3358 if err != nil {
3359 return nil, err
3360 }
3361 defer googleapi.CloseBody(res)
3362 if err := googleapi.CheckResponse(res); err != nil {
3363 return nil, gensupport.WrapError(err)
3364 }
3365 ret := &GoogleAppsDriveLabelsV2Label{
3366 ServerResponse: googleapi.ServerResponse{
3367 Header: res.Header,
3368 HTTPStatusCode: res.StatusCode,
3369 },
3370 }
3371 target := &ret
3372 if err := gensupport.DecodeResponse(target, res); err != nil {
3373 return nil, err
3374 }
3375 return ret, nil
3376 }
3377
3378 type LabelsGetCall struct {
3379 s *Service
3380 name string
3381 urlParams_ gensupport.URLParams
3382 ifNoneMatch_ string
3383 ctx_ context.Context
3384 header_ http.Header
3385 }
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396 func (r *LabelsService) Get(name string) *LabelsGetCall {
3397 c := &LabelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3398 c.name = name
3399 return c
3400 }
3401
3402
3403
3404
3405 func (c *LabelsGetCall) LanguageCode(languageCode string) *LabelsGetCall {
3406 c.urlParams_.Set("languageCode", languageCode)
3407 return c
3408 }
3409
3410
3411
3412
3413 func (c *LabelsGetCall) UseAdminAccess(useAdminAccess bool) *LabelsGetCall {
3414 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
3415 return c
3416 }
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428 func (c *LabelsGetCall) View(view string) *LabelsGetCall {
3429 c.urlParams_.Set("view", view)
3430 return c
3431 }
3432
3433
3434
3435
3436 func (c *LabelsGetCall) Fields(s ...googleapi.Field) *LabelsGetCall {
3437 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3438 return c
3439 }
3440
3441
3442
3443
3444 func (c *LabelsGetCall) IfNoneMatch(entityTag string) *LabelsGetCall {
3445 c.ifNoneMatch_ = entityTag
3446 return c
3447 }
3448
3449
3450 func (c *LabelsGetCall) Context(ctx context.Context) *LabelsGetCall {
3451 c.ctx_ = ctx
3452 return c
3453 }
3454
3455
3456
3457 func (c *LabelsGetCall) Header() http.Header {
3458 if c.header_ == nil {
3459 c.header_ = make(http.Header)
3460 }
3461 return c.header_
3462 }
3463
3464 func (c *LabelsGetCall) doRequest(alt string) (*http.Response, error) {
3465 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3466 if c.ifNoneMatch_ != "" {
3467 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3468 }
3469 var body io.Reader = nil
3470 c.urlParams_.Set("alt", alt)
3471 c.urlParams_.Set("prettyPrint", "false")
3472 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
3473 urls += "?" + c.urlParams_.Encode()
3474 req, err := http.NewRequest("GET", urls, body)
3475 if err != nil {
3476 return nil, err
3477 }
3478 req.Header = reqHeaders
3479 googleapi.Expand(req.URL, map[string]string{
3480 "name": c.name,
3481 })
3482 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3483 }
3484
3485
3486
3487
3488
3489
3490
3491 func (c *LabelsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2Label, error) {
3492 gensupport.SetOptions(c.urlParams_, opts...)
3493 res, err := c.doRequest("json")
3494 if res != nil && res.StatusCode == http.StatusNotModified {
3495 if res.Body != nil {
3496 res.Body.Close()
3497 }
3498 return nil, gensupport.WrapError(&googleapi.Error{
3499 Code: res.StatusCode,
3500 Header: res.Header,
3501 })
3502 }
3503 if err != nil {
3504 return nil, err
3505 }
3506 defer googleapi.CloseBody(res)
3507 if err := googleapi.CheckResponse(res); err != nil {
3508 return nil, gensupport.WrapError(err)
3509 }
3510 ret := &GoogleAppsDriveLabelsV2Label{
3511 ServerResponse: googleapi.ServerResponse{
3512 Header: res.Header,
3513 HTTPStatusCode: res.StatusCode,
3514 },
3515 }
3516 target := &ret
3517 if err := gensupport.DecodeResponse(target, res); err != nil {
3518 return nil, err
3519 }
3520 return ret, nil
3521 }
3522
3523 type LabelsListCall struct {
3524 s *Service
3525 urlParams_ gensupport.URLParams
3526 ifNoneMatch_ string
3527 ctx_ context.Context
3528 header_ http.Header
3529 }
3530
3531
3532 func (r *LabelsService) List() *LabelsListCall {
3533 c := &LabelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3534 return c
3535 }
3536
3537
3538
3539
3540 func (c *LabelsListCall) Customer(customer string) *LabelsListCall {
3541 c.urlParams_.Set("customer", customer)
3542 return c
3543 }
3544
3545
3546
3547
3548 func (c *LabelsListCall) LanguageCode(languageCode string) *LabelsListCall {
3549 c.urlParams_.Set("languageCode", languageCode)
3550 return c
3551 }
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575 func (c *LabelsListCall) MinimumRole(minimumRole string) *LabelsListCall {
3576 c.urlParams_.Set("minimumRole", minimumRole)
3577 return c
3578 }
3579
3580
3581
3582 func (c *LabelsListCall) PageSize(pageSize int64) *LabelsListCall {
3583 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3584 return c
3585 }
3586
3587
3588
3589 func (c *LabelsListCall) PageToken(pageToken string) *LabelsListCall {
3590 c.urlParams_.Set("pageToken", pageToken)
3591 return c
3592 }
3593
3594
3595
3596
3597
3598
3599
3600
3601 func (c *LabelsListCall) PublishedOnly(publishedOnly bool) *LabelsListCall {
3602 c.urlParams_.Set("publishedOnly", fmt.Sprint(publishedOnly))
3603 return c
3604 }
3605
3606
3607
3608
3609 func (c *LabelsListCall) UseAdminAccess(useAdminAccess bool) *LabelsListCall {
3610 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
3611 return c
3612 }
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624 func (c *LabelsListCall) View(view string) *LabelsListCall {
3625 c.urlParams_.Set("view", view)
3626 return c
3627 }
3628
3629
3630
3631
3632 func (c *LabelsListCall) Fields(s ...googleapi.Field) *LabelsListCall {
3633 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3634 return c
3635 }
3636
3637
3638
3639
3640 func (c *LabelsListCall) IfNoneMatch(entityTag string) *LabelsListCall {
3641 c.ifNoneMatch_ = entityTag
3642 return c
3643 }
3644
3645
3646 func (c *LabelsListCall) Context(ctx context.Context) *LabelsListCall {
3647 c.ctx_ = ctx
3648 return c
3649 }
3650
3651
3652
3653 func (c *LabelsListCall) Header() http.Header {
3654 if c.header_ == nil {
3655 c.header_ = make(http.Header)
3656 }
3657 return c.header_
3658 }
3659
3660 func (c *LabelsListCall) doRequest(alt string) (*http.Response, error) {
3661 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3662 if c.ifNoneMatch_ != "" {
3663 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3664 }
3665 var body io.Reader = nil
3666 c.urlParams_.Set("alt", alt)
3667 c.urlParams_.Set("prettyPrint", "false")
3668 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/labels")
3669 urls += "?" + c.urlParams_.Encode()
3670 req, err := http.NewRequest("GET", urls, body)
3671 if err != nil {
3672 return nil, err
3673 }
3674 req.Header = reqHeaders
3675 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3676 }
3677
3678
3679
3680
3681
3682
3683
3684 func (c *LabelsListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2ListLabelsResponse, error) {
3685 gensupport.SetOptions(c.urlParams_, opts...)
3686 res, err := c.doRequest("json")
3687 if res != nil && res.StatusCode == http.StatusNotModified {
3688 if res.Body != nil {
3689 res.Body.Close()
3690 }
3691 return nil, gensupport.WrapError(&googleapi.Error{
3692 Code: res.StatusCode,
3693 Header: res.Header,
3694 })
3695 }
3696 if err != nil {
3697 return nil, err
3698 }
3699 defer googleapi.CloseBody(res)
3700 if err := googleapi.CheckResponse(res); err != nil {
3701 return nil, gensupport.WrapError(err)
3702 }
3703 ret := &GoogleAppsDriveLabelsV2ListLabelsResponse{
3704 ServerResponse: googleapi.ServerResponse{
3705 Header: res.Header,
3706 HTTPStatusCode: res.StatusCode,
3707 },
3708 }
3709 target := &ret
3710 if err := gensupport.DecodeResponse(target, res); err != nil {
3711 return nil, err
3712 }
3713 return ret, nil
3714 }
3715
3716
3717
3718
3719 func (c *LabelsListCall) Pages(ctx context.Context, f func(*GoogleAppsDriveLabelsV2ListLabelsResponse) error) error {
3720 c.ctx_ = ctx
3721 defer c.PageToken(c.urlParams_.Get("pageToken"))
3722 for {
3723 x, err := c.Do()
3724 if err != nil {
3725 return err
3726 }
3727 if err := f(x); err != nil {
3728 return err
3729 }
3730 if x.NextPageToken == "" {
3731 return nil
3732 }
3733 c.PageToken(x.NextPageToken)
3734 }
3735 }
3736
3737 type LabelsPublishCall struct {
3738 s *Service
3739 name string
3740 googleappsdrivelabelsv2publishlabelrequest *GoogleAppsDriveLabelsV2PublishLabelRequest
3741 urlParams_ gensupport.URLParams
3742 ctx_ context.Context
3743 header_ http.Header
3744 }
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761 func (r *LabelsService) Publish(name string, googleappsdrivelabelsv2publishlabelrequest *GoogleAppsDriveLabelsV2PublishLabelRequest) *LabelsPublishCall {
3762 c := &LabelsPublishCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3763 c.name = name
3764 c.googleappsdrivelabelsv2publishlabelrequest = googleappsdrivelabelsv2publishlabelrequest
3765 return c
3766 }
3767
3768
3769
3770
3771 func (c *LabelsPublishCall) Fields(s ...googleapi.Field) *LabelsPublishCall {
3772 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3773 return c
3774 }
3775
3776
3777 func (c *LabelsPublishCall) Context(ctx context.Context) *LabelsPublishCall {
3778 c.ctx_ = ctx
3779 return c
3780 }
3781
3782
3783
3784 func (c *LabelsPublishCall) Header() http.Header {
3785 if c.header_ == nil {
3786 c.header_ = make(http.Header)
3787 }
3788 return c.header_
3789 }
3790
3791 func (c *LabelsPublishCall) doRequest(alt string) (*http.Response, error) {
3792 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3793 var body io.Reader = nil
3794 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleappsdrivelabelsv2publishlabelrequest)
3795 if err != nil {
3796 return nil, err
3797 }
3798 c.urlParams_.Set("alt", alt)
3799 c.urlParams_.Set("prettyPrint", "false")
3800 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:publish")
3801 urls += "?" + c.urlParams_.Encode()
3802 req, err := http.NewRequest("POST", urls, body)
3803 if err != nil {
3804 return nil, err
3805 }
3806 req.Header = reqHeaders
3807 googleapi.Expand(req.URL, map[string]string{
3808 "name": c.name,
3809 })
3810 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3811 }
3812
3813
3814
3815
3816
3817
3818
3819 func (c *LabelsPublishCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2Label, error) {
3820 gensupport.SetOptions(c.urlParams_, opts...)
3821 res, err := c.doRequest("json")
3822 if res != nil && res.StatusCode == http.StatusNotModified {
3823 if res.Body != nil {
3824 res.Body.Close()
3825 }
3826 return nil, gensupport.WrapError(&googleapi.Error{
3827 Code: res.StatusCode,
3828 Header: res.Header,
3829 })
3830 }
3831 if err != nil {
3832 return nil, err
3833 }
3834 defer googleapi.CloseBody(res)
3835 if err := googleapi.CheckResponse(res); err != nil {
3836 return nil, gensupport.WrapError(err)
3837 }
3838 ret := &GoogleAppsDriveLabelsV2Label{
3839 ServerResponse: googleapi.ServerResponse{
3840 Header: res.Header,
3841 HTTPStatusCode: res.StatusCode,
3842 },
3843 }
3844 target := &ret
3845 if err := gensupport.DecodeResponse(target, res); err != nil {
3846 return nil, err
3847 }
3848 return ret, nil
3849 }
3850
3851 type LabelsUpdateLabelCopyModeCall struct {
3852 s *Service
3853 name string
3854 googleappsdrivelabelsv2updatelabelcopymoderequest *GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest
3855 urlParams_ gensupport.URLParams
3856 ctx_ context.Context
3857 header_ http.Header
3858 }
3859
3860
3861
3862
3863
3864 func (r *LabelsService) UpdateLabelCopyMode(name string, googleappsdrivelabelsv2updatelabelcopymoderequest *GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest) *LabelsUpdateLabelCopyModeCall {
3865 c := &LabelsUpdateLabelCopyModeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3866 c.name = name
3867 c.googleappsdrivelabelsv2updatelabelcopymoderequest = googleappsdrivelabelsv2updatelabelcopymoderequest
3868 return c
3869 }
3870
3871
3872
3873
3874 func (c *LabelsUpdateLabelCopyModeCall) Fields(s ...googleapi.Field) *LabelsUpdateLabelCopyModeCall {
3875 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3876 return c
3877 }
3878
3879
3880 func (c *LabelsUpdateLabelCopyModeCall) Context(ctx context.Context) *LabelsUpdateLabelCopyModeCall {
3881 c.ctx_ = ctx
3882 return c
3883 }
3884
3885
3886
3887 func (c *LabelsUpdateLabelCopyModeCall) Header() http.Header {
3888 if c.header_ == nil {
3889 c.header_ = make(http.Header)
3890 }
3891 return c.header_
3892 }
3893
3894 func (c *LabelsUpdateLabelCopyModeCall) doRequest(alt string) (*http.Response, error) {
3895 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3896 var body io.Reader = nil
3897 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleappsdrivelabelsv2updatelabelcopymoderequest)
3898 if err != nil {
3899 return nil, err
3900 }
3901 c.urlParams_.Set("alt", alt)
3902 c.urlParams_.Set("prettyPrint", "false")
3903 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:updateLabelCopyMode")
3904 urls += "?" + c.urlParams_.Encode()
3905 req, err := http.NewRequest("POST", urls, body)
3906 if err != nil {
3907 return nil, err
3908 }
3909 req.Header = reqHeaders
3910 googleapi.Expand(req.URL, map[string]string{
3911 "name": c.name,
3912 })
3913 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3914 }
3915
3916
3917
3918
3919
3920
3921
3922 func (c *LabelsUpdateLabelCopyModeCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2Label, error) {
3923 gensupport.SetOptions(c.urlParams_, opts...)
3924 res, err := c.doRequest("json")
3925 if res != nil && res.StatusCode == http.StatusNotModified {
3926 if res.Body != nil {
3927 res.Body.Close()
3928 }
3929 return nil, gensupport.WrapError(&googleapi.Error{
3930 Code: res.StatusCode,
3931 Header: res.Header,
3932 })
3933 }
3934 if err != nil {
3935 return nil, err
3936 }
3937 defer googleapi.CloseBody(res)
3938 if err := googleapi.CheckResponse(res); err != nil {
3939 return nil, gensupport.WrapError(err)
3940 }
3941 ret := &GoogleAppsDriveLabelsV2Label{
3942 ServerResponse: googleapi.ServerResponse{
3943 Header: res.Header,
3944 HTTPStatusCode: res.StatusCode,
3945 },
3946 }
3947 target := &ret
3948 if err := gensupport.DecodeResponse(target, res); err != nil {
3949 return nil, err
3950 }
3951 return ret, nil
3952 }
3953
3954 type LabelsUpdatePermissionsCall struct {
3955 s *Service
3956 parent string
3957 googleappsdrivelabelsv2labelpermission *GoogleAppsDriveLabelsV2LabelPermission
3958 urlParams_ gensupport.URLParams
3959 ctx_ context.Context
3960 header_ http.Header
3961 }
3962
3963
3964
3965
3966
3967
3968
3969 func (r *LabelsService) UpdatePermissions(parent string, googleappsdrivelabelsv2labelpermission *GoogleAppsDriveLabelsV2LabelPermission) *LabelsUpdatePermissionsCall {
3970 c := &LabelsUpdatePermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3971 c.parent = parent
3972 c.googleappsdrivelabelsv2labelpermission = googleappsdrivelabelsv2labelpermission
3973 return c
3974 }
3975
3976
3977
3978
3979 func (c *LabelsUpdatePermissionsCall) UseAdminAccess(useAdminAccess bool) *LabelsUpdatePermissionsCall {
3980 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
3981 return c
3982 }
3983
3984
3985
3986
3987 func (c *LabelsUpdatePermissionsCall) Fields(s ...googleapi.Field) *LabelsUpdatePermissionsCall {
3988 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3989 return c
3990 }
3991
3992
3993 func (c *LabelsUpdatePermissionsCall) Context(ctx context.Context) *LabelsUpdatePermissionsCall {
3994 c.ctx_ = ctx
3995 return c
3996 }
3997
3998
3999
4000 func (c *LabelsUpdatePermissionsCall) Header() http.Header {
4001 if c.header_ == nil {
4002 c.header_ = make(http.Header)
4003 }
4004 return c.header_
4005 }
4006
4007 func (c *LabelsUpdatePermissionsCall) doRequest(alt string) (*http.Response, error) {
4008 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4009 var body io.Reader = nil
4010 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleappsdrivelabelsv2labelpermission)
4011 if err != nil {
4012 return nil, err
4013 }
4014 c.urlParams_.Set("alt", alt)
4015 c.urlParams_.Set("prettyPrint", "false")
4016 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/permissions")
4017 urls += "?" + c.urlParams_.Encode()
4018 req, err := http.NewRequest("PATCH", urls, body)
4019 if err != nil {
4020 return nil, err
4021 }
4022 req.Header = reqHeaders
4023 googleapi.Expand(req.URL, map[string]string{
4024 "parent": c.parent,
4025 })
4026 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4027 }
4028
4029
4030
4031
4032
4033
4034
4035 func (c *LabelsUpdatePermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2LabelPermission, error) {
4036 gensupport.SetOptions(c.urlParams_, opts...)
4037 res, err := c.doRequest("json")
4038 if res != nil && res.StatusCode == http.StatusNotModified {
4039 if res.Body != nil {
4040 res.Body.Close()
4041 }
4042 return nil, gensupport.WrapError(&googleapi.Error{
4043 Code: res.StatusCode,
4044 Header: res.Header,
4045 })
4046 }
4047 if err != nil {
4048 return nil, err
4049 }
4050 defer googleapi.CloseBody(res)
4051 if err := googleapi.CheckResponse(res); err != nil {
4052 return nil, gensupport.WrapError(err)
4053 }
4054 ret := &GoogleAppsDriveLabelsV2LabelPermission{
4055 ServerResponse: googleapi.ServerResponse{
4056 Header: res.Header,
4057 HTTPStatusCode: res.StatusCode,
4058 },
4059 }
4060 target := &ret
4061 if err := gensupport.DecodeResponse(target, res); err != nil {
4062 return nil, err
4063 }
4064 return ret, nil
4065 }
4066
4067 type LabelsLocksListCall struct {
4068 s *Service
4069 parent string
4070 urlParams_ gensupport.URLParams
4071 ifNoneMatch_ string
4072 ctx_ context.Context
4073 header_ http.Header
4074 }
4075
4076
4077
4078
4079 func (r *LabelsLocksService) List(parent string) *LabelsLocksListCall {
4080 c := &LabelsLocksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4081 c.parent = parent
4082 return c
4083 }
4084
4085
4086
4087 func (c *LabelsLocksListCall) PageSize(pageSize int64) *LabelsLocksListCall {
4088 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4089 return c
4090 }
4091
4092
4093
4094 func (c *LabelsLocksListCall) PageToken(pageToken string) *LabelsLocksListCall {
4095 c.urlParams_.Set("pageToken", pageToken)
4096 return c
4097 }
4098
4099
4100
4101
4102 func (c *LabelsLocksListCall) Fields(s ...googleapi.Field) *LabelsLocksListCall {
4103 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4104 return c
4105 }
4106
4107
4108
4109
4110 func (c *LabelsLocksListCall) IfNoneMatch(entityTag string) *LabelsLocksListCall {
4111 c.ifNoneMatch_ = entityTag
4112 return c
4113 }
4114
4115
4116 func (c *LabelsLocksListCall) Context(ctx context.Context) *LabelsLocksListCall {
4117 c.ctx_ = ctx
4118 return c
4119 }
4120
4121
4122
4123 func (c *LabelsLocksListCall) Header() http.Header {
4124 if c.header_ == nil {
4125 c.header_ = make(http.Header)
4126 }
4127 return c.header_
4128 }
4129
4130 func (c *LabelsLocksListCall) doRequest(alt string) (*http.Response, error) {
4131 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4132 if c.ifNoneMatch_ != "" {
4133 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4134 }
4135 var body io.Reader = nil
4136 c.urlParams_.Set("alt", alt)
4137 c.urlParams_.Set("prettyPrint", "false")
4138 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/locks")
4139 urls += "?" + c.urlParams_.Encode()
4140 req, err := http.NewRequest("GET", urls, body)
4141 if err != nil {
4142 return nil, err
4143 }
4144 req.Header = reqHeaders
4145 googleapi.Expand(req.URL, map[string]string{
4146 "parent": c.parent,
4147 })
4148 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4149 }
4150
4151
4152
4153
4154
4155
4156
4157 func (c *LabelsLocksListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2ListLabelLocksResponse, error) {
4158 gensupport.SetOptions(c.urlParams_, opts...)
4159 res, err := c.doRequest("json")
4160 if res != nil && res.StatusCode == http.StatusNotModified {
4161 if res.Body != nil {
4162 res.Body.Close()
4163 }
4164 return nil, gensupport.WrapError(&googleapi.Error{
4165 Code: res.StatusCode,
4166 Header: res.Header,
4167 })
4168 }
4169 if err != nil {
4170 return nil, err
4171 }
4172 defer googleapi.CloseBody(res)
4173 if err := googleapi.CheckResponse(res); err != nil {
4174 return nil, gensupport.WrapError(err)
4175 }
4176 ret := &GoogleAppsDriveLabelsV2ListLabelLocksResponse{
4177 ServerResponse: googleapi.ServerResponse{
4178 Header: res.Header,
4179 HTTPStatusCode: res.StatusCode,
4180 },
4181 }
4182 target := &ret
4183 if err := gensupport.DecodeResponse(target, res); err != nil {
4184 return nil, err
4185 }
4186 return ret, nil
4187 }
4188
4189
4190
4191
4192 func (c *LabelsLocksListCall) Pages(ctx context.Context, f func(*GoogleAppsDriveLabelsV2ListLabelLocksResponse) error) error {
4193 c.ctx_ = ctx
4194 defer c.PageToken(c.urlParams_.Get("pageToken"))
4195 for {
4196 x, err := c.Do()
4197 if err != nil {
4198 return err
4199 }
4200 if err := f(x); err != nil {
4201 return err
4202 }
4203 if x.NextPageToken == "" {
4204 return nil
4205 }
4206 c.PageToken(x.NextPageToken)
4207 }
4208 }
4209
4210 type LabelsPermissionsBatchDeleteCall struct {
4211 s *Service
4212 parent string
4213 googleappsdrivelabelsv2batchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest
4214 urlParams_ gensupport.URLParams
4215 ctx_ context.Context
4216 header_ http.Header
4217 }
4218
4219
4220
4221
4222
4223
4224
4225
4226 func (r *LabelsPermissionsService) BatchDelete(parent string, googleappsdrivelabelsv2batchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest) *LabelsPermissionsBatchDeleteCall {
4227 c := &LabelsPermissionsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4228 c.parent = parent
4229 c.googleappsdrivelabelsv2batchdeletelabelpermissionsrequest = googleappsdrivelabelsv2batchdeletelabelpermissionsrequest
4230 return c
4231 }
4232
4233
4234
4235
4236 func (c *LabelsPermissionsBatchDeleteCall) Fields(s ...googleapi.Field) *LabelsPermissionsBatchDeleteCall {
4237 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4238 return c
4239 }
4240
4241
4242 func (c *LabelsPermissionsBatchDeleteCall) Context(ctx context.Context) *LabelsPermissionsBatchDeleteCall {
4243 c.ctx_ = ctx
4244 return c
4245 }
4246
4247
4248
4249 func (c *LabelsPermissionsBatchDeleteCall) Header() http.Header {
4250 if c.header_ == nil {
4251 c.header_ = make(http.Header)
4252 }
4253 return c.header_
4254 }
4255
4256 func (c *LabelsPermissionsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
4257 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4258 var body io.Reader = nil
4259 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleappsdrivelabelsv2batchdeletelabelpermissionsrequest)
4260 if err != nil {
4261 return nil, err
4262 }
4263 c.urlParams_.Set("alt", alt)
4264 c.urlParams_.Set("prettyPrint", "false")
4265 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/permissions:batchDelete")
4266 urls += "?" + c.urlParams_.Encode()
4267 req, err := http.NewRequest("POST", urls, body)
4268 if err != nil {
4269 return nil, err
4270 }
4271 req.Header = reqHeaders
4272 googleapi.Expand(req.URL, map[string]string{
4273 "parent": c.parent,
4274 })
4275 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4276 }
4277
4278
4279
4280
4281
4282
4283
4284 func (c *LabelsPermissionsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
4285 gensupport.SetOptions(c.urlParams_, opts...)
4286 res, err := c.doRequest("json")
4287 if res != nil && res.StatusCode == http.StatusNotModified {
4288 if res.Body != nil {
4289 res.Body.Close()
4290 }
4291 return nil, gensupport.WrapError(&googleapi.Error{
4292 Code: res.StatusCode,
4293 Header: res.Header,
4294 })
4295 }
4296 if err != nil {
4297 return nil, err
4298 }
4299 defer googleapi.CloseBody(res)
4300 if err := googleapi.CheckResponse(res); err != nil {
4301 return nil, gensupport.WrapError(err)
4302 }
4303 ret := &GoogleProtobufEmpty{
4304 ServerResponse: googleapi.ServerResponse{
4305 Header: res.Header,
4306 HTTPStatusCode: res.StatusCode,
4307 },
4308 }
4309 target := &ret
4310 if err := gensupport.DecodeResponse(target, res); err != nil {
4311 return nil, err
4312 }
4313 return ret, nil
4314 }
4315
4316 type LabelsPermissionsBatchUpdateCall struct {
4317 s *Service
4318 parent string
4319 googleappsdrivelabelsv2batchupdatelabelpermissionsrequest *GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest
4320 urlParams_ gensupport.URLParams
4321 ctx_ context.Context
4322 header_ http.Header
4323 }
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334 func (r *LabelsPermissionsService) BatchUpdate(parent string, googleappsdrivelabelsv2batchupdatelabelpermissionsrequest *GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest) *LabelsPermissionsBatchUpdateCall {
4335 c := &LabelsPermissionsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4336 c.parent = parent
4337 c.googleappsdrivelabelsv2batchupdatelabelpermissionsrequest = googleappsdrivelabelsv2batchupdatelabelpermissionsrequest
4338 return c
4339 }
4340
4341
4342
4343
4344 func (c *LabelsPermissionsBatchUpdateCall) Fields(s ...googleapi.Field) *LabelsPermissionsBatchUpdateCall {
4345 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4346 return c
4347 }
4348
4349
4350 func (c *LabelsPermissionsBatchUpdateCall) Context(ctx context.Context) *LabelsPermissionsBatchUpdateCall {
4351 c.ctx_ = ctx
4352 return c
4353 }
4354
4355
4356
4357 func (c *LabelsPermissionsBatchUpdateCall) Header() http.Header {
4358 if c.header_ == nil {
4359 c.header_ = make(http.Header)
4360 }
4361 return c.header_
4362 }
4363
4364 func (c *LabelsPermissionsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
4365 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4366 var body io.Reader = nil
4367 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleappsdrivelabelsv2batchupdatelabelpermissionsrequest)
4368 if err != nil {
4369 return nil, err
4370 }
4371 c.urlParams_.Set("alt", alt)
4372 c.urlParams_.Set("prettyPrint", "false")
4373 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/permissions:batchUpdate")
4374 urls += "?" + c.urlParams_.Encode()
4375 req, err := http.NewRequest("POST", urls, body)
4376 if err != nil {
4377 return nil, err
4378 }
4379 req.Header = reqHeaders
4380 googleapi.Expand(req.URL, map[string]string{
4381 "parent": c.parent,
4382 })
4383 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4384 }
4385
4386
4387
4388
4389
4390
4391
4392 func (c *LabelsPermissionsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse, error) {
4393 gensupport.SetOptions(c.urlParams_, opts...)
4394 res, err := c.doRequest("json")
4395 if res != nil && res.StatusCode == http.StatusNotModified {
4396 if res.Body != nil {
4397 res.Body.Close()
4398 }
4399 return nil, gensupport.WrapError(&googleapi.Error{
4400 Code: res.StatusCode,
4401 Header: res.Header,
4402 })
4403 }
4404 if err != nil {
4405 return nil, err
4406 }
4407 defer googleapi.CloseBody(res)
4408 if err := googleapi.CheckResponse(res); err != nil {
4409 return nil, gensupport.WrapError(err)
4410 }
4411 ret := &GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse{
4412 ServerResponse: googleapi.ServerResponse{
4413 Header: res.Header,
4414 HTTPStatusCode: res.StatusCode,
4415 },
4416 }
4417 target := &ret
4418 if err := gensupport.DecodeResponse(target, res); err != nil {
4419 return nil, err
4420 }
4421 return ret, nil
4422 }
4423
4424 type LabelsPermissionsCreateCall struct {
4425 s *Service
4426 parent string
4427 googleappsdrivelabelsv2labelpermission *GoogleAppsDriveLabelsV2LabelPermission
4428 urlParams_ gensupport.URLParams
4429 ctx_ context.Context
4430 header_ http.Header
4431 }
4432
4433
4434
4435
4436
4437
4438
4439
4440 func (r *LabelsPermissionsService) Create(parent string, googleappsdrivelabelsv2labelpermission *GoogleAppsDriveLabelsV2LabelPermission) *LabelsPermissionsCreateCall {
4441 c := &LabelsPermissionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4442 c.parent = parent
4443 c.googleappsdrivelabelsv2labelpermission = googleappsdrivelabelsv2labelpermission
4444 return c
4445 }
4446
4447
4448
4449
4450 func (c *LabelsPermissionsCreateCall) UseAdminAccess(useAdminAccess bool) *LabelsPermissionsCreateCall {
4451 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
4452 return c
4453 }
4454
4455
4456
4457
4458 func (c *LabelsPermissionsCreateCall) Fields(s ...googleapi.Field) *LabelsPermissionsCreateCall {
4459 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4460 return c
4461 }
4462
4463
4464 func (c *LabelsPermissionsCreateCall) Context(ctx context.Context) *LabelsPermissionsCreateCall {
4465 c.ctx_ = ctx
4466 return c
4467 }
4468
4469
4470
4471 func (c *LabelsPermissionsCreateCall) Header() http.Header {
4472 if c.header_ == nil {
4473 c.header_ = make(http.Header)
4474 }
4475 return c.header_
4476 }
4477
4478 func (c *LabelsPermissionsCreateCall) doRequest(alt string) (*http.Response, error) {
4479 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4480 var body io.Reader = nil
4481 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleappsdrivelabelsv2labelpermission)
4482 if err != nil {
4483 return nil, err
4484 }
4485 c.urlParams_.Set("alt", alt)
4486 c.urlParams_.Set("prettyPrint", "false")
4487 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/permissions")
4488 urls += "?" + c.urlParams_.Encode()
4489 req, err := http.NewRequest("POST", urls, body)
4490 if err != nil {
4491 return nil, err
4492 }
4493 req.Header = reqHeaders
4494 googleapi.Expand(req.URL, map[string]string{
4495 "parent": c.parent,
4496 })
4497 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4498 }
4499
4500
4501
4502
4503
4504
4505
4506 func (c *LabelsPermissionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2LabelPermission, error) {
4507 gensupport.SetOptions(c.urlParams_, opts...)
4508 res, err := c.doRequest("json")
4509 if res != nil && res.StatusCode == http.StatusNotModified {
4510 if res.Body != nil {
4511 res.Body.Close()
4512 }
4513 return nil, gensupport.WrapError(&googleapi.Error{
4514 Code: res.StatusCode,
4515 Header: res.Header,
4516 })
4517 }
4518 if err != nil {
4519 return nil, err
4520 }
4521 defer googleapi.CloseBody(res)
4522 if err := googleapi.CheckResponse(res); err != nil {
4523 return nil, gensupport.WrapError(err)
4524 }
4525 ret := &GoogleAppsDriveLabelsV2LabelPermission{
4526 ServerResponse: googleapi.ServerResponse{
4527 Header: res.Header,
4528 HTTPStatusCode: res.StatusCode,
4529 },
4530 }
4531 target := &ret
4532 if err := gensupport.DecodeResponse(target, res); err != nil {
4533 return nil, err
4534 }
4535 return ret, nil
4536 }
4537
4538 type LabelsPermissionsDeleteCall struct {
4539 s *Service
4540 name string
4541 urlParams_ gensupport.URLParams
4542 ctx_ context.Context
4543 header_ http.Header
4544 }
4545
4546
4547
4548
4549
4550 func (r *LabelsPermissionsService) Delete(name string) *LabelsPermissionsDeleteCall {
4551 c := &LabelsPermissionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4552 c.name = name
4553 return c
4554 }
4555
4556
4557
4558
4559 func (c *LabelsPermissionsDeleteCall) UseAdminAccess(useAdminAccess bool) *LabelsPermissionsDeleteCall {
4560 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
4561 return c
4562 }
4563
4564
4565
4566
4567 func (c *LabelsPermissionsDeleteCall) Fields(s ...googleapi.Field) *LabelsPermissionsDeleteCall {
4568 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4569 return c
4570 }
4571
4572
4573 func (c *LabelsPermissionsDeleteCall) Context(ctx context.Context) *LabelsPermissionsDeleteCall {
4574 c.ctx_ = ctx
4575 return c
4576 }
4577
4578
4579
4580 func (c *LabelsPermissionsDeleteCall) Header() http.Header {
4581 if c.header_ == nil {
4582 c.header_ = make(http.Header)
4583 }
4584 return c.header_
4585 }
4586
4587 func (c *LabelsPermissionsDeleteCall) doRequest(alt string) (*http.Response, error) {
4588 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4589 var body io.Reader = nil
4590 c.urlParams_.Set("alt", alt)
4591 c.urlParams_.Set("prettyPrint", "false")
4592 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
4593 urls += "?" + c.urlParams_.Encode()
4594 req, err := http.NewRequest("DELETE", urls, body)
4595 if err != nil {
4596 return nil, err
4597 }
4598 req.Header = reqHeaders
4599 googleapi.Expand(req.URL, map[string]string{
4600 "name": c.name,
4601 })
4602 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4603 }
4604
4605
4606
4607
4608
4609
4610
4611 func (c *LabelsPermissionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
4612 gensupport.SetOptions(c.urlParams_, opts...)
4613 res, err := c.doRequest("json")
4614 if res != nil && res.StatusCode == http.StatusNotModified {
4615 if res.Body != nil {
4616 res.Body.Close()
4617 }
4618 return nil, gensupport.WrapError(&googleapi.Error{
4619 Code: res.StatusCode,
4620 Header: res.Header,
4621 })
4622 }
4623 if err != nil {
4624 return nil, err
4625 }
4626 defer googleapi.CloseBody(res)
4627 if err := googleapi.CheckResponse(res); err != nil {
4628 return nil, gensupport.WrapError(err)
4629 }
4630 ret := &GoogleProtobufEmpty{
4631 ServerResponse: googleapi.ServerResponse{
4632 Header: res.Header,
4633 HTTPStatusCode: res.StatusCode,
4634 },
4635 }
4636 target := &ret
4637 if err := gensupport.DecodeResponse(target, res); err != nil {
4638 return nil, err
4639 }
4640 return ret, nil
4641 }
4642
4643 type LabelsPermissionsListCall struct {
4644 s *Service
4645 parent string
4646 urlParams_ gensupport.URLParams
4647 ifNoneMatch_ string
4648 ctx_ context.Context
4649 header_ http.Header
4650 }
4651
4652
4653
4654
4655
4656 func (r *LabelsPermissionsService) List(parent string) *LabelsPermissionsListCall {
4657 c := &LabelsPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4658 c.parent = parent
4659 return c
4660 }
4661
4662
4663
4664 func (c *LabelsPermissionsListCall) PageSize(pageSize int64) *LabelsPermissionsListCall {
4665 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4666 return c
4667 }
4668
4669
4670
4671 func (c *LabelsPermissionsListCall) PageToken(pageToken string) *LabelsPermissionsListCall {
4672 c.urlParams_.Set("pageToken", pageToken)
4673 return c
4674 }
4675
4676
4677
4678
4679 func (c *LabelsPermissionsListCall) UseAdminAccess(useAdminAccess bool) *LabelsPermissionsListCall {
4680 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
4681 return c
4682 }
4683
4684
4685
4686
4687 func (c *LabelsPermissionsListCall) Fields(s ...googleapi.Field) *LabelsPermissionsListCall {
4688 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4689 return c
4690 }
4691
4692
4693
4694
4695 func (c *LabelsPermissionsListCall) IfNoneMatch(entityTag string) *LabelsPermissionsListCall {
4696 c.ifNoneMatch_ = entityTag
4697 return c
4698 }
4699
4700
4701 func (c *LabelsPermissionsListCall) Context(ctx context.Context) *LabelsPermissionsListCall {
4702 c.ctx_ = ctx
4703 return c
4704 }
4705
4706
4707
4708 func (c *LabelsPermissionsListCall) Header() http.Header {
4709 if c.header_ == nil {
4710 c.header_ = make(http.Header)
4711 }
4712 return c.header_
4713 }
4714
4715 func (c *LabelsPermissionsListCall) doRequest(alt string) (*http.Response, error) {
4716 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4717 if c.ifNoneMatch_ != "" {
4718 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4719 }
4720 var body io.Reader = nil
4721 c.urlParams_.Set("alt", alt)
4722 c.urlParams_.Set("prettyPrint", "false")
4723 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/permissions")
4724 urls += "?" + c.urlParams_.Encode()
4725 req, err := http.NewRequest("GET", urls, body)
4726 if err != nil {
4727 return nil, err
4728 }
4729 req.Header = reqHeaders
4730 googleapi.Expand(req.URL, map[string]string{
4731 "parent": c.parent,
4732 })
4733 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4734 }
4735
4736
4737
4738
4739
4740
4741
4742 func (c *LabelsPermissionsListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2ListLabelPermissionsResponse, error) {
4743 gensupport.SetOptions(c.urlParams_, opts...)
4744 res, err := c.doRequest("json")
4745 if res != nil && res.StatusCode == http.StatusNotModified {
4746 if res.Body != nil {
4747 res.Body.Close()
4748 }
4749 return nil, gensupport.WrapError(&googleapi.Error{
4750 Code: res.StatusCode,
4751 Header: res.Header,
4752 })
4753 }
4754 if err != nil {
4755 return nil, err
4756 }
4757 defer googleapi.CloseBody(res)
4758 if err := googleapi.CheckResponse(res); err != nil {
4759 return nil, gensupport.WrapError(err)
4760 }
4761 ret := &GoogleAppsDriveLabelsV2ListLabelPermissionsResponse{
4762 ServerResponse: googleapi.ServerResponse{
4763 Header: res.Header,
4764 HTTPStatusCode: res.StatusCode,
4765 },
4766 }
4767 target := &ret
4768 if err := gensupport.DecodeResponse(target, res); err != nil {
4769 return nil, err
4770 }
4771 return ret, nil
4772 }
4773
4774
4775
4776
4777 func (c *LabelsPermissionsListCall) Pages(ctx context.Context, f func(*GoogleAppsDriveLabelsV2ListLabelPermissionsResponse) error) error {
4778 c.ctx_ = ctx
4779 defer c.PageToken(c.urlParams_.Get("pageToken"))
4780 for {
4781 x, err := c.Do()
4782 if err != nil {
4783 return err
4784 }
4785 if err := f(x); err != nil {
4786 return err
4787 }
4788 if x.NextPageToken == "" {
4789 return nil
4790 }
4791 c.PageToken(x.NextPageToken)
4792 }
4793 }
4794
4795 type LabelsRevisionsUpdatePermissionsCall struct {
4796 s *Service
4797 parent string
4798 googleappsdrivelabelsv2labelpermission *GoogleAppsDriveLabelsV2LabelPermission
4799 urlParams_ gensupport.URLParams
4800 ctx_ context.Context
4801 header_ http.Header
4802 }
4803
4804
4805
4806
4807
4808
4809
4810 func (r *LabelsRevisionsService) UpdatePermissions(parent string, googleappsdrivelabelsv2labelpermission *GoogleAppsDriveLabelsV2LabelPermission) *LabelsRevisionsUpdatePermissionsCall {
4811 c := &LabelsRevisionsUpdatePermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4812 c.parent = parent
4813 c.googleappsdrivelabelsv2labelpermission = googleappsdrivelabelsv2labelpermission
4814 return c
4815 }
4816
4817
4818
4819
4820 func (c *LabelsRevisionsUpdatePermissionsCall) UseAdminAccess(useAdminAccess bool) *LabelsRevisionsUpdatePermissionsCall {
4821 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
4822 return c
4823 }
4824
4825
4826
4827
4828 func (c *LabelsRevisionsUpdatePermissionsCall) Fields(s ...googleapi.Field) *LabelsRevisionsUpdatePermissionsCall {
4829 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4830 return c
4831 }
4832
4833
4834 func (c *LabelsRevisionsUpdatePermissionsCall) Context(ctx context.Context) *LabelsRevisionsUpdatePermissionsCall {
4835 c.ctx_ = ctx
4836 return c
4837 }
4838
4839
4840
4841 func (c *LabelsRevisionsUpdatePermissionsCall) Header() http.Header {
4842 if c.header_ == nil {
4843 c.header_ = make(http.Header)
4844 }
4845 return c.header_
4846 }
4847
4848 func (c *LabelsRevisionsUpdatePermissionsCall) doRequest(alt string) (*http.Response, error) {
4849 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4850 var body io.Reader = nil
4851 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleappsdrivelabelsv2labelpermission)
4852 if err != nil {
4853 return nil, err
4854 }
4855 c.urlParams_.Set("alt", alt)
4856 c.urlParams_.Set("prettyPrint", "false")
4857 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/permissions")
4858 urls += "?" + c.urlParams_.Encode()
4859 req, err := http.NewRequest("PATCH", urls, body)
4860 if err != nil {
4861 return nil, err
4862 }
4863 req.Header = reqHeaders
4864 googleapi.Expand(req.URL, map[string]string{
4865 "parent": c.parent,
4866 })
4867 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4868 }
4869
4870
4871
4872
4873
4874
4875
4876 func (c *LabelsRevisionsUpdatePermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2LabelPermission, error) {
4877 gensupport.SetOptions(c.urlParams_, opts...)
4878 res, err := c.doRequest("json")
4879 if res != nil && res.StatusCode == http.StatusNotModified {
4880 if res.Body != nil {
4881 res.Body.Close()
4882 }
4883 return nil, gensupport.WrapError(&googleapi.Error{
4884 Code: res.StatusCode,
4885 Header: res.Header,
4886 })
4887 }
4888 if err != nil {
4889 return nil, err
4890 }
4891 defer googleapi.CloseBody(res)
4892 if err := googleapi.CheckResponse(res); err != nil {
4893 return nil, gensupport.WrapError(err)
4894 }
4895 ret := &GoogleAppsDriveLabelsV2LabelPermission{
4896 ServerResponse: googleapi.ServerResponse{
4897 Header: res.Header,
4898 HTTPStatusCode: res.StatusCode,
4899 },
4900 }
4901 target := &ret
4902 if err := gensupport.DecodeResponse(target, res); err != nil {
4903 return nil, err
4904 }
4905 return ret, nil
4906 }
4907
4908 type LabelsRevisionsLocksListCall struct {
4909 s *Service
4910 parent string
4911 urlParams_ gensupport.URLParams
4912 ifNoneMatch_ string
4913 ctx_ context.Context
4914 header_ http.Header
4915 }
4916
4917
4918
4919
4920 func (r *LabelsRevisionsLocksService) List(parent string) *LabelsRevisionsLocksListCall {
4921 c := &LabelsRevisionsLocksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4922 c.parent = parent
4923 return c
4924 }
4925
4926
4927
4928 func (c *LabelsRevisionsLocksListCall) PageSize(pageSize int64) *LabelsRevisionsLocksListCall {
4929 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4930 return c
4931 }
4932
4933
4934
4935 func (c *LabelsRevisionsLocksListCall) PageToken(pageToken string) *LabelsRevisionsLocksListCall {
4936 c.urlParams_.Set("pageToken", pageToken)
4937 return c
4938 }
4939
4940
4941
4942
4943 func (c *LabelsRevisionsLocksListCall) Fields(s ...googleapi.Field) *LabelsRevisionsLocksListCall {
4944 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4945 return c
4946 }
4947
4948
4949
4950
4951 func (c *LabelsRevisionsLocksListCall) IfNoneMatch(entityTag string) *LabelsRevisionsLocksListCall {
4952 c.ifNoneMatch_ = entityTag
4953 return c
4954 }
4955
4956
4957 func (c *LabelsRevisionsLocksListCall) Context(ctx context.Context) *LabelsRevisionsLocksListCall {
4958 c.ctx_ = ctx
4959 return c
4960 }
4961
4962
4963
4964 func (c *LabelsRevisionsLocksListCall) Header() http.Header {
4965 if c.header_ == nil {
4966 c.header_ = make(http.Header)
4967 }
4968 return c.header_
4969 }
4970
4971 func (c *LabelsRevisionsLocksListCall) doRequest(alt string) (*http.Response, error) {
4972 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4973 if c.ifNoneMatch_ != "" {
4974 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4975 }
4976 var body io.Reader = nil
4977 c.urlParams_.Set("alt", alt)
4978 c.urlParams_.Set("prettyPrint", "false")
4979 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/locks")
4980 urls += "?" + c.urlParams_.Encode()
4981 req, err := http.NewRequest("GET", urls, body)
4982 if err != nil {
4983 return nil, err
4984 }
4985 req.Header = reqHeaders
4986 googleapi.Expand(req.URL, map[string]string{
4987 "parent": c.parent,
4988 })
4989 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4990 }
4991
4992
4993
4994
4995
4996
4997
4998 func (c *LabelsRevisionsLocksListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2ListLabelLocksResponse, error) {
4999 gensupport.SetOptions(c.urlParams_, opts...)
5000 res, err := c.doRequest("json")
5001 if res != nil && res.StatusCode == http.StatusNotModified {
5002 if res.Body != nil {
5003 res.Body.Close()
5004 }
5005 return nil, gensupport.WrapError(&googleapi.Error{
5006 Code: res.StatusCode,
5007 Header: res.Header,
5008 })
5009 }
5010 if err != nil {
5011 return nil, err
5012 }
5013 defer googleapi.CloseBody(res)
5014 if err := googleapi.CheckResponse(res); err != nil {
5015 return nil, gensupport.WrapError(err)
5016 }
5017 ret := &GoogleAppsDriveLabelsV2ListLabelLocksResponse{
5018 ServerResponse: googleapi.ServerResponse{
5019 Header: res.Header,
5020 HTTPStatusCode: res.StatusCode,
5021 },
5022 }
5023 target := &ret
5024 if err := gensupport.DecodeResponse(target, res); err != nil {
5025 return nil, err
5026 }
5027 return ret, nil
5028 }
5029
5030
5031
5032
5033 func (c *LabelsRevisionsLocksListCall) Pages(ctx context.Context, f func(*GoogleAppsDriveLabelsV2ListLabelLocksResponse) error) error {
5034 c.ctx_ = ctx
5035 defer c.PageToken(c.urlParams_.Get("pageToken"))
5036 for {
5037 x, err := c.Do()
5038 if err != nil {
5039 return err
5040 }
5041 if err := f(x); err != nil {
5042 return err
5043 }
5044 if x.NextPageToken == "" {
5045 return nil
5046 }
5047 c.PageToken(x.NextPageToken)
5048 }
5049 }
5050
5051 type LabelsRevisionsPermissionsBatchDeleteCall struct {
5052 s *Service
5053 parent string
5054 googleappsdrivelabelsv2batchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest
5055 urlParams_ gensupport.URLParams
5056 ctx_ context.Context
5057 header_ http.Header
5058 }
5059
5060
5061
5062
5063
5064
5065
5066
5067 func (r *LabelsRevisionsPermissionsService) BatchDelete(parent string, googleappsdrivelabelsv2batchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest) *LabelsRevisionsPermissionsBatchDeleteCall {
5068 c := &LabelsRevisionsPermissionsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5069 c.parent = parent
5070 c.googleappsdrivelabelsv2batchdeletelabelpermissionsrequest = googleappsdrivelabelsv2batchdeletelabelpermissionsrequest
5071 return c
5072 }
5073
5074
5075
5076
5077 func (c *LabelsRevisionsPermissionsBatchDeleteCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsBatchDeleteCall {
5078 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5079 return c
5080 }
5081
5082
5083 func (c *LabelsRevisionsPermissionsBatchDeleteCall) Context(ctx context.Context) *LabelsRevisionsPermissionsBatchDeleteCall {
5084 c.ctx_ = ctx
5085 return c
5086 }
5087
5088
5089
5090 func (c *LabelsRevisionsPermissionsBatchDeleteCall) Header() http.Header {
5091 if c.header_ == nil {
5092 c.header_ = make(http.Header)
5093 }
5094 return c.header_
5095 }
5096
5097 func (c *LabelsRevisionsPermissionsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
5098 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5099 var body io.Reader = nil
5100 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleappsdrivelabelsv2batchdeletelabelpermissionsrequest)
5101 if err != nil {
5102 return nil, err
5103 }
5104 c.urlParams_.Set("alt", alt)
5105 c.urlParams_.Set("prettyPrint", "false")
5106 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/permissions:batchDelete")
5107 urls += "?" + c.urlParams_.Encode()
5108 req, err := http.NewRequest("POST", urls, body)
5109 if err != nil {
5110 return nil, err
5111 }
5112 req.Header = reqHeaders
5113 googleapi.Expand(req.URL, map[string]string{
5114 "parent": c.parent,
5115 })
5116 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5117 }
5118
5119
5120
5121
5122
5123
5124
5125 func (c *LabelsRevisionsPermissionsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
5126 gensupport.SetOptions(c.urlParams_, opts...)
5127 res, err := c.doRequest("json")
5128 if res != nil && res.StatusCode == http.StatusNotModified {
5129 if res.Body != nil {
5130 res.Body.Close()
5131 }
5132 return nil, gensupport.WrapError(&googleapi.Error{
5133 Code: res.StatusCode,
5134 Header: res.Header,
5135 })
5136 }
5137 if err != nil {
5138 return nil, err
5139 }
5140 defer googleapi.CloseBody(res)
5141 if err := googleapi.CheckResponse(res); err != nil {
5142 return nil, gensupport.WrapError(err)
5143 }
5144 ret := &GoogleProtobufEmpty{
5145 ServerResponse: googleapi.ServerResponse{
5146 Header: res.Header,
5147 HTTPStatusCode: res.StatusCode,
5148 },
5149 }
5150 target := &ret
5151 if err := gensupport.DecodeResponse(target, res); err != nil {
5152 return nil, err
5153 }
5154 return ret, nil
5155 }
5156
5157 type LabelsRevisionsPermissionsBatchUpdateCall struct {
5158 s *Service
5159 parent string
5160 googleappsdrivelabelsv2batchupdatelabelpermissionsrequest *GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest
5161 urlParams_ gensupport.URLParams
5162 ctx_ context.Context
5163 header_ http.Header
5164 }
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175 func (r *LabelsRevisionsPermissionsService) BatchUpdate(parent string, googleappsdrivelabelsv2batchupdatelabelpermissionsrequest *GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest) *LabelsRevisionsPermissionsBatchUpdateCall {
5176 c := &LabelsRevisionsPermissionsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5177 c.parent = parent
5178 c.googleappsdrivelabelsv2batchupdatelabelpermissionsrequest = googleappsdrivelabelsv2batchupdatelabelpermissionsrequest
5179 return c
5180 }
5181
5182
5183
5184
5185 func (c *LabelsRevisionsPermissionsBatchUpdateCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsBatchUpdateCall {
5186 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5187 return c
5188 }
5189
5190
5191 func (c *LabelsRevisionsPermissionsBatchUpdateCall) Context(ctx context.Context) *LabelsRevisionsPermissionsBatchUpdateCall {
5192 c.ctx_ = ctx
5193 return c
5194 }
5195
5196
5197
5198 func (c *LabelsRevisionsPermissionsBatchUpdateCall) Header() http.Header {
5199 if c.header_ == nil {
5200 c.header_ = make(http.Header)
5201 }
5202 return c.header_
5203 }
5204
5205 func (c *LabelsRevisionsPermissionsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
5206 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5207 var body io.Reader = nil
5208 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleappsdrivelabelsv2batchupdatelabelpermissionsrequest)
5209 if err != nil {
5210 return nil, err
5211 }
5212 c.urlParams_.Set("alt", alt)
5213 c.urlParams_.Set("prettyPrint", "false")
5214 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/permissions:batchUpdate")
5215 urls += "?" + c.urlParams_.Encode()
5216 req, err := http.NewRequest("POST", urls, body)
5217 if err != nil {
5218 return nil, err
5219 }
5220 req.Header = reqHeaders
5221 googleapi.Expand(req.URL, map[string]string{
5222 "parent": c.parent,
5223 })
5224 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5225 }
5226
5227
5228
5229
5230
5231
5232
5233 func (c *LabelsRevisionsPermissionsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse, error) {
5234 gensupport.SetOptions(c.urlParams_, opts...)
5235 res, err := c.doRequest("json")
5236 if res != nil && res.StatusCode == http.StatusNotModified {
5237 if res.Body != nil {
5238 res.Body.Close()
5239 }
5240 return nil, gensupport.WrapError(&googleapi.Error{
5241 Code: res.StatusCode,
5242 Header: res.Header,
5243 })
5244 }
5245 if err != nil {
5246 return nil, err
5247 }
5248 defer googleapi.CloseBody(res)
5249 if err := googleapi.CheckResponse(res); err != nil {
5250 return nil, gensupport.WrapError(err)
5251 }
5252 ret := &GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse{
5253 ServerResponse: googleapi.ServerResponse{
5254 Header: res.Header,
5255 HTTPStatusCode: res.StatusCode,
5256 },
5257 }
5258 target := &ret
5259 if err := gensupport.DecodeResponse(target, res); err != nil {
5260 return nil, err
5261 }
5262 return ret, nil
5263 }
5264
5265 type LabelsRevisionsPermissionsCreateCall struct {
5266 s *Service
5267 parent string
5268 googleappsdrivelabelsv2labelpermission *GoogleAppsDriveLabelsV2LabelPermission
5269 urlParams_ gensupport.URLParams
5270 ctx_ context.Context
5271 header_ http.Header
5272 }
5273
5274
5275
5276
5277
5278
5279
5280
5281 func (r *LabelsRevisionsPermissionsService) Create(parent string, googleappsdrivelabelsv2labelpermission *GoogleAppsDriveLabelsV2LabelPermission) *LabelsRevisionsPermissionsCreateCall {
5282 c := &LabelsRevisionsPermissionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5283 c.parent = parent
5284 c.googleappsdrivelabelsv2labelpermission = googleappsdrivelabelsv2labelpermission
5285 return c
5286 }
5287
5288
5289
5290
5291 func (c *LabelsRevisionsPermissionsCreateCall) UseAdminAccess(useAdminAccess bool) *LabelsRevisionsPermissionsCreateCall {
5292 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
5293 return c
5294 }
5295
5296
5297
5298
5299 func (c *LabelsRevisionsPermissionsCreateCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsCreateCall {
5300 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5301 return c
5302 }
5303
5304
5305 func (c *LabelsRevisionsPermissionsCreateCall) Context(ctx context.Context) *LabelsRevisionsPermissionsCreateCall {
5306 c.ctx_ = ctx
5307 return c
5308 }
5309
5310
5311
5312 func (c *LabelsRevisionsPermissionsCreateCall) Header() http.Header {
5313 if c.header_ == nil {
5314 c.header_ = make(http.Header)
5315 }
5316 return c.header_
5317 }
5318
5319 func (c *LabelsRevisionsPermissionsCreateCall) doRequest(alt string) (*http.Response, error) {
5320 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5321 var body io.Reader = nil
5322 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleappsdrivelabelsv2labelpermission)
5323 if err != nil {
5324 return nil, err
5325 }
5326 c.urlParams_.Set("alt", alt)
5327 c.urlParams_.Set("prettyPrint", "false")
5328 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/permissions")
5329 urls += "?" + c.urlParams_.Encode()
5330 req, err := http.NewRequest("POST", urls, body)
5331 if err != nil {
5332 return nil, err
5333 }
5334 req.Header = reqHeaders
5335 googleapi.Expand(req.URL, map[string]string{
5336 "parent": c.parent,
5337 })
5338 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5339 }
5340
5341
5342
5343
5344
5345
5346
5347 func (c *LabelsRevisionsPermissionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2LabelPermission, error) {
5348 gensupport.SetOptions(c.urlParams_, opts...)
5349 res, err := c.doRequest("json")
5350 if res != nil && res.StatusCode == http.StatusNotModified {
5351 if res.Body != nil {
5352 res.Body.Close()
5353 }
5354 return nil, gensupport.WrapError(&googleapi.Error{
5355 Code: res.StatusCode,
5356 Header: res.Header,
5357 })
5358 }
5359 if err != nil {
5360 return nil, err
5361 }
5362 defer googleapi.CloseBody(res)
5363 if err := googleapi.CheckResponse(res); err != nil {
5364 return nil, gensupport.WrapError(err)
5365 }
5366 ret := &GoogleAppsDriveLabelsV2LabelPermission{
5367 ServerResponse: googleapi.ServerResponse{
5368 Header: res.Header,
5369 HTTPStatusCode: res.StatusCode,
5370 },
5371 }
5372 target := &ret
5373 if err := gensupport.DecodeResponse(target, res); err != nil {
5374 return nil, err
5375 }
5376 return ret, nil
5377 }
5378
5379 type LabelsRevisionsPermissionsDeleteCall struct {
5380 s *Service
5381 name string
5382 urlParams_ gensupport.URLParams
5383 ctx_ context.Context
5384 header_ http.Header
5385 }
5386
5387
5388
5389
5390
5391 func (r *LabelsRevisionsPermissionsService) Delete(name string) *LabelsRevisionsPermissionsDeleteCall {
5392 c := &LabelsRevisionsPermissionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5393 c.name = name
5394 return c
5395 }
5396
5397
5398
5399
5400 func (c *LabelsRevisionsPermissionsDeleteCall) UseAdminAccess(useAdminAccess bool) *LabelsRevisionsPermissionsDeleteCall {
5401 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
5402 return c
5403 }
5404
5405
5406
5407
5408 func (c *LabelsRevisionsPermissionsDeleteCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsDeleteCall {
5409 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5410 return c
5411 }
5412
5413
5414 func (c *LabelsRevisionsPermissionsDeleteCall) Context(ctx context.Context) *LabelsRevisionsPermissionsDeleteCall {
5415 c.ctx_ = ctx
5416 return c
5417 }
5418
5419
5420
5421 func (c *LabelsRevisionsPermissionsDeleteCall) Header() http.Header {
5422 if c.header_ == nil {
5423 c.header_ = make(http.Header)
5424 }
5425 return c.header_
5426 }
5427
5428 func (c *LabelsRevisionsPermissionsDeleteCall) doRequest(alt string) (*http.Response, error) {
5429 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5430 var body io.Reader = nil
5431 c.urlParams_.Set("alt", alt)
5432 c.urlParams_.Set("prettyPrint", "false")
5433 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5434 urls += "?" + c.urlParams_.Encode()
5435 req, err := http.NewRequest("DELETE", urls, body)
5436 if err != nil {
5437 return nil, err
5438 }
5439 req.Header = reqHeaders
5440 googleapi.Expand(req.URL, map[string]string{
5441 "name": c.name,
5442 })
5443 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5444 }
5445
5446
5447
5448
5449
5450
5451
5452 func (c *LabelsRevisionsPermissionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
5453 gensupport.SetOptions(c.urlParams_, opts...)
5454 res, err := c.doRequest("json")
5455 if res != nil && res.StatusCode == http.StatusNotModified {
5456 if res.Body != nil {
5457 res.Body.Close()
5458 }
5459 return nil, gensupport.WrapError(&googleapi.Error{
5460 Code: res.StatusCode,
5461 Header: res.Header,
5462 })
5463 }
5464 if err != nil {
5465 return nil, err
5466 }
5467 defer googleapi.CloseBody(res)
5468 if err := googleapi.CheckResponse(res); err != nil {
5469 return nil, gensupport.WrapError(err)
5470 }
5471 ret := &GoogleProtobufEmpty{
5472 ServerResponse: googleapi.ServerResponse{
5473 Header: res.Header,
5474 HTTPStatusCode: res.StatusCode,
5475 },
5476 }
5477 target := &ret
5478 if err := gensupport.DecodeResponse(target, res); err != nil {
5479 return nil, err
5480 }
5481 return ret, nil
5482 }
5483
5484 type LabelsRevisionsPermissionsListCall struct {
5485 s *Service
5486 parent string
5487 urlParams_ gensupport.URLParams
5488 ifNoneMatch_ string
5489 ctx_ context.Context
5490 header_ http.Header
5491 }
5492
5493
5494
5495
5496
5497 func (r *LabelsRevisionsPermissionsService) List(parent string) *LabelsRevisionsPermissionsListCall {
5498 c := &LabelsRevisionsPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5499 c.parent = parent
5500 return c
5501 }
5502
5503
5504
5505 func (c *LabelsRevisionsPermissionsListCall) PageSize(pageSize int64) *LabelsRevisionsPermissionsListCall {
5506 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5507 return c
5508 }
5509
5510
5511
5512 func (c *LabelsRevisionsPermissionsListCall) PageToken(pageToken string) *LabelsRevisionsPermissionsListCall {
5513 c.urlParams_.Set("pageToken", pageToken)
5514 return c
5515 }
5516
5517
5518
5519
5520 func (c *LabelsRevisionsPermissionsListCall) UseAdminAccess(useAdminAccess bool) *LabelsRevisionsPermissionsListCall {
5521 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
5522 return c
5523 }
5524
5525
5526
5527
5528 func (c *LabelsRevisionsPermissionsListCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsListCall {
5529 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5530 return c
5531 }
5532
5533
5534
5535
5536 func (c *LabelsRevisionsPermissionsListCall) IfNoneMatch(entityTag string) *LabelsRevisionsPermissionsListCall {
5537 c.ifNoneMatch_ = entityTag
5538 return c
5539 }
5540
5541
5542 func (c *LabelsRevisionsPermissionsListCall) Context(ctx context.Context) *LabelsRevisionsPermissionsListCall {
5543 c.ctx_ = ctx
5544 return c
5545 }
5546
5547
5548
5549 func (c *LabelsRevisionsPermissionsListCall) Header() http.Header {
5550 if c.header_ == nil {
5551 c.header_ = make(http.Header)
5552 }
5553 return c.header_
5554 }
5555
5556 func (c *LabelsRevisionsPermissionsListCall) doRequest(alt string) (*http.Response, error) {
5557 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5558 if c.ifNoneMatch_ != "" {
5559 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5560 }
5561 var body io.Reader = nil
5562 c.urlParams_.Set("alt", alt)
5563 c.urlParams_.Set("prettyPrint", "false")
5564 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/permissions")
5565 urls += "?" + c.urlParams_.Encode()
5566 req, err := http.NewRequest("GET", urls, body)
5567 if err != nil {
5568 return nil, err
5569 }
5570 req.Header = reqHeaders
5571 googleapi.Expand(req.URL, map[string]string{
5572 "parent": c.parent,
5573 })
5574 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5575 }
5576
5577
5578
5579
5580
5581
5582
5583 func (c *LabelsRevisionsPermissionsListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2ListLabelPermissionsResponse, error) {
5584 gensupport.SetOptions(c.urlParams_, opts...)
5585 res, err := c.doRequest("json")
5586 if res != nil && res.StatusCode == http.StatusNotModified {
5587 if res.Body != nil {
5588 res.Body.Close()
5589 }
5590 return nil, gensupport.WrapError(&googleapi.Error{
5591 Code: res.StatusCode,
5592 Header: res.Header,
5593 })
5594 }
5595 if err != nil {
5596 return nil, err
5597 }
5598 defer googleapi.CloseBody(res)
5599 if err := googleapi.CheckResponse(res); err != nil {
5600 return nil, gensupport.WrapError(err)
5601 }
5602 ret := &GoogleAppsDriveLabelsV2ListLabelPermissionsResponse{
5603 ServerResponse: googleapi.ServerResponse{
5604 Header: res.Header,
5605 HTTPStatusCode: res.StatusCode,
5606 },
5607 }
5608 target := &ret
5609 if err := gensupport.DecodeResponse(target, res); err != nil {
5610 return nil, err
5611 }
5612 return ret, nil
5613 }
5614
5615
5616
5617
5618 func (c *LabelsRevisionsPermissionsListCall) Pages(ctx context.Context, f func(*GoogleAppsDriveLabelsV2ListLabelPermissionsResponse) error) error {
5619 c.ctx_ = ctx
5620 defer c.PageToken(c.urlParams_.Get("pageToken"))
5621 for {
5622 x, err := c.Do()
5623 if err != nil {
5624 return err
5625 }
5626 if err := f(x); err != nil {
5627 return err
5628 }
5629 if x.NextPageToken == "" {
5630 return nil
5631 }
5632 c.PageToken(x.NextPageToken)
5633 }
5634 }
5635
5636 type LimitsGetLabelCall struct {
5637 s *Service
5638 urlParams_ gensupport.URLParams
5639 ifNoneMatch_ string
5640 ctx_ context.Context
5641 header_ http.Header
5642 }
5643
5644
5645
5646 func (r *LimitsService) GetLabel() *LimitsGetLabelCall {
5647 c := &LimitsGetLabelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5648 return c
5649 }
5650
5651
5652
5653 func (c *LimitsGetLabelCall) Name(name string) *LimitsGetLabelCall {
5654 c.urlParams_.Set("name", name)
5655 return c
5656 }
5657
5658
5659
5660
5661 func (c *LimitsGetLabelCall) Fields(s ...googleapi.Field) *LimitsGetLabelCall {
5662 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5663 return c
5664 }
5665
5666
5667
5668
5669 func (c *LimitsGetLabelCall) IfNoneMatch(entityTag string) *LimitsGetLabelCall {
5670 c.ifNoneMatch_ = entityTag
5671 return c
5672 }
5673
5674
5675 func (c *LimitsGetLabelCall) Context(ctx context.Context) *LimitsGetLabelCall {
5676 c.ctx_ = ctx
5677 return c
5678 }
5679
5680
5681
5682 func (c *LimitsGetLabelCall) Header() http.Header {
5683 if c.header_ == nil {
5684 c.header_ = make(http.Header)
5685 }
5686 return c.header_
5687 }
5688
5689 func (c *LimitsGetLabelCall) doRequest(alt string) (*http.Response, error) {
5690 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5691 if c.ifNoneMatch_ != "" {
5692 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5693 }
5694 var body io.Reader = nil
5695 c.urlParams_.Set("alt", alt)
5696 c.urlParams_.Set("prettyPrint", "false")
5697 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/limits/label")
5698 urls += "?" + c.urlParams_.Encode()
5699 req, err := http.NewRequest("GET", urls, body)
5700 if err != nil {
5701 return nil, err
5702 }
5703 req.Header = reqHeaders
5704 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5705 }
5706
5707
5708
5709
5710
5711
5712
5713 func (c *LimitsGetLabelCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2LabelLimits, error) {
5714 gensupport.SetOptions(c.urlParams_, opts...)
5715 res, err := c.doRequest("json")
5716 if res != nil && res.StatusCode == http.StatusNotModified {
5717 if res.Body != nil {
5718 res.Body.Close()
5719 }
5720 return nil, gensupport.WrapError(&googleapi.Error{
5721 Code: res.StatusCode,
5722 Header: res.Header,
5723 })
5724 }
5725 if err != nil {
5726 return nil, err
5727 }
5728 defer googleapi.CloseBody(res)
5729 if err := googleapi.CheckResponse(res); err != nil {
5730 return nil, gensupport.WrapError(err)
5731 }
5732 ret := &GoogleAppsDriveLabelsV2LabelLimits{
5733 ServerResponse: googleapi.ServerResponse{
5734 Header: res.Header,
5735 HTTPStatusCode: res.StatusCode,
5736 },
5737 }
5738 target := &ret
5739 if err := gensupport.DecodeResponse(target, res); err != nil {
5740 return nil, err
5741 }
5742 return ret, nil
5743 }
5744
5745 type UsersGetCapabilitiesCall struct {
5746 s *Service
5747 name string
5748 urlParams_ gensupport.URLParams
5749 ifNoneMatch_ string
5750 ctx_ context.Context
5751 header_ http.Header
5752 }
5753
5754
5755
5756
5757
5758 func (r *UsersService) GetCapabilities(name string) *UsersGetCapabilitiesCall {
5759 c := &UsersGetCapabilitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5760 c.name = name
5761 return c
5762 }
5763
5764
5765
5766
5767 func (c *UsersGetCapabilitiesCall) Customer(customer string) *UsersGetCapabilitiesCall {
5768 c.urlParams_.Set("customer", customer)
5769 return c
5770 }
5771
5772
5773
5774
5775 func (c *UsersGetCapabilitiesCall) Fields(s ...googleapi.Field) *UsersGetCapabilitiesCall {
5776 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5777 return c
5778 }
5779
5780
5781
5782
5783 func (c *UsersGetCapabilitiesCall) IfNoneMatch(entityTag string) *UsersGetCapabilitiesCall {
5784 c.ifNoneMatch_ = entityTag
5785 return c
5786 }
5787
5788
5789 func (c *UsersGetCapabilitiesCall) Context(ctx context.Context) *UsersGetCapabilitiesCall {
5790 c.ctx_ = ctx
5791 return c
5792 }
5793
5794
5795
5796 func (c *UsersGetCapabilitiesCall) Header() http.Header {
5797 if c.header_ == nil {
5798 c.header_ = make(http.Header)
5799 }
5800 return c.header_
5801 }
5802
5803 func (c *UsersGetCapabilitiesCall) doRequest(alt string) (*http.Response, error) {
5804 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5805 if c.ifNoneMatch_ != "" {
5806 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5807 }
5808 var body io.Reader = nil
5809 c.urlParams_.Set("alt", alt)
5810 c.urlParams_.Set("prettyPrint", "false")
5811 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5812 urls += "?" + c.urlParams_.Encode()
5813 req, err := http.NewRequest("GET", urls, body)
5814 if err != nil {
5815 return nil, err
5816 }
5817 req.Header = reqHeaders
5818 googleapi.Expand(req.URL, map[string]string{
5819 "name": c.name,
5820 })
5821 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5822 }
5823
5824
5825
5826
5827
5828
5829
5830 func (c *UsersGetCapabilitiesCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2UserCapabilities, error) {
5831 gensupport.SetOptions(c.urlParams_, opts...)
5832 res, err := c.doRequest("json")
5833 if res != nil && res.StatusCode == http.StatusNotModified {
5834 if res.Body != nil {
5835 res.Body.Close()
5836 }
5837 return nil, gensupport.WrapError(&googleapi.Error{
5838 Code: res.StatusCode,
5839 Header: res.Header,
5840 })
5841 }
5842 if err != nil {
5843 return nil, err
5844 }
5845 defer googleapi.CloseBody(res)
5846 if err := googleapi.CheckResponse(res); err != nil {
5847 return nil, gensupport.WrapError(err)
5848 }
5849 ret := &GoogleAppsDriveLabelsV2UserCapabilities{
5850 ServerResponse: googleapi.ServerResponse{
5851 Header: res.Header,
5852 HTTPStatusCode: res.StatusCode,
5853 },
5854 }
5855 target := &ret
5856 if err := gensupport.DecodeResponse(target, res); err != nil {
5857 return nil, err
5858 }
5859 return ret, nil
5860 }
5861
View as plain text