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 admin
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 = "admin:directory_v1"
95 const apiName = "admin"
96 const apiVersion = "directory_v1"
97 const basePath = "https://admin.googleapis.com/"
98 const basePathTemplate = "https://admin.UNIVERSE_DOMAIN/"
99 const mtlsBasePath = "https://admin.mtls.googleapis.com/"
100
101
102 const (
103
104
105 AdminChromePrintersScope = "https://www.googleapis.com/auth/admin.chrome.printers"
106
107
108 AdminChromePrintersReadonlyScope = "https://www.googleapis.com/auth/admin.chrome.printers.readonly"
109
110
111 AdminDirectoryCustomerScope = "https://www.googleapis.com/auth/admin.directory.customer"
112
113
114 AdminDirectoryCustomerReadonlyScope = "https://www.googleapis.com/auth/admin.directory.customer.readonly"
115
116
117 AdminDirectoryDeviceChromeosScope = "https://www.googleapis.com/auth/admin.directory.device.chromeos"
118
119
120 AdminDirectoryDeviceChromeosReadonlyScope = "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly"
121
122
123 AdminDirectoryDeviceMobileScope = "https://www.googleapis.com/auth/admin.directory.device.mobile"
124
125
126 AdminDirectoryDeviceMobileActionScope = "https://www.googleapis.com/auth/admin.directory.device.mobile.action"
127
128
129 AdminDirectoryDeviceMobileReadonlyScope = "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly"
130
131
132 AdminDirectoryDomainScope = "https://www.googleapis.com/auth/admin.directory.domain"
133
134
135 AdminDirectoryDomainReadonlyScope = "https://www.googleapis.com/auth/admin.directory.domain.readonly"
136
137
138 AdminDirectoryGroupScope = "https://www.googleapis.com/auth/admin.directory.group"
139
140
141 AdminDirectoryGroupMemberScope = "https://www.googleapis.com/auth/admin.directory.group.member"
142
143
144 AdminDirectoryGroupMemberReadonlyScope = "https://www.googleapis.com/auth/admin.directory.group.member.readonly"
145
146
147 AdminDirectoryGroupReadonlyScope = "https://www.googleapis.com/auth/admin.directory.group.readonly"
148
149
150 AdminDirectoryOrgunitScope = "https://www.googleapis.com/auth/admin.directory.orgunit"
151
152
153 AdminDirectoryOrgunitReadonlyScope = "https://www.googleapis.com/auth/admin.directory.orgunit.readonly"
154
155
156 AdminDirectoryResourceCalendarScope = "https://www.googleapis.com/auth/admin.directory.resource.calendar"
157
158
159 AdminDirectoryResourceCalendarReadonlyScope = "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"
160
161
162 AdminDirectoryRolemanagementScope = "https://www.googleapis.com/auth/admin.directory.rolemanagement"
163
164
165 AdminDirectoryRolemanagementReadonlyScope = "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"
166
167
168 AdminDirectoryUserScope = "https://www.googleapis.com/auth/admin.directory.user"
169
170
171 AdminDirectoryUserAliasScope = "https://www.googleapis.com/auth/admin.directory.user.alias"
172
173
174 AdminDirectoryUserAliasReadonlyScope = "https://www.googleapis.com/auth/admin.directory.user.alias.readonly"
175
176
177 AdminDirectoryUserReadonlyScope = "https://www.googleapis.com/auth/admin.directory.user.readonly"
178
179
180 AdminDirectoryUserSecurityScope = "https://www.googleapis.com/auth/admin.directory.user.security"
181
182
183 AdminDirectoryUserschemaScope = "https://www.googleapis.com/auth/admin.directory.userschema"
184
185
186 AdminDirectoryUserschemaReadonlyScope = "https://www.googleapis.com/auth/admin.directory.userschema.readonly"
187
188
189
190 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
191 )
192
193
194 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
195 scopesOption := internaloption.WithDefaultScopes(
196 "https://www.googleapis.com/auth/admin.chrome.printers",
197 "https://www.googleapis.com/auth/admin.chrome.printers.readonly",
198 "https://www.googleapis.com/auth/admin.directory.customer",
199 "https://www.googleapis.com/auth/admin.directory.customer.readonly",
200 "https://www.googleapis.com/auth/admin.directory.device.chromeos",
201 "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly",
202 "https://www.googleapis.com/auth/admin.directory.device.mobile",
203 "https://www.googleapis.com/auth/admin.directory.device.mobile.action",
204 "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly",
205 "https://www.googleapis.com/auth/admin.directory.domain",
206 "https://www.googleapis.com/auth/admin.directory.domain.readonly",
207 "https://www.googleapis.com/auth/admin.directory.group",
208 "https://www.googleapis.com/auth/admin.directory.group.member",
209 "https://www.googleapis.com/auth/admin.directory.group.member.readonly",
210 "https://www.googleapis.com/auth/admin.directory.group.readonly",
211 "https://www.googleapis.com/auth/admin.directory.orgunit",
212 "https://www.googleapis.com/auth/admin.directory.orgunit.readonly",
213 "https://www.googleapis.com/auth/admin.directory.resource.calendar",
214 "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly",
215 "https://www.googleapis.com/auth/admin.directory.rolemanagement",
216 "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly",
217 "https://www.googleapis.com/auth/admin.directory.user",
218 "https://www.googleapis.com/auth/admin.directory.user.alias",
219 "https://www.googleapis.com/auth/admin.directory.user.alias.readonly",
220 "https://www.googleapis.com/auth/admin.directory.user.readonly",
221 "https://www.googleapis.com/auth/admin.directory.user.security",
222 "https://www.googleapis.com/auth/admin.directory.userschema",
223 "https://www.googleapis.com/auth/admin.directory.userschema.readonly",
224 "https://www.googleapis.com/auth/cloud-platform",
225 )
226
227 opts = append([]option.ClientOption{scopesOption}, opts...)
228 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
229 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
230 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
231 opts = append(opts, internaloption.EnableNewAuthLibrary())
232 client, endpoint, err := htransport.NewClient(ctx, opts...)
233 if err != nil {
234 return nil, err
235 }
236 s, err := New(client)
237 if err != nil {
238 return nil, err
239 }
240 if endpoint != "" {
241 s.BasePath = endpoint
242 }
243 return s, nil
244 }
245
246
247
248
249
250
251 func New(client *http.Client) (*Service, error) {
252 if client == nil {
253 return nil, errors.New("client is nil")
254 }
255 s := &Service{client: client, BasePath: basePath}
256 s.Asps = NewAspsService(s)
257 s.Channels = NewChannelsService(s)
258 s.Chromeosdevices = NewChromeosdevicesService(s)
259 s.Customer = NewCustomerService(s)
260 s.Customers = NewCustomersService(s)
261 s.DomainAliases = NewDomainAliasesService(s)
262 s.Domains = NewDomainsService(s)
263 s.Groups = NewGroupsService(s)
264 s.Members = NewMembersService(s)
265 s.Mobiledevices = NewMobiledevicesService(s)
266 s.Orgunits = NewOrgunitsService(s)
267 s.Privileges = NewPrivilegesService(s)
268 s.Resources = NewResourcesService(s)
269 s.RoleAssignments = NewRoleAssignmentsService(s)
270 s.Roles = NewRolesService(s)
271 s.Schemas = NewSchemasService(s)
272 s.Tokens = NewTokensService(s)
273 s.TwoStepVerification = NewTwoStepVerificationService(s)
274 s.Users = NewUsersService(s)
275 s.VerificationCodes = NewVerificationCodesService(s)
276 return s, nil
277 }
278
279 type Service struct {
280 client *http.Client
281 BasePath string
282 UserAgent string
283
284 Asps *AspsService
285
286 Channels *ChannelsService
287
288 Chromeosdevices *ChromeosdevicesService
289
290 Customer *CustomerService
291
292 Customers *CustomersService
293
294 DomainAliases *DomainAliasesService
295
296 Domains *DomainsService
297
298 Groups *GroupsService
299
300 Members *MembersService
301
302 Mobiledevices *MobiledevicesService
303
304 Orgunits *OrgunitsService
305
306 Privileges *PrivilegesService
307
308 Resources *ResourcesService
309
310 RoleAssignments *RoleAssignmentsService
311
312 Roles *RolesService
313
314 Schemas *SchemasService
315
316 Tokens *TokensService
317
318 TwoStepVerification *TwoStepVerificationService
319
320 Users *UsersService
321
322 VerificationCodes *VerificationCodesService
323 }
324
325 func (s *Service) userAgent() string {
326 if s.UserAgent == "" {
327 return googleapi.UserAgent
328 }
329 return googleapi.UserAgent + " " + s.UserAgent
330 }
331
332 func NewAspsService(s *Service) *AspsService {
333 rs := &AspsService{s: s}
334 return rs
335 }
336
337 type AspsService struct {
338 s *Service
339 }
340
341 func NewChannelsService(s *Service) *ChannelsService {
342 rs := &ChannelsService{s: s}
343 return rs
344 }
345
346 type ChannelsService struct {
347 s *Service
348 }
349
350 func NewChromeosdevicesService(s *Service) *ChromeosdevicesService {
351 rs := &ChromeosdevicesService{s: s}
352 return rs
353 }
354
355 type ChromeosdevicesService struct {
356 s *Service
357 }
358
359 func NewCustomerService(s *Service) *CustomerService {
360 rs := &CustomerService{s: s}
361 rs.Devices = NewCustomerDevicesService(s)
362 return rs
363 }
364
365 type CustomerService struct {
366 s *Service
367
368 Devices *CustomerDevicesService
369 }
370
371 func NewCustomerDevicesService(s *Service) *CustomerDevicesService {
372 rs := &CustomerDevicesService{s: s}
373 rs.Chromeos = NewCustomerDevicesChromeosService(s)
374 return rs
375 }
376
377 type CustomerDevicesService struct {
378 s *Service
379
380 Chromeos *CustomerDevicesChromeosService
381 }
382
383 func NewCustomerDevicesChromeosService(s *Service) *CustomerDevicesChromeosService {
384 rs := &CustomerDevicesChromeosService{s: s}
385 rs.Commands = NewCustomerDevicesChromeosCommandsService(s)
386 return rs
387 }
388
389 type CustomerDevicesChromeosService struct {
390 s *Service
391
392 Commands *CustomerDevicesChromeosCommandsService
393 }
394
395 func NewCustomerDevicesChromeosCommandsService(s *Service) *CustomerDevicesChromeosCommandsService {
396 rs := &CustomerDevicesChromeosCommandsService{s: s}
397 return rs
398 }
399
400 type CustomerDevicesChromeosCommandsService struct {
401 s *Service
402 }
403
404 func NewCustomersService(s *Service) *CustomersService {
405 rs := &CustomersService{s: s}
406 rs.Chrome = NewCustomersChromeService(s)
407 return rs
408 }
409
410 type CustomersService struct {
411 s *Service
412
413 Chrome *CustomersChromeService
414 }
415
416 func NewCustomersChromeService(s *Service) *CustomersChromeService {
417 rs := &CustomersChromeService{s: s}
418 rs.PrintServers = NewCustomersChromePrintServersService(s)
419 rs.Printers = NewCustomersChromePrintersService(s)
420 return rs
421 }
422
423 type CustomersChromeService struct {
424 s *Service
425
426 PrintServers *CustomersChromePrintServersService
427
428 Printers *CustomersChromePrintersService
429 }
430
431 func NewCustomersChromePrintServersService(s *Service) *CustomersChromePrintServersService {
432 rs := &CustomersChromePrintServersService{s: s}
433 return rs
434 }
435
436 type CustomersChromePrintServersService struct {
437 s *Service
438 }
439
440 func NewCustomersChromePrintersService(s *Service) *CustomersChromePrintersService {
441 rs := &CustomersChromePrintersService{s: s}
442 return rs
443 }
444
445 type CustomersChromePrintersService struct {
446 s *Service
447 }
448
449 func NewDomainAliasesService(s *Service) *DomainAliasesService {
450 rs := &DomainAliasesService{s: s}
451 return rs
452 }
453
454 type DomainAliasesService struct {
455 s *Service
456 }
457
458 func NewDomainsService(s *Service) *DomainsService {
459 rs := &DomainsService{s: s}
460 return rs
461 }
462
463 type DomainsService struct {
464 s *Service
465 }
466
467 func NewGroupsService(s *Service) *GroupsService {
468 rs := &GroupsService{s: s}
469 rs.Aliases = NewGroupsAliasesService(s)
470 return rs
471 }
472
473 type GroupsService struct {
474 s *Service
475
476 Aliases *GroupsAliasesService
477 }
478
479 func NewGroupsAliasesService(s *Service) *GroupsAliasesService {
480 rs := &GroupsAliasesService{s: s}
481 return rs
482 }
483
484 type GroupsAliasesService struct {
485 s *Service
486 }
487
488 func NewMembersService(s *Service) *MembersService {
489 rs := &MembersService{s: s}
490 return rs
491 }
492
493 type MembersService struct {
494 s *Service
495 }
496
497 func NewMobiledevicesService(s *Service) *MobiledevicesService {
498 rs := &MobiledevicesService{s: s}
499 return rs
500 }
501
502 type MobiledevicesService struct {
503 s *Service
504 }
505
506 func NewOrgunitsService(s *Service) *OrgunitsService {
507 rs := &OrgunitsService{s: s}
508 return rs
509 }
510
511 type OrgunitsService struct {
512 s *Service
513 }
514
515 func NewPrivilegesService(s *Service) *PrivilegesService {
516 rs := &PrivilegesService{s: s}
517 return rs
518 }
519
520 type PrivilegesService struct {
521 s *Service
522 }
523
524 func NewResourcesService(s *Service) *ResourcesService {
525 rs := &ResourcesService{s: s}
526 rs.Buildings = NewResourcesBuildingsService(s)
527 rs.Calendars = NewResourcesCalendarsService(s)
528 rs.Features = NewResourcesFeaturesService(s)
529 return rs
530 }
531
532 type ResourcesService struct {
533 s *Service
534
535 Buildings *ResourcesBuildingsService
536
537 Calendars *ResourcesCalendarsService
538
539 Features *ResourcesFeaturesService
540 }
541
542 func NewResourcesBuildingsService(s *Service) *ResourcesBuildingsService {
543 rs := &ResourcesBuildingsService{s: s}
544 return rs
545 }
546
547 type ResourcesBuildingsService struct {
548 s *Service
549 }
550
551 func NewResourcesCalendarsService(s *Service) *ResourcesCalendarsService {
552 rs := &ResourcesCalendarsService{s: s}
553 return rs
554 }
555
556 type ResourcesCalendarsService struct {
557 s *Service
558 }
559
560 func NewResourcesFeaturesService(s *Service) *ResourcesFeaturesService {
561 rs := &ResourcesFeaturesService{s: s}
562 return rs
563 }
564
565 type ResourcesFeaturesService struct {
566 s *Service
567 }
568
569 func NewRoleAssignmentsService(s *Service) *RoleAssignmentsService {
570 rs := &RoleAssignmentsService{s: s}
571 return rs
572 }
573
574 type RoleAssignmentsService struct {
575 s *Service
576 }
577
578 func NewRolesService(s *Service) *RolesService {
579 rs := &RolesService{s: s}
580 return rs
581 }
582
583 type RolesService struct {
584 s *Service
585 }
586
587 func NewSchemasService(s *Service) *SchemasService {
588 rs := &SchemasService{s: s}
589 return rs
590 }
591
592 type SchemasService struct {
593 s *Service
594 }
595
596 func NewTokensService(s *Service) *TokensService {
597 rs := &TokensService{s: s}
598 return rs
599 }
600
601 type TokensService struct {
602 s *Service
603 }
604
605 func NewTwoStepVerificationService(s *Service) *TwoStepVerificationService {
606 rs := &TwoStepVerificationService{s: s}
607 return rs
608 }
609
610 type TwoStepVerificationService struct {
611 s *Service
612 }
613
614 func NewUsersService(s *Service) *UsersService {
615 rs := &UsersService{s: s}
616 rs.Aliases = NewUsersAliasesService(s)
617 rs.Photos = NewUsersPhotosService(s)
618 return rs
619 }
620
621 type UsersService struct {
622 s *Service
623
624 Aliases *UsersAliasesService
625
626 Photos *UsersPhotosService
627 }
628
629 func NewUsersAliasesService(s *Service) *UsersAliasesService {
630 rs := &UsersAliasesService{s: s}
631 return rs
632 }
633
634 type UsersAliasesService struct {
635 s *Service
636 }
637
638 func NewUsersPhotosService(s *Service) *UsersPhotosService {
639 rs := &UsersPhotosService{s: s}
640 return rs
641 }
642
643 type UsersPhotosService struct {
644 s *Service
645 }
646
647 func NewVerificationCodesService(s *Service) *VerificationCodesService {
648 rs := &VerificationCodesService{s: s}
649 return rs
650 }
651
652 type VerificationCodesService struct {
653 s *Service
654 }
655
656
657 type Alias struct {
658 Alias string `json:"alias,omitempty"`
659 Etag string `json:"etag,omitempty"`
660 Id string `json:"id,omitempty"`
661 Kind string `json:"kind,omitempty"`
662 PrimaryEmail string `json:"primaryEmail,omitempty"`
663
664
665 googleapi.ServerResponse `json:"-"`
666
667
668
669
670
671 ForceSendFields []string `json:"-"`
672
673
674
675
676 NullFields []string `json:"-"`
677 }
678
679 func (s *Alias) MarshalJSON() ([]byte, error) {
680 type NoMethod Alias
681 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
682 }
683
684
685 type Aliases struct {
686 Aliases []interface{} `json:"aliases,omitempty"`
687 Etag string `json:"etag,omitempty"`
688 Kind string `json:"kind,omitempty"`
689
690
691 googleapi.ServerResponse `json:"-"`
692
693
694
695
696
697 ForceSendFields []string `json:"-"`
698
699
700
701
702 NullFields []string `json:"-"`
703 }
704
705 func (s *Aliases) MarshalJSON() ([]byte, error) {
706 type NoMethod Aliases
707 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
708 }
709
710
711
712
713
714
715
716 type Asp struct {
717
718 CodeId int64 `json:"codeId,omitempty"`
719
720
721 CreationTime int64 `json:"creationTime,omitempty,string"`
722
723 Etag string `json:"etag,omitempty"`
724
725 Kind string `json:"kind,omitempty"`
726
727
728 LastTimeUsed int64 `json:"lastTimeUsed,omitempty,string"`
729
730
731 Name string `json:"name,omitempty"`
732
733 UserKey string `json:"userKey,omitempty"`
734
735
736 googleapi.ServerResponse `json:"-"`
737
738
739
740
741
742 ForceSendFields []string `json:"-"`
743
744
745
746
747 NullFields []string `json:"-"`
748 }
749
750 func (s *Asp) MarshalJSON() ([]byte, error) {
751 type NoMethod Asp
752 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
753 }
754
755 type Asps struct {
756
757 Etag string `json:"etag,omitempty"`
758
759 Items []*Asp `json:"items,omitempty"`
760
761
762 Kind string `json:"kind,omitempty"`
763
764
765 googleapi.ServerResponse `json:"-"`
766
767
768
769
770
771 ForceSendFields []string `json:"-"`
772
773
774
775
776 NullFields []string `json:"-"`
777 }
778
779 func (s *Asps) MarshalJSON() ([]byte, error) {
780 type NoMethod Asps
781 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
782 }
783
784
785
786
787 type AuxiliaryMessage struct {
788
789
790 AuxiliaryMessage string `json:"auxiliaryMessage,omitempty"`
791
792 FieldMask string `json:"fieldMask,omitempty"`
793
794
795
796
797
798
799
800 Severity string `json:"severity,omitempty"`
801
802
803
804
805
806 ForceSendFields []string `json:"-"`
807
808
809
810
811 NullFields []string `json:"-"`
812 }
813
814 func (s *AuxiliaryMessage) MarshalJSON() ([]byte, error) {
815 type NoMethod AuxiliaryMessage
816 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
817 }
818
819
820 type BacklightInfo struct {
821
822
823 Brightness int64 `json:"brightness,omitempty"`
824
825 MaxBrightness int64 `json:"maxBrightness,omitempty"`
826
827
828 Path string `json:"path,omitempty"`
829
830
831
832
833
834 ForceSendFields []string `json:"-"`
835
836
837
838
839 NullFields []string `json:"-"`
840 }
841
842 func (s *BacklightInfo) MarshalJSON() ([]byte, error) {
843 type NoMethod BacklightInfo
844 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
845 }
846
847
848
849 type BatchChangeChromeOsDeviceStatusRequest struct {
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876 ChangeChromeOsDeviceStatusAction string `json:"changeChromeOsDeviceStatusAction,omitempty"`
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904 DeprovisionReason string `json:"deprovisionReason,omitempty"`
905
906
907 DeviceIds []string `json:"deviceIds,omitempty"`
908
909
910
911
912
913
914 ForceSendFields []string `json:"-"`
915
916
917
918
919
920 NullFields []string `json:"-"`
921 }
922
923 func (s *BatchChangeChromeOsDeviceStatusRequest) MarshalJSON() ([]byte, error) {
924 type NoMethod BatchChangeChromeOsDeviceStatusRequest
925 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
926 }
927
928
929
930 type BatchChangeChromeOsDeviceStatusResponse struct {
931
932
933 ChangeChromeOsDeviceStatusResults []*ChangeChromeOsDeviceStatusResult `json:"changeChromeOsDeviceStatusResults,omitempty"`
934
935
936 googleapi.ServerResponse `json:"-"`
937
938
939
940
941
942
943 ForceSendFields []string `json:"-"`
944
945
946
947
948
949 NullFields []string `json:"-"`
950 }
951
952 func (s *BatchChangeChromeOsDeviceStatusResponse) MarshalJSON() ([]byte, error) {
953 type NoMethod BatchChangeChromeOsDeviceStatusResponse
954 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
955 }
956
957
958
959 type BatchCreatePrintServersRequest struct {
960
961
962 Requests []*CreatePrintServerRequest `json:"requests,omitempty"`
963
964
965
966
967
968 ForceSendFields []string `json:"-"`
969
970
971
972
973 NullFields []string `json:"-"`
974 }
975
976 func (s *BatchCreatePrintServersRequest) MarshalJSON() ([]byte, error) {
977 type NoMethod BatchCreatePrintServersRequest
978 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
979 }
980
981 type BatchCreatePrintServersResponse struct {
982
983
984 Failures []*PrintServerFailureInfo `json:"failures,omitempty"`
985
986
987 PrintServers []*PrintServer `json:"printServers,omitempty"`
988
989
990 googleapi.ServerResponse `json:"-"`
991
992
993
994
995
996 ForceSendFields []string `json:"-"`
997
998
999
1000
1001 NullFields []string `json:"-"`
1002 }
1003
1004 func (s *BatchCreatePrintServersResponse) MarshalJSON() ([]byte, error) {
1005 type NoMethod BatchCreatePrintServersResponse
1006 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1007 }
1008
1009
1010 type BatchCreatePrintersRequest struct {
1011
1012 Requests []*CreatePrinterRequest `json:"requests,omitempty"`
1013
1014
1015
1016
1017
1018 ForceSendFields []string `json:"-"`
1019
1020
1021
1022
1023 NullFields []string `json:"-"`
1024 }
1025
1026 func (s *BatchCreatePrintersRequest) MarshalJSON() ([]byte, error) {
1027 type NoMethod BatchCreatePrintersRequest
1028 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1029 }
1030
1031
1032 type BatchCreatePrintersResponse struct {
1033
1034
1035 Failures []*FailureInfo `json:"failures,omitempty"`
1036
1037 Printers []*Printer `json:"printers,omitempty"`
1038
1039
1040 googleapi.ServerResponse `json:"-"`
1041
1042
1043
1044
1045
1046 ForceSendFields []string `json:"-"`
1047
1048
1049
1050
1051 NullFields []string `json:"-"`
1052 }
1053
1054 func (s *BatchCreatePrintersResponse) MarshalJSON() ([]byte, error) {
1055 type NoMethod BatchCreatePrintersResponse
1056 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1057 }
1058
1059
1060
1061 type BatchDeletePrintServersRequest struct {
1062
1063
1064 PrintServerIds []string `json:"printServerIds,omitempty"`
1065
1066
1067
1068
1069
1070 ForceSendFields []string `json:"-"`
1071
1072
1073
1074
1075 NullFields []string `json:"-"`
1076 }
1077
1078 func (s *BatchDeletePrintServersRequest) MarshalJSON() ([]byte, error) {
1079 type NoMethod BatchDeletePrintServersRequest
1080 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1081 }
1082
1083 type BatchDeletePrintServersResponse struct {
1084
1085 FailedPrintServers []*PrintServerFailureInfo `json:"failedPrintServers,omitempty"`
1086
1087 PrintServerIds []string `json:"printServerIds,omitempty"`
1088
1089
1090 googleapi.ServerResponse `json:"-"`
1091
1092
1093
1094
1095
1096 ForceSendFields []string `json:"-"`
1097
1098
1099
1100
1101 NullFields []string `json:"-"`
1102 }
1103
1104 func (s *BatchDeletePrintServersResponse) MarshalJSON() ([]byte, error) {
1105 type NoMethod BatchDeletePrintServersResponse
1106 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1107 }
1108
1109
1110 type BatchDeletePrintersRequest struct {
1111
1112 PrinterIds []string `json:"printerIds,omitempty"`
1113
1114
1115
1116
1117
1118 ForceSendFields []string `json:"-"`
1119
1120
1121
1122
1123 NullFields []string `json:"-"`
1124 }
1125
1126 func (s *BatchDeletePrintersRequest) MarshalJSON() ([]byte, error) {
1127 type NoMethod BatchDeletePrintersRequest
1128 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1129 }
1130
1131
1132
1133 type BatchDeletePrintersResponse struct {
1134
1135 FailedPrinters []*FailureInfo `json:"failedPrinters,omitempty"`
1136
1137 PrinterIds []string `json:"printerIds,omitempty"`
1138
1139
1140 googleapi.ServerResponse `json:"-"`
1141
1142
1143
1144
1145
1146 ForceSendFields []string `json:"-"`
1147
1148
1149
1150
1151 NullFields []string `json:"-"`
1152 }
1153
1154 func (s *BatchDeletePrintersResponse) MarshalJSON() ([]byte, error) {
1155 type NoMethod BatchDeletePrintersResponse
1156 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1157 }
1158
1159
1160 type Building struct {
1161
1162
1163
1164 Address *BuildingAddress `json:"address,omitempty"`
1165
1166
1167 BuildingId string `json:"buildingId,omitempty"`
1168
1169
1170
1171 BuildingName string `json:"buildingName,omitempty"`
1172
1173
1174 Coordinates *BuildingCoordinates `json:"coordinates,omitempty"`
1175
1176
1177 Description string `json:"description,omitempty"`
1178
1179 Etags string `json:"etags,omitempty"`
1180
1181
1182
1183
1184 FloorNames []string `json:"floorNames,omitempty"`
1185
1186 Kind string `json:"kind,omitempty"`
1187
1188
1189 googleapi.ServerResponse `json:"-"`
1190
1191
1192
1193
1194
1195 ForceSendFields []string `json:"-"`
1196
1197
1198
1199
1200 NullFields []string `json:"-"`
1201 }
1202
1203 func (s *Building) MarshalJSON() ([]byte, error) {
1204 type NoMethod Building
1205 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1206 }
1207
1208
1209 type BuildingAddress struct {
1210
1211
1212 AddressLines []string `json:"addressLines,omitempty"`
1213
1214
1215 AdministrativeArea string `json:"administrativeArea,omitempty"`
1216
1217
1218 LanguageCode string `json:"languageCode,omitempty"`
1219
1220
1221
1222
1223 Locality string `json:"locality,omitempty"`
1224
1225 PostalCode string `json:"postalCode,omitempty"`
1226
1227 RegionCode string `json:"regionCode,omitempty"`
1228
1229 Sublocality string `json:"sublocality,omitempty"`
1230
1231
1232
1233
1234
1235 ForceSendFields []string `json:"-"`
1236
1237
1238
1239
1240 NullFields []string `json:"-"`
1241 }
1242
1243 func (s *BuildingAddress) MarshalJSON() ([]byte, error) {
1244 type NoMethod BuildingAddress
1245 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1246 }
1247
1248
1249 type BuildingCoordinates struct {
1250
1251 Latitude float64 `json:"latitude,omitempty"`
1252
1253 Longitude float64 `json:"longitude,omitempty"`
1254
1255
1256
1257
1258
1259 ForceSendFields []string `json:"-"`
1260
1261
1262
1263
1264 NullFields []string `json:"-"`
1265 }
1266
1267 func (s *BuildingCoordinates) MarshalJSON() ([]byte, error) {
1268 type NoMethod BuildingCoordinates
1269 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1270 }
1271
1272 func (s *BuildingCoordinates) UnmarshalJSON(data []byte) error {
1273 type NoMethod BuildingCoordinates
1274 var s1 struct {
1275 Latitude gensupport.JSONFloat64 `json:"latitude"`
1276 Longitude gensupport.JSONFloat64 `json:"longitude"`
1277 *NoMethod
1278 }
1279 s1.NoMethod = (*NoMethod)(s)
1280 if err := json.Unmarshal(data, &s1); err != nil {
1281 return err
1282 }
1283 s.Latitude = float64(s1.Latitude)
1284 s.Longitude = float64(s1.Longitude)
1285 return nil
1286 }
1287
1288
1289 type Buildings struct {
1290
1291 Buildings []*Building `json:"buildings,omitempty"`
1292
1293 Etag string `json:"etag,omitempty"`
1294
1295 Kind string `json:"kind,omitempty"`
1296
1297
1298
1299 NextPageToken string `json:"nextPageToken,omitempty"`
1300
1301
1302 googleapi.ServerResponse `json:"-"`
1303
1304
1305
1306
1307
1308 ForceSendFields []string `json:"-"`
1309
1310
1311
1312
1313 NullFields []string `json:"-"`
1314 }
1315
1316 func (s *Buildings) MarshalJSON() ([]byte, error) {
1317 type NoMethod Buildings
1318 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1319 }
1320
1321
1322 type CalendarResource struct {
1323
1324 BuildingId string `json:"buildingId,omitempty"`
1325
1326 Capacity int64 `json:"capacity,omitempty"`
1327
1328 Etags string `json:"etags,omitempty"`
1329
1330 FeatureInstances interface{} `json:"featureInstances,omitempty"`
1331
1332 FloorName string `json:"floorName,omitempty"`
1333
1334 FloorSection string `json:"floorSection,omitempty"`
1335
1336
1337
1338 GeneratedResourceName string `json:"generatedResourceName,omitempty"`
1339
1340
1341 Kind string `json:"kind,omitempty"`
1342
1343
1344 ResourceCategory string `json:"resourceCategory,omitempty"`
1345
1346 ResourceDescription string `json:"resourceDescription,omitempty"`
1347
1348
1349 ResourceEmail string `json:"resourceEmail,omitempty"`
1350
1351 ResourceId string `json:"resourceId,omitempty"`
1352
1353
1354 ResourceName string `json:"resourceName,omitempty"`
1355
1356
1357 ResourceType string `json:"resourceType,omitempty"`
1358
1359
1360 UserVisibleDescription string `json:"userVisibleDescription,omitempty"`
1361
1362
1363 googleapi.ServerResponse `json:"-"`
1364
1365
1366
1367
1368
1369 ForceSendFields []string `json:"-"`
1370
1371
1372
1373
1374 NullFields []string `json:"-"`
1375 }
1376
1377 func (s *CalendarResource) MarshalJSON() ([]byte, error) {
1378 type NoMethod CalendarResource
1379 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1380 }
1381
1382
1383 type CalendarResources struct {
1384
1385 Etag string `json:"etag,omitempty"`
1386
1387 Items []*CalendarResource `json:"items,omitempty"`
1388
1389
1390 Kind string `json:"kind,omitempty"`
1391
1392
1393
1394 NextPageToken string `json:"nextPageToken,omitempty"`
1395
1396
1397 googleapi.ServerResponse `json:"-"`
1398
1399
1400
1401
1402
1403 ForceSendFields []string `json:"-"`
1404
1405
1406
1407
1408 NullFields []string `json:"-"`
1409 }
1410
1411 func (s *CalendarResources) MarshalJSON() ([]byte, error) {
1412 type NoMethod CalendarResources
1413 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1414 }
1415
1416
1417
1418 type ChangeChromeOsDeviceStatusResult struct {
1419
1420 DeviceId string `json:"deviceId,omitempty"`
1421
1422 Error *Status `json:"error,omitempty"`
1423
1424 Response *ChangeChromeOsDeviceStatusSucceeded `json:"response,omitempty"`
1425
1426
1427
1428
1429
1430 ForceSendFields []string `json:"-"`
1431
1432
1433
1434
1435 NullFields []string `json:"-"`
1436 }
1437
1438 func (s *ChangeChromeOsDeviceStatusResult) MarshalJSON() ([]byte, error) {
1439 type NoMethod ChangeChromeOsDeviceStatusResult
1440 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1441 }
1442
1443
1444
1445 type ChangeChromeOsDeviceStatusSucceeded struct {
1446 }
1447
1448
1449 type Channel struct {
1450
1451 Address string `json:"address,omitempty"`
1452
1453
1454 Expiration int64 `json:"expiration,omitempty,string"`
1455
1456 Id string `json:"id,omitempty"`
1457
1458
1459 Kind string `json:"kind,omitempty"`
1460
1461
1462
1463
1464 Params map[string]string `json:"params,omitempty"`
1465
1466 Payload bool `json:"payload,omitempty"`
1467
1468
1469 ResourceId string `json:"resourceId,omitempty"`
1470
1471 ResourceUri string `json:"resourceUri,omitempty"`
1472
1473
1474 Token string `json:"token,omitempty"`
1475
1476 Type string `json:"type,omitempty"`
1477
1478
1479 googleapi.ServerResponse `json:"-"`
1480
1481
1482
1483
1484
1485 ForceSendFields []string `json:"-"`
1486
1487
1488
1489
1490 NullFields []string `json:"-"`
1491 }
1492
1493 func (s *Channel) MarshalJSON() ([]byte, error) {
1494 type NoMethod Channel
1495 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1496 }
1497
1498
1499
1500
1501
1502 type ChromeOsDevice struct {
1503
1504 ActiveTimeRanges []*ChromeOsDeviceActiveTimeRanges `json:"activeTimeRanges,omitempty"`
1505
1506
1507 AnnotatedAssetId string `json:"annotatedAssetId,omitempty"`
1508
1509
1510 AnnotatedLocation string `json:"annotatedLocation,omitempty"`
1511
1512
1513 AnnotatedUser string `json:"annotatedUser,omitempty"`
1514
1515
1516
1517 AutoUpdateExpiration int64 `json:"autoUpdateExpiration,omitempty,string"`
1518
1519
1520 AutoUpdateThrough string `json:"autoUpdateThrough,omitempty"`
1521
1522 BacklightInfo []*BacklightInfo `json:"backlightInfo,omitempty"`
1523
1524
1525
1526
1527
1528
1529 BootMode string `json:"bootMode,omitempty"`
1530
1531
1532
1533
1534
1535
1536 ChromeOsType string `json:"chromeOsType,omitempty"`
1537
1538 CpuInfo []*ChromeOsDeviceCpuInfo `json:"cpuInfo,omitempty"`
1539
1540 CpuStatusReports []*ChromeOsDeviceCpuStatusReports `json:"cpuStatusReports,omitempty"`
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565 DeprovisionReason string `json:"deprovisionReason,omitempty"`
1566
1567 DeviceFiles []*ChromeOsDeviceDeviceFiles `json:"deviceFiles,omitempty"`
1568
1569 DeviceId string `json:"deviceId,omitempty"`
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583 DeviceLicenseType string `json:"deviceLicenseType,omitempty"`
1584
1585
1586 DiskVolumeReports []*ChromeOsDeviceDiskVolumeReports `json:"diskVolumeReports,omitempty"`
1587
1588
1589
1590
1591
1592
1593 DockMacAddress string `json:"dockMacAddress,omitempty"`
1594
1595 Etag string `json:"etag,omitempty"`
1596
1597
1598 EthernetMacAddress string `json:"ethernetMacAddress,omitempty"`
1599
1600
1601
1602
1603 EthernetMacAddress0 string `json:"ethernetMacAddress0,omitempty"`
1604
1605
1606 ExtendedSupportEligible bool `json:"extendedSupportEligible,omitempty"`
1607
1608
1609 ExtendedSupportEnabled bool `json:"extendedSupportEnabled,omitempty"`
1610
1611
1612 ExtendedSupportStart string `json:"extendedSupportStart,omitempty"`
1613
1614 FanInfo []*FanInfo `json:"fanInfo,omitempty"`
1615
1616 FirmwareVersion string `json:"firmwareVersion,omitempty"`
1617
1618
1619 FirstEnrollmentTime string `json:"firstEnrollmentTime,omitempty"`
1620
1621
1622 Kind string `json:"kind,omitempty"`
1623
1624
1625 LastDeprovisionTimestamp string `json:"lastDeprovisionTimestamp,omitempty"`
1626
1627 LastEnrollmentTime string `json:"lastEnrollmentTime,omitempty"`
1628
1629 LastKnownNetwork []*ChromeOsDeviceLastKnownNetwork `json:"lastKnownNetwork,omitempty"`
1630
1631
1632 LastSync string `json:"lastSync,omitempty"`
1633
1634
1635 MacAddress string `json:"macAddress,omitempty"`
1636
1637
1638 ManufactureDate string `json:"manufactureDate,omitempty"`
1639
1640
1641
1642
1643
1644
1645
1646 Meid string `json:"meid,omitempty"`
1647
1648
1649 Model string `json:"model,omitempty"`
1650
1651
1652
1653
1654
1655 Notes string `json:"notes,omitempty"`
1656
1657
1658 OrderNumber string `json:"orderNumber,omitempty"`
1659
1660
1661
1662
1663
1664
1665
1666
1667 OrgUnitId string `json:"orgUnitId,omitempty"`
1668
1669
1670
1671
1672
1673
1674
1675
1676 OrgUnitPath string `json:"orgUnitPath,omitempty"`
1677
1678 OsUpdateStatus *OsUpdateStatus `json:"osUpdateStatus,omitempty"`
1679
1680 OsVersion string `json:"osVersion,omitempty"`
1681
1682 PlatformVersion string `json:"platformVersion,omitempty"`
1683
1684
1685 RecentUsers []*ChromeOsDeviceRecentUsers `json:"recentUsers,omitempty"`
1686
1687
1688 ScreenshotFiles []*ChromeOsDeviceScreenshotFiles `json:"screenshotFiles,omitempty"`
1689
1690
1691
1692 SerialNumber string `json:"serialNumber,omitempty"`
1693
1694 Status string `json:"status,omitempty"`
1695
1696 SupportEndDate string `json:"supportEndDate,omitempty"`
1697
1698 SystemRamFreeReports []*ChromeOsDeviceSystemRamFreeReports `json:"systemRamFreeReports,omitempty"`
1699
1700 SystemRamTotal int64 `json:"systemRamTotal,omitempty,string"`
1701
1702 TpmVersionInfo *ChromeOsDeviceTpmVersionInfo `json:"tpmVersionInfo,omitempty"`
1703
1704
1705 WillAutoRenew bool `json:"willAutoRenew,omitempty"`
1706
1707
1708 googleapi.ServerResponse `json:"-"`
1709
1710
1711
1712
1713
1714 ForceSendFields []string `json:"-"`
1715
1716
1717
1718
1719 NullFields []string `json:"-"`
1720 }
1721
1722 func (s *ChromeOsDevice) MarshalJSON() ([]byte, error) {
1723 type NoMethod ChromeOsDevice
1724 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1725 }
1726
1727 type ChromeOsDeviceActiveTimeRanges struct {
1728
1729 ActiveTime int64 `json:"activeTime,omitempty"`
1730
1731 Date string `json:"date,omitempty"`
1732
1733
1734
1735
1736
1737 ForceSendFields []string `json:"-"`
1738
1739
1740
1741
1742 NullFields []string `json:"-"`
1743 }
1744
1745 func (s *ChromeOsDeviceActiveTimeRanges) MarshalJSON() ([]byte, error) {
1746 type NoMethod ChromeOsDeviceActiveTimeRanges
1747 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1748 }
1749
1750
1751 type ChromeOsDeviceCpuInfo struct {
1752
1753 Architecture string `json:"architecture,omitempty"`
1754
1755 LogicalCpus []*ChromeOsDeviceCpuInfoLogicalCpus `json:"logicalCpus,omitempty"`
1756
1757 MaxClockSpeedKhz int64 `json:"maxClockSpeedKhz,omitempty"`
1758
1759 Model string `json:"model,omitempty"`
1760
1761
1762
1763
1764
1765 ForceSendFields []string `json:"-"`
1766
1767
1768
1769
1770 NullFields []string `json:"-"`
1771 }
1772
1773 func (s *ChromeOsDeviceCpuInfo) MarshalJSON() ([]byte, error) {
1774 type NoMethod ChromeOsDeviceCpuInfo
1775 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1776 }
1777
1778
1779 type ChromeOsDeviceCpuInfoLogicalCpus struct {
1780
1781
1782 CStates []*ChromeOsDeviceCpuInfoLogicalCpusCStates `json:"cStates,omitempty"`
1783
1784 CurrentScalingFrequencyKhz int64 `json:"currentScalingFrequencyKhz,omitempty"`
1785
1786 IdleDuration string `json:"idleDuration,omitempty"`
1787
1788
1789 MaxScalingFrequencyKhz int64 `json:"maxScalingFrequencyKhz,omitempty"`
1790
1791
1792
1793
1794
1795 ForceSendFields []string `json:"-"`
1796
1797
1798
1799
1800 NullFields []string `json:"-"`
1801 }
1802
1803 func (s *ChromeOsDeviceCpuInfoLogicalCpus) MarshalJSON() ([]byte, error) {
1804 type NoMethod ChromeOsDeviceCpuInfoLogicalCpus
1805 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1806 }
1807
1808
1809
1810
1811 type ChromeOsDeviceCpuInfoLogicalCpusCStates struct {
1812
1813 DisplayName string `json:"displayName,omitempty"`
1814
1815 SessionDuration string `json:"sessionDuration,omitempty"`
1816
1817
1818
1819
1820
1821 ForceSendFields []string `json:"-"`
1822
1823
1824
1825
1826 NullFields []string `json:"-"`
1827 }
1828
1829 func (s *ChromeOsDeviceCpuInfoLogicalCpusCStates) MarshalJSON() ([]byte, error) {
1830 type NoMethod ChromeOsDeviceCpuInfoLogicalCpusCStates
1831 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1832 }
1833
1834 type ChromeOsDeviceCpuStatusReports struct {
1835
1836 CpuTemperatureInfo []*ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo `json:"cpuTemperatureInfo,omitempty"`
1837 CpuUtilizationPercentageInfo []int64 `json:"cpuUtilizationPercentageInfo,omitempty"`
1838
1839 ReportTime string `json:"reportTime,omitempty"`
1840
1841
1842
1843
1844
1845 ForceSendFields []string `json:"-"`
1846
1847
1848
1849
1850 NullFields []string `json:"-"`
1851 }
1852
1853 func (s *ChromeOsDeviceCpuStatusReports) MarshalJSON() ([]byte, error) {
1854 type NoMethod ChromeOsDeviceCpuStatusReports
1855 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1856 }
1857
1858 type ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo struct {
1859
1860 Label string `json:"label,omitempty"`
1861
1862 Temperature int64 `json:"temperature,omitempty"`
1863
1864
1865
1866
1867
1868 ForceSendFields []string `json:"-"`
1869
1870
1871
1872
1873 NullFields []string `json:"-"`
1874 }
1875
1876 func (s *ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo) MarshalJSON() ([]byte, error) {
1877 type NoMethod ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo
1878 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1879 }
1880
1881 type ChromeOsDeviceDeviceFiles struct {
1882
1883 CreateTime string `json:"createTime,omitempty"`
1884
1885 DownloadUrl string `json:"downloadUrl,omitempty"`
1886
1887 Name string `json:"name,omitempty"`
1888
1889 Type string `json:"type,omitempty"`
1890
1891
1892
1893
1894
1895 ForceSendFields []string `json:"-"`
1896
1897
1898
1899
1900 NullFields []string `json:"-"`
1901 }
1902
1903 func (s *ChromeOsDeviceDeviceFiles) MarshalJSON() ([]byte, error) {
1904 type NoMethod ChromeOsDeviceDeviceFiles
1905 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1906 }
1907
1908 type ChromeOsDeviceDiskVolumeReports struct {
1909
1910 VolumeInfo []*ChromeOsDeviceDiskVolumeReportsVolumeInfo `json:"volumeInfo,omitempty"`
1911
1912
1913
1914
1915
1916 ForceSendFields []string `json:"-"`
1917
1918
1919
1920
1921 NullFields []string `json:"-"`
1922 }
1923
1924 func (s *ChromeOsDeviceDiskVolumeReports) MarshalJSON() ([]byte, error) {
1925 type NoMethod ChromeOsDeviceDiskVolumeReports
1926 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1927 }
1928
1929 type ChromeOsDeviceDiskVolumeReportsVolumeInfo struct {
1930
1931 StorageFree int64 `json:"storageFree,omitempty,string"`
1932
1933 StorageTotal int64 `json:"storageTotal,omitempty,string"`
1934
1935 VolumeId string `json:"volumeId,omitempty"`
1936
1937
1938
1939
1940
1941 ForceSendFields []string `json:"-"`
1942
1943
1944
1945
1946 NullFields []string `json:"-"`
1947 }
1948
1949 func (s *ChromeOsDeviceDiskVolumeReportsVolumeInfo) MarshalJSON() ([]byte, error) {
1950 type NoMethod ChromeOsDeviceDiskVolumeReportsVolumeInfo
1951 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1952 }
1953
1954
1955 type ChromeOsDeviceLastKnownNetwork struct {
1956
1957 IpAddress string `json:"ipAddress,omitempty"`
1958
1959 WanIpAddress string `json:"wanIpAddress,omitempty"`
1960
1961
1962
1963
1964
1965 ForceSendFields []string `json:"-"`
1966
1967
1968
1969
1970 NullFields []string `json:"-"`
1971 }
1972
1973 func (s *ChromeOsDeviceLastKnownNetwork) MarshalJSON() ([]byte, error) {
1974 type NoMethod ChromeOsDeviceLastKnownNetwork
1975 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1976 }
1977
1978
1979
1980 type ChromeOsDeviceRecentUsers struct {
1981
1982
1983 Email string `json:"email,omitempty"`
1984
1985 Type string `json:"type,omitempty"`
1986
1987
1988
1989
1990
1991 ForceSendFields []string `json:"-"`
1992
1993
1994
1995
1996 NullFields []string `json:"-"`
1997 }
1998
1999 func (s *ChromeOsDeviceRecentUsers) MarshalJSON() ([]byte, error) {
2000 type NoMethod ChromeOsDeviceRecentUsers
2001 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2002 }
2003
2004 type ChromeOsDeviceScreenshotFiles struct {
2005
2006 CreateTime string `json:"createTime,omitempty"`
2007
2008 DownloadUrl string `json:"downloadUrl,omitempty"`
2009
2010 Name string `json:"name,omitempty"`
2011
2012 Type string `json:"type,omitempty"`
2013
2014
2015
2016
2017
2018 ForceSendFields []string `json:"-"`
2019
2020
2021
2022
2023 NullFields []string `json:"-"`
2024 }
2025
2026 func (s *ChromeOsDeviceScreenshotFiles) MarshalJSON() ([]byte, error) {
2027 type NoMethod ChromeOsDeviceScreenshotFiles
2028 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2029 }
2030
2031 type ChromeOsDeviceSystemRamFreeReports struct {
2032
2033 ReportTime string `json:"reportTime,omitempty"`
2034 SystemRamFreeInfo googleapi.Int64s `json:"systemRamFreeInfo,omitempty"`
2035
2036
2037
2038
2039
2040 ForceSendFields []string `json:"-"`
2041
2042
2043
2044
2045 NullFields []string `json:"-"`
2046 }
2047
2048 func (s *ChromeOsDeviceSystemRamFreeReports) MarshalJSON() ([]byte, error) {
2049 type NoMethod ChromeOsDeviceSystemRamFreeReports
2050 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2051 }
2052
2053
2054 type ChromeOsDeviceTpmVersionInfo struct {
2055
2056
2057 Family string `json:"family,omitempty"`
2058
2059 FirmwareVersion string `json:"firmwareVersion,omitempty"`
2060
2061 Manufacturer string `json:"manufacturer,omitempty"`
2062
2063
2064 SpecLevel string `json:"specLevel,omitempty"`
2065
2066 TpmModel string `json:"tpmModel,omitempty"`
2067
2068 VendorSpecific string `json:"vendorSpecific,omitempty"`
2069
2070
2071
2072
2073
2074 ForceSendFields []string `json:"-"`
2075
2076
2077
2078
2079 NullFields []string `json:"-"`
2080 }
2081
2082 func (s *ChromeOsDeviceTpmVersionInfo) MarshalJSON() ([]byte, error) {
2083 type NoMethod ChromeOsDeviceTpmVersionInfo
2084 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2085 }
2086
2087
2088
2089 type ChromeOsDeviceAction struct {
2090
2091 Action string `json:"action,omitempty"`
2092
2093
2094
2095
2096 DeprovisionReason string `json:"deprovisionReason,omitempty"`
2097
2098
2099
2100
2101
2102 ForceSendFields []string `json:"-"`
2103
2104
2105
2106
2107 NullFields []string `json:"-"`
2108 }
2109
2110 func (s *ChromeOsDeviceAction) MarshalJSON() ([]byte, error) {
2111 type NoMethod ChromeOsDeviceAction
2112 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2113 }
2114
2115 type ChromeOsDevices struct {
2116
2117 Chromeosdevices []*ChromeOsDevice `json:"chromeosdevices,omitempty"`
2118
2119 Etag string `json:"etag,omitempty"`
2120
2121 Kind string `json:"kind,omitempty"`
2122
2123
2124
2125 NextPageToken string `json:"nextPageToken,omitempty"`
2126
2127
2128 googleapi.ServerResponse `json:"-"`
2129
2130
2131
2132
2133
2134 ForceSendFields []string `json:"-"`
2135
2136
2137
2138
2139 NullFields []string `json:"-"`
2140 }
2141
2142 func (s *ChromeOsDevices) MarshalJSON() ([]byte, error) {
2143 type NoMethod ChromeOsDevices
2144 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2145 }
2146
2147 type ChromeOsMoveDevicesToOu struct {
2148
2149 DeviceIds []string `json:"deviceIds,omitempty"`
2150
2151
2152
2153
2154
2155 ForceSendFields []string `json:"-"`
2156
2157
2158
2159
2160 NullFields []string `json:"-"`
2161 }
2162
2163 func (s *ChromeOsMoveDevicesToOu) MarshalJSON() ([]byte, error) {
2164 type NoMethod ChromeOsMoveDevicesToOu
2165 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2166 }
2167
2168
2169 type CreatePrintServerRequest struct {
2170
2171
2172
2173 Parent string `json:"parent,omitempty"`
2174
2175
2176
2177
2178
2179 PrintServer *PrintServer `json:"printServer,omitempty"`
2180
2181
2182
2183
2184
2185 ForceSendFields []string `json:"-"`
2186
2187
2188
2189
2190 NullFields []string `json:"-"`
2191 }
2192
2193 func (s *CreatePrintServerRequest) MarshalJSON() ([]byte, error) {
2194 type NoMethod CreatePrintServerRequest
2195 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2196 }
2197
2198
2199 type CreatePrinterRequest struct {
2200
2201 Parent string `json:"parent,omitempty"`
2202
2203
2204
2205 Printer *Printer `json:"printer,omitempty"`
2206
2207
2208
2209
2210
2211 ForceSendFields []string `json:"-"`
2212
2213
2214
2215
2216 NullFields []string `json:"-"`
2217 }
2218
2219 func (s *CreatePrinterRequest) MarshalJSON() ([]byte, error) {
2220 type NoMethod CreatePrinterRequest
2221 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2222 }
2223
2224 type Customer struct {
2225
2226
2227 AlternateEmail string `json:"alternateEmail,omitempty"`
2228
2229 CustomerCreationTime string `json:"customerCreationTime,omitempty"`
2230
2231
2232 CustomerDomain string `json:"customerDomain,omitempty"`
2233
2234 Etag string `json:"etag,omitempty"`
2235
2236 Id string `json:"id,omitempty"`
2237
2238
2239 Kind string `json:"kind,omitempty"`
2240
2241
2242
2243
2244 Language string `json:"language,omitempty"`
2245
2246
2247 PhoneNumber string `json:"phoneNumber,omitempty"`
2248
2249 PostalAddress *CustomerPostalAddress `json:"postalAddress,omitempty"`
2250
2251
2252 googleapi.ServerResponse `json:"-"`
2253
2254
2255
2256
2257
2258 ForceSendFields []string `json:"-"`
2259
2260
2261
2262
2263 NullFields []string `json:"-"`
2264 }
2265
2266 func (s *Customer) MarshalJSON() ([]byte, error) {
2267 type NoMethod Customer
2268 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2269 }
2270
2271 type CustomerPostalAddress struct {
2272
2273
2274 AddressLine1 string `json:"addressLine1,omitempty"`
2275
2276 AddressLine2 string `json:"addressLine2,omitempty"`
2277
2278 AddressLine3 string `json:"addressLine3,omitempty"`
2279
2280 ContactName string `json:"contactName,omitempty"`
2281
2282
2283
2284 CountryCode string `json:"countryCode,omitempty"`
2285
2286
2287 Locality string `json:"locality,omitempty"`
2288
2289 OrganizationName string `json:"organizationName,omitempty"`
2290
2291
2292
2293 PostalCode string `json:"postalCode,omitempty"`
2294
2295
2296 Region string `json:"region,omitempty"`
2297
2298
2299
2300
2301
2302 ForceSendFields []string `json:"-"`
2303
2304
2305
2306
2307 NullFields []string `json:"-"`
2308 }
2309
2310 func (s *CustomerPostalAddress) MarshalJSON() ([]byte, error) {
2311 type NoMethod CustomerPostalAddress
2312 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2313 }
2314
2315
2316
2317 type DirectoryChromeosdevicesCommand struct {
2318
2319
2320
2321 CommandExpireTime string `json:"commandExpireTime,omitempty"`
2322
2323 CommandId int64 `json:"commandId,omitempty,string"`
2324
2325 CommandResult *DirectoryChromeosdevicesCommandResult `json:"commandResult,omitempty"`
2326
2327 IssueTime string `json:"issueTime,omitempty"`
2328
2329 Payload string `json:"payload,omitempty"`
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342 State string `json:"state,omitempty"`
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373 Type string `json:"type,omitempty"`
2374
2375
2376 googleapi.ServerResponse `json:"-"`
2377
2378
2379
2380
2381
2382 ForceSendFields []string `json:"-"`
2383
2384
2385
2386
2387 NullFields []string `json:"-"`
2388 }
2389
2390 func (s *DirectoryChromeosdevicesCommand) MarshalJSON() ([]byte, error) {
2391 type NoMethod DirectoryChromeosdevicesCommand
2392 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2393 }
2394
2395
2396 type DirectoryChromeosdevicesCommandResult struct {
2397
2398
2399
2400
2401 CommandResultPayload string `json:"commandResultPayload,omitempty"`
2402
2403
2404 ErrorMessage string `json:"errorMessage,omitempty"`
2405
2406
2407 ExecuteTime string `json:"executeTime,omitempty"`
2408
2409
2410
2411
2412
2413
2414
2415 Result string `json:"result,omitempty"`
2416
2417
2418
2419
2420
2421 ForceSendFields []string `json:"-"`
2422
2423
2424
2425
2426 NullFields []string `json:"-"`
2427 }
2428
2429 func (s *DirectoryChromeosdevicesCommandResult) MarshalJSON() ([]byte, error) {
2430 type NoMethod DirectoryChromeosdevicesCommandResult
2431 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2432 }
2433
2434
2435
2436 type DirectoryChromeosdevicesIssueCommandRequest struct {
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467 CommandType string `json:"commandType,omitempty"`
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492 Payload string `json:"payload,omitempty"`
2493
2494
2495
2496
2497
2498 ForceSendFields []string `json:"-"`
2499
2500
2501
2502
2503 NullFields []string `json:"-"`
2504 }
2505
2506 func (s *DirectoryChromeosdevicesIssueCommandRequest) MarshalJSON() ([]byte, error) {
2507 type NoMethod DirectoryChromeosdevicesIssueCommandRequest
2508 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2509 }
2510
2511
2512
2513 type DirectoryChromeosdevicesIssueCommandResponse struct {
2514
2515
2516 CommandId int64 `json:"commandId,omitempty,string"`
2517
2518
2519 googleapi.ServerResponse `json:"-"`
2520
2521
2522
2523
2524
2525 ForceSendFields []string `json:"-"`
2526
2527
2528
2529
2530 NullFields []string `json:"-"`
2531 }
2532
2533 func (s *DirectoryChromeosdevicesIssueCommandResponse) MarshalJSON() ([]byte, error) {
2534 type NoMethod DirectoryChromeosdevicesIssueCommandResponse
2535 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2536 }
2537
2538 type DomainAlias struct {
2539
2540 CreationTime int64 `json:"creationTime,omitempty,string"`
2541
2542 DomainAliasName string `json:"domainAliasName,omitempty"`
2543
2544 Etag string `json:"etag,omitempty"`
2545
2546 Kind string `json:"kind,omitempty"`
2547
2548
2549
2550 ParentDomainName string `json:"parentDomainName,omitempty"`
2551
2552 Verified bool `json:"verified,omitempty"`
2553
2554
2555 googleapi.ServerResponse `json:"-"`
2556
2557
2558
2559
2560
2561 ForceSendFields []string `json:"-"`
2562
2563
2564
2565
2566 NullFields []string `json:"-"`
2567 }
2568
2569 func (s *DomainAlias) MarshalJSON() ([]byte, error) {
2570 type NoMethod DomainAlias
2571 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2572 }
2573
2574 type DomainAliases struct {
2575
2576 DomainAliases []*DomainAlias `json:"domainAliases,omitempty"`
2577
2578 Etag string `json:"etag,omitempty"`
2579
2580 Kind string `json:"kind,omitempty"`
2581
2582
2583 googleapi.ServerResponse `json:"-"`
2584
2585
2586
2587
2588
2589 ForceSendFields []string `json:"-"`
2590
2591
2592
2593
2594 NullFields []string `json:"-"`
2595 }
2596
2597 func (s *DomainAliases) MarshalJSON() ([]byte, error) {
2598 type NoMethod DomainAliases
2599 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2600 }
2601
2602 type Domains struct {
2603
2604
2605 CreationTime int64 `json:"creationTime,omitempty,string"`
2606
2607 DomainAliases []*DomainAlias `json:"domainAliases,omitempty"`
2608
2609 DomainName string `json:"domainName,omitempty"`
2610
2611 Etag string `json:"etag,omitempty"`
2612
2613 IsPrimary bool `json:"isPrimary,omitempty"`
2614
2615 Kind string `json:"kind,omitempty"`
2616
2617 Verified bool `json:"verified,omitempty"`
2618
2619
2620 googleapi.ServerResponse `json:"-"`
2621
2622
2623
2624
2625
2626 ForceSendFields []string `json:"-"`
2627
2628
2629
2630
2631 NullFields []string `json:"-"`
2632 }
2633
2634 func (s *Domains) MarshalJSON() ([]byte, error) {
2635 type NoMethod Domains
2636 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2637 }
2638
2639 type Domains2 struct {
2640
2641 Domains []*Domains `json:"domains,omitempty"`
2642
2643 Etag string `json:"etag,omitempty"`
2644
2645 Kind string `json:"kind,omitempty"`
2646
2647
2648 googleapi.ServerResponse `json:"-"`
2649
2650
2651
2652
2653
2654 ForceSendFields []string `json:"-"`
2655
2656
2657
2658
2659 NullFields []string `json:"-"`
2660 }
2661
2662 func (s *Domains2) MarshalJSON() ([]byte, error) {
2663 type NoMethod Domains2
2664 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2665 }
2666
2667
2668
2669
2670
2671 type Empty struct {
2672
2673 googleapi.ServerResponse `json:"-"`
2674 }
2675
2676
2677 type FailureInfo struct {
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
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
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759 ErrorCode string `json:"errorCode,omitempty"`
2760
2761 ErrorMessage string `json:"errorMessage,omitempty"`
2762
2763 Printer *Printer `json:"printer,omitempty"`
2764
2765 PrinterId string `json:"printerId,omitempty"`
2766
2767
2768
2769
2770
2771 ForceSendFields []string `json:"-"`
2772
2773
2774
2775
2776 NullFields []string `json:"-"`
2777 }
2778
2779 func (s *FailureInfo) MarshalJSON() ([]byte, error) {
2780 type NoMethod FailureInfo
2781 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2782 }
2783
2784
2785 type FanInfo struct {
2786
2787 SpeedRpm int64 `json:"speedRpm,omitempty"`
2788
2789
2790
2791
2792
2793 ForceSendFields []string `json:"-"`
2794
2795
2796
2797
2798 NullFields []string `json:"-"`
2799 }
2800
2801 func (s *FanInfo) MarshalJSON() ([]byte, error) {
2802 type NoMethod FanInfo
2803 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2804 }
2805
2806
2807 type Feature struct {
2808
2809 Etags string `json:"etags,omitempty"`
2810
2811 Kind string `json:"kind,omitempty"`
2812
2813 Name string `json:"name,omitempty"`
2814
2815
2816 googleapi.ServerResponse `json:"-"`
2817
2818
2819
2820
2821
2822 ForceSendFields []string `json:"-"`
2823
2824
2825
2826
2827 NullFields []string `json:"-"`
2828 }
2829
2830 func (s *Feature) MarshalJSON() ([]byte, error) {
2831 type NoMethod Feature
2832 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2833 }
2834
2835
2836 type FeatureInstance struct {
2837
2838
2839 Feature *Feature `json:"feature,omitempty"`
2840
2841
2842
2843
2844
2845 ForceSendFields []string `json:"-"`
2846
2847
2848
2849
2850 NullFields []string `json:"-"`
2851 }
2852
2853 func (s *FeatureInstance) MarshalJSON() ([]byte, error) {
2854 type NoMethod FeatureInstance
2855 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2856 }
2857
2858 type FeatureRename struct {
2859
2860 NewName string `json:"newName,omitempty"`
2861
2862
2863
2864
2865
2866 ForceSendFields []string `json:"-"`
2867
2868
2869
2870
2871 NullFields []string `json:"-"`
2872 }
2873
2874 func (s *FeatureRename) MarshalJSON() ([]byte, error) {
2875 type NoMethod FeatureRename
2876 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2877 }
2878
2879
2880 type Features struct {
2881
2882 Etag string `json:"etag,omitempty"`
2883
2884 Features []*Feature `json:"features,omitempty"`
2885
2886 Kind string `json:"kind,omitempty"`
2887
2888
2889
2890 NextPageToken string `json:"nextPageToken,omitempty"`
2891
2892
2893 googleapi.ServerResponse `json:"-"`
2894
2895
2896
2897
2898
2899 ForceSendFields []string `json:"-"`
2900
2901
2902
2903
2904 NullFields []string `json:"-"`
2905 }
2906
2907 func (s *Features) MarshalJSON() ([]byte, error) {
2908 type NoMethod Features
2909 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2910 }
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923 type Group struct {
2924
2925
2926 AdminCreated bool `json:"adminCreated,omitempty"`
2927
2928
2929
2930 Aliases []string `json:"aliases,omitempty"`
2931
2932
2933
2934
2935 Description string `json:"description,omitempty"`
2936
2937
2938
2939
2940 DirectMembersCount int64 `json:"directMembersCount,omitempty,string"`
2941
2942
2943
2944
2945
2946 Email string `json:"email,omitempty"`
2947
2948 Etag string `json:"etag,omitempty"`
2949
2950
2951 Id string `json:"id,omitempty"`
2952
2953
2954 Kind string `json:"kind,omitempty"`
2955
2956 Name string `json:"name,omitempty"`
2957
2958
2959
2960
2961
2962 NonEditableAliases []string `json:"nonEditableAliases,omitempty"`
2963
2964
2965 googleapi.ServerResponse `json:"-"`
2966
2967
2968
2969
2970
2971 ForceSendFields []string `json:"-"`
2972
2973
2974
2975
2976 NullFields []string `json:"-"`
2977 }
2978
2979 func (s *Group) MarshalJSON() ([]byte, error) {
2980 type NoMethod Group
2981 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2982 }
2983
2984
2985
2986 type GroupAlias struct {
2987
2988 Alias string `json:"alias,omitempty"`
2989
2990 Etag string `json:"etag,omitempty"`
2991
2992 Id string `json:"id,omitempty"`
2993
2994
2995 Kind string `json:"kind,omitempty"`
2996
2997 PrimaryEmail string `json:"primaryEmail,omitempty"`
2998
2999
3000
3001
3002
3003 ForceSendFields []string `json:"-"`
3004
3005
3006
3007
3008 NullFields []string `json:"-"`
3009 }
3010
3011 func (s *GroupAlias) MarshalJSON() ([]byte, error) {
3012 type NoMethod GroupAlias
3013 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3014 }
3015
3016 type Groups struct {
3017
3018 Etag string `json:"etag,omitempty"`
3019
3020 Groups []*Group `json:"groups,omitempty"`
3021
3022 Kind string `json:"kind,omitempty"`
3023
3024 NextPageToken string `json:"nextPageToken,omitempty"`
3025
3026
3027 googleapi.ServerResponse `json:"-"`
3028
3029
3030
3031
3032
3033 ForceSendFields []string `json:"-"`
3034
3035
3036
3037
3038 NullFields []string `json:"-"`
3039 }
3040
3041 func (s *Groups) MarshalJSON() ([]byte, error) {
3042 type NoMethod Groups
3043 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3044 }
3045
3046 type ListPrintServersResponse struct {
3047
3048
3049
3050 NextPageToken string `json:"nextPageToken,omitempty"`
3051
3052 PrintServers []*PrintServer `json:"printServers,omitempty"`
3053
3054
3055 googleapi.ServerResponse `json:"-"`
3056
3057
3058
3059
3060
3061 ForceSendFields []string `json:"-"`
3062
3063
3064
3065
3066 NullFields []string `json:"-"`
3067 }
3068
3069 func (s *ListPrintServersResponse) MarshalJSON() ([]byte, error) {
3070 type NoMethod ListPrintServersResponse
3071 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3072 }
3073
3074
3075 type ListPrinterModelsResponse struct {
3076
3077
3078 NextPageToken string `json:"nextPageToken,omitempty"`
3079
3080
3081 PrinterModels []*PrinterModel `json:"printerModels,omitempty"`
3082
3083
3084 googleapi.ServerResponse `json:"-"`
3085
3086
3087
3088
3089
3090 ForceSendFields []string `json:"-"`
3091
3092
3093
3094
3095 NullFields []string `json:"-"`
3096 }
3097
3098 func (s *ListPrinterModelsResponse) MarshalJSON() ([]byte, error) {
3099 type NoMethod ListPrinterModelsResponse
3100 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3101 }
3102
3103
3104 type ListPrintersResponse struct {
3105
3106
3107 NextPageToken string `json:"nextPageToken,omitempty"`
3108
3109
3110
3111 Printers []*Printer `json:"printers,omitempty"`
3112
3113
3114 googleapi.ServerResponse `json:"-"`
3115
3116
3117
3118
3119
3120 ForceSendFields []string `json:"-"`
3121
3122
3123
3124
3125 NullFields []string `json:"-"`
3126 }
3127
3128 func (s *ListPrintersResponse) MarshalJSON() ([]byte, error) {
3129 type NoMethod ListPrintersResponse
3130 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3131 }
3132
3133
3134
3135
3136
3137 type Member struct {
3138
3139
3140 DeliverySettings string `json:"delivery_settings,omitempty"`
3141
3142
3143
3144
3145 Email string `json:"email,omitempty"`
3146
3147 Etag string `json:"etag,omitempty"`
3148
3149
3150 Id string `json:"id,omitempty"`
3151
3152
3153 Kind string `json:"kind,omitempty"`
3154
3155
3156
3157
3158
3159 Role string `json:"role,omitempty"`
3160
3161 Status string `json:"status,omitempty"`
3162
3163 Type string `json:"type,omitempty"`
3164
3165
3166 googleapi.ServerResponse `json:"-"`
3167
3168
3169
3170
3171
3172 ForceSendFields []string `json:"-"`
3173
3174
3175
3176
3177 NullFields []string `json:"-"`
3178 }
3179
3180 func (s *Member) MarshalJSON() ([]byte, error) {
3181 type NoMethod Member
3182 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3183 }
3184
3185 type Members struct {
3186
3187 Etag string `json:"etag,omitempty"`
3188
3189 Kind string `json:"kind,omitempty"`
3190
3191 Members []*Member `json:"members,omitempty"`
3192
3193 NextPageToken string `json:"nextPageToken,omitempty"`
3194
3195
3196 googleapi.ServerResponse `json:"-"`
3197
3198
3199
3200
3201
3202 ForceSendFields []string `json:"-"`
3203
3204
3205
3206
3207 NullFields []string `json:"-"`
3208 }
3209
3210 func (s *Members) MarshalJSON() ([]byte, error) {
3211 type NoMethod Members
3212 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3213 }
3214
3215
3216 type MembersHasMember struct {
3217
3218
3219 IsMember bool `json:"isMember,omitempty"`
3220
3221
3222 googleapi.ServerResponse `json:"-"`
3223
3224
3225
3226
3227
3228 ForceSendFields []string `json:"-"`
3229
3230
3231
3232
3233 NullFields []string `json:"-"`
3234 }
3235
3236 func (s *MembersHasMember) MarshalJSON() ([]byte, error) {
3237 type NoMethod MembersHasMember
3238 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3239 }
3240
3241
3242
3243
3244
3245 type MobileDevice struct {
3246
3247 AdbStatus bool `json:"adbStatus,omitempty"`
3248
3249
3250
3251
3252
3253
3254
3255 Applications []*MobileDeviceApplications `json:"applications,omitempty"`
3256
3257 BasebandVersion string `json:"basebandVersion,omitempty"`
3258
3259 BootloaderVersion string `json:"bootloaderVersion,omitempty"`
3260
3261 Brand string `json:"brand,omitempty"`
3262
3263 BuildNumber string `json:"buildNumber,omitempty"`
3264
3265 DefaultLanguage string `json:"defaultLanguage,omitempty"`
3266
3267
3268 DeveloperOptionsStatus bool `json:"developerOptionsStatus,omitempty"`
3269
3270 DeviceCompromisedStatus string `json:"deviceCompromisedStatus,omitempty"`
3271
3272
3273 DeviceId string `json:"deviceId,omitempty"`
3274
3275 DevicePasswordStatus string `json:"devicePasswordStatus,omitempty"`
3276
3277
3278
3279
3280
3281 Email []string `json:"email,omitempty"`
3282
3283 EncryptionStatus string `json:"encryptionStatus,omitempty"`
3284
3285 Etag string `json:"etag,omitempty"`
3286
3287
3288 FirstSync string `json:"firstSync,omitempty"`
3289
3290 Hardware string `json:"hardware,omitempty"`
3291
3292
3293
3294
3295 HardwareId string `json:"hardwareId,omitempty"`
3296
3297 Imei string `json:"imei,omitempty"`
3298
3299 KernelVersion string `json:"kernelVersion,omitempty"`
3300
3301
3302 Kind string `json:"kind,omitempty"`
3303
3304
3305 LastSync string `json:"lastSync,omitempty"`
3306
3307
3308 ManagedAccountIsOnOwnerProfile bool `json:"managedAccountIsOnOwnerProfile,omitempty"`
3309
3310 Manufacturer string `json:"manufacturer,omitempty"`
3311
3312 Meid string `json:"meid,omitempty"`
3313
3314
3315
3316
3317
3318 Model string `json:"model,omitempty"`
3319
3320
3321
3322
3323
3324 Name []string `json:"name,omitempty"`
3325
3326
3327 NetworkOperator string `json:"networkOperator,omitempty"`
3328
3329
3330
3331
3332
3333 Os string `json:"os,omitempty"`
3334
3335 OtherAccountsInfo []string `json:"otherAccountsInfo,omitempty"`
3336
3337 Privilege string `json:"privilege,omitempty"`
3338
3339 ReleaseVersion string `json:"releaseVersion,omitempty"`
3340
3341
3342 ResourceId string `json:"resourceId,omitempty"`
3343
3344 SecurityPatchLevel int64 `json:"securityPatchLevel,omitempty,string"`
3345
3346 SerialNumber string `json:"serialNumber,omitempty"`
3347
3348 Status string `json:"status,omitempty"`
3349
3350 SupportsWorkProfile bool `json:"supportsWorkProfile,omitempty"`
3351
3352 Type string `json:"type,omitempty"`
3353
3354
3355 UnknownSourcesStatus bool `json:"unknownSourcesStatus,omitempty"`
3356
3357
3358
3359
3360
3361 UserAgent string `json:"userAgent,omitempty"`
3362
3363 WifiMacAddress string `json:"wifiMacAddress,omitempty"`
3364
3365
3366 googleapi.ServerResponse `json:"-"`
3367
3368
3369
3370
3371
3372 ForceSendFields []string `json:"-"`
3373
3374
3375
3376
3377 NullFields []string `json:"-"`
3378 }
3379
3380 func (s *MobileDevice) MarshalJSON() ([]byte, error) {
3381 type NoMethod MobileDevice
3382 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3383 }
3384
3385 type MobileDeviceApplications struct {
3386
3387 DisplayName string `json:"displayName,omitempty"`
3388
3389
3390 PackageName string `json:"packageName,omitempty"`
3391
3392
3393
3394
3395
3396
3397 Permission []string `json:"permission,omitempty"`
3398
3399 VersionCode int64 `json:"versionCode,omitempty"`
3400
3401 VersionName string `json:"versionName,omitempty"`
3402
3403
3404
3405
3406
3407 ForceSendFields []string `json:"-"`
3408
3409
3410
3411
3412 NullFields []string `json:"-"`
3413 }
3414
3415 func (s *MobileDeviceApplications) MarshalJSON() ([]byte, error) {
3416 type NoMethod MobileDeviceApplications
3417 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3418 }
3419
3420 type MobileDeviceAction struct {
3421
3422 Action string `json:"action,omitempty"`
3423
3424
3425
3426
3427
3428 ForceSendFields []string `json:"-"`
3429
3430
3431
3432
3433 NullFields []string `json:"-"`
3434 }
3435
3436 func (s *MobileDeviceAction) MarshalJSON() ([]byte, error) {
3437 type NoMethod MobileDeviceAction
3438 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3439 }
3440
3441 type MobileDevices struct {
3442
3443 Etag string `json:"etag,omitempty"`
3444
3445 Kind string `json:"kind,omitempty"`
3446
3447 Mobiledevices []*MobileDevice `json:"mobiledevices,omitempty"`
3448
3449 NextPageToken string `json:"nextPageToken,omitempty"`
3450
3451
3452 googleapi.ServerResponse `json:"-"`
3453
3454
3455
3456
3457
3458 ForceSendFields []string `json:"-"`
3459
3460
3461
3462
3463 NullFields []string `json:"-"`
3464 }
3465
3466 func (s *MobileDevices) MarshalJSON() ([]byte, error) {
3467 type NoMethod MobileDevices
3468 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3469 }
3470
3471
3472
3473
3474
3475
3476 type OrgUnit struct {
3477
3478
3479
3480
3481
3482
3483
3484
3485 BlockInheritance bool `json:"blockInheritance,omitempty"`
3486
3487 Description string `json:"description,omitempty"`
3488
3489 Etag string `json:"etag,omitempty"`
3490
3491
3492 Kind string `json:"kind,omitempty"`
3493
3494
3495
3496 Name string `json:"name,omitempty"`
3497
3498 OrgUnitId string `json:"orgUnitId,omitempty"`
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511 OrgUnitPath string `json:"orgUnitPath,omitempty"`
3512
3513
3514 ParentOrgUnitId string `json:"parentOrgUnitId,omitempty"`
3515
3516
3517
3518 ParentOrgUnitPath string `json:"parentOrgUnitPath,omitempty"`
3519
3520
3521 googleapi.ServerResponse `json:"-"`
3522
3523
3524
3525
3526
3527 ForceSendFields []string `json:"-"`
3528
3529
3530
3531
3532 NullFields []string `json:"-"`
3533 }
3534
3535 func (s *OrgUnit) MarshalJSON() ([]byte, error) {
3536 type NoMethod OrgUnit
3537 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3538 }
3539
3540 type OrgUnits struct {
3541
3542 Etag string `json:"etag,omitempty"`
3543
3544
3545 Kind string `json:"kind,omitempty"`
3546
3547 OrganizationUnits []*OrgUnit `json:"organizationUnits,omitempty"`
3548
3549
3550 googleapi.ServerResponse `json:"-"`
3551
3552
3553
3554
3555
3556 ForceSendFields []string `json:"-"`
3557
3558
3559
3560
3561 NullFields []string `json:"-"`
3562 }
3563
3564 func (s *OrgUnits) MarshalJSON() ([]byte, error) {
3565 type NoMethod OrgUnits
3566 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3567 }
3568
3569
3570 type OsUpdateStatus struct {
3571
3572 RebootTime string `json:"rebootTime,omitempty"`
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582 State string `json:"state,omitempty"`
3583
3584
3585 TargetKioskAppVersion string `json:"targetKioskAppVersion,omitempty"`
3586
3587
3588
3589
3590
3591 TargetOsVersion string `json:"targetOsVersion,omitempty"`
3592
3593 UpdateCheckTime string `json:"updateCheckTime,omitempty"`
3594
3595 UpdateTime string `json:"updateTime,omitempty"`
3596
3597
3598
3599
3600
3601 ForceSendFields []string `json:"-"`
3602
3603
3604
3605
3606 NullFields []string `json:"-"`
3607 }
3608
3609 func (s *OsUpdateStatus) MarshalJSON() ([]byte, error) {
3610 type NoMethod OsUpdateStatus
3611 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3612 }
3613
3614
3615 type PrintServer struct {
3616
3617 CreateTime string `json:"createTime,omitempty"`
3618
3619
3620 Description string `json:"description,omitempty"`
3621
3622
3623 DisplayName string `json:"displayName,omitempty"`
3624
3625 Id string `json:"id,omitempty"`
3626
3627
3628 Name string `json:"name,omitempty"`
3629
3630
3631
3632
3633
3634 OrgUnitId string `json:"orgUnitId,omitempty"`
3635
3636 Uri string `json:"uri,omitempty"`
3637
3638
3639 googleapi.ServerResponse `json:"-"`
3640
3641
3642
3643
3644
3645 ForceSendFields []string `json:"-"`
3646
3647
3648
3649
3650 NullFields []string `json:"-"`
3651 }
3652
3653 func (s *PrintServer) MarshalJSON() ([]byte, error) {
3654 type NoMethod PrintServer
3655 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3656 }
3657
3658
3659 type PrintServerFailureInfo struct {
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741 ErrorCode string `json:"errorCode,omitempty"`
3742
3743 ErrorMessage string `json:"errorMessage,omitempty"`
3744
3745 PrintServer *PrintServer `json:"printServer,omitempty"`
3746
3747 PrintServerId string `json:"printServerId,omitempty"`
3748
3749
3750
3751
3752
3753 ForceSendFields []string `json:"-"`
3754
3755
3756
3757
3758 NullFields []string `json:"-"`
3759 }
3760
3761 func (s *PrintServerFailureInfo) MarshalJSON() ([]byte, error) {
3762 type NoMethod PrintServerFailureInfo
3763 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3764 }
3765
3766
3767 type Printer struct {
3768
3769
3770 AuxiliaryMessages []*AuxiliaryMessage `json:"auxiliaryMessages,omitempty"`
3771
3772 CreateTime string `json:"createTime,omitempty"`
3773
3774 Description string `json:"description,omitempty"`
3775
3776 DisplayName string `json:"displayName,omitempty"`
3777
3778 Id string `json:"id,omitempty"`
3779
3780
3781 MakeAndModel string `json:"makeAndModel,omitempty"`
3782
3783
3784
3785 Name string `json:"name,omitempty"`
3786
3787
3788 OrgUnitId string `json:"orgUnitId,omitempty"`
3789
3790 Uri string `json:"uri,omitempty"`
3791
3792
3793 UseDriverlessConfig bool `json:"useDriverlessConfig,omitempty"`
3794
3795
3796 googleapi.ServerResponse `json:"-"`
3797
3798
3799
3800
3801
3802 ForceSendFields []string `json:"-"`
3803
3804
3805
3806
3807 NullFields []string `json:"-"`
3808 }
3809
3810 func (s *Printer) MarshalJSON() ([]byte, error) {
3811 type NoMethod Printer
3812 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3813 }
3814
3815
3816 type PrinterModel struct {
3817
3818 DisplayName string `json:"displayName,omitempty"`
3819
3820
3821 MakeAndModel string `json:"makeAndModel,omitempty"`
3822
3823 Manufacturer string `json:"manufacturer,omitempty"`
3824
3825
3826
3827
3828
3829 ForceSendFields []string `json:"-"`
3830
3831
3832
3833
3834 NullFields []string `json:"-"`
3835 }
3836
3837 func (s *PrinterModel) MarshalJSON() ([]byte, error) {
3838 type NoMethod PrinterModel
3839 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3840 }
3841
3842 type Privilege struct {
3843
3844
3845
3846 ChildPrivileges []*Privilege `json:"childPrivileges,omitempty"`
3847
3848 Etag string `json:"etag,omitempty"`
3849
3850 IsOuScopable bool `json:"isOuScopable,omitempty"`
3851
3852
3853 Kind string `json:"kind,omitempty"`
3854
3855 PrivilegeName string `json:"privilegeName,omitempty"`
3856
3857
3858
3859 ServiceId string `json:"serviceId,omitempty"`
3860
3861 ServiceName string `json:"serviceName,omitempty"`
3862
3863
3864
3865
3866
3867 ForceSendFields []string `json:"-"`
3868
3869
3870
3871
3872 NullFields []string `json:"-"`
3873 }
3874
3875 func (s *Privilege) MarshalJSON() ([]byte, error) {
3876 type NoMethod Privilege
3877 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3878 }
3879
3880 type Privileges struct {
3881
3882 Etag string `json:"etag,omitempty"`
3883
3884 Items []*Privilege `json:"items,omitempty"`
3885
3886
3887 Kind string `json:"kind,omitempty"`
3888
3889
3890 googleapi.ServerResponse `json:"-"`
3891
3892
3893
3894
3895
3896 ForceSendFields []string `json:"-"`
3897
3898
3899
3900
3901 NullFields []string `json:"-"`
3902 }
3903
3904 func (s *Privileges) MarshalJSON() ([]byte, error) {
3905 type NoMethod Privileges
3906 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3907 }
3908
3909 type Role struct {
3910
3911 Etag string `json:"etag,omitempty"`
3912
3913 IsSuperAdminRole bool `json:"isSuperAdminRole,omitempty"`
3914
3915 IsSystemRole bool `json:"isSystemRole,omitempty"`
3916
3917 Kind string `json:"kind,omitempty"`
3918
3919 RoleDescription string `json:"roleDescription,omitempty"`
3920
3921 RoleId int64 `json:"roleId,omitempty,string"`
3922
3923 RoleName string `json:"roleName,omitempty"`
3924
3925 RolePrivileges []*RoleRolePrivileges `json:"rolePrivileges,omitempty"`
3926
3927
3928 googleapi.ServerResponse `json:"-"`
3929
3930
3931
3932
3933
3934 ForceSendFields []string `json:"-"`
3935
3936
3937
3938
3939 NullFields []string `json:"-"`
3940 }
3941
3942 func (s *Role) MarshalJSON() ([]byte, error) {
3943 type NoMethod Role
3944 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3945 }
3946
3947 type RoleRolePrivileges struct {
3948
3949 PrivilegeName string `json:"privilegeName,omitempty"`
3950
3951
3952
3953 ServiceId string `json:"serviceId,omitempty"`
3954
3955
3956
3957
3958
3959 ForceSendFields []string `json:"-"`
3960
3961
3962
3963
3964 NullFields []string `json:"-"`
3965 }
3966
3967 func (s *RoleRolePrivileges) MarshalJSON() ([]byte, error) {
3968 type NoMethod RoleRolePrivileges
3969 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3970 }
3971
3972
3973 type RoleAssignment struct {
3974
3975
3976
3977
3978 AssignedTo string `json:"assignedTo,omitempty"`
3979
3980
3981
3982
3983
3984 AssigneeType string `json:"assigneeType,omitempty"`
3985
3986 Etag string `json:"etag,omitempty"`
3987
3988
3989 Kind string `json:"kind,omitempty"`
3990
3991
3992 OrgUnitId string `json:"orgUnitId,omitempty"`
3993
3994 RoleAssignmentId int64 `json:"roleAssignmentId,omitempty,string"`
3995
3996 RoleId int64 `json:"roleId,omitempty,string"`
3997
3998 ScopeType string `json:"scopeType,omitempty"`
3999
4000
4001 googleapi.ServerResponse `json:"-"`
4002
4003
4004
4005
4006
4007 ForceSendFields []string `json:"-"`
4008
4009
4010
4011
4012 NullFields []string `json:"-"`
4013 }
4014
4015 func (s *RoleAssignment) MarshalJSON() ([]byte, error) {
4016 type NoMethod RoleAssignment
4017 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4018 }
4019
4020 type RoleAssignments struct {
4021
4022 Etag string `json:"etag,omitempty"`
4023
4024 Items []*RoleAssignment `json:"items,omitempty"`
4025
4026
4027 Kind string `json:"kind,omitempty"`
4028 NextPageToken string `json:"nextPageToken,omitempty"`
4029
4030
4031 googleapi.ServerResponse `json:"-"`
4032
4033
4034
4035
4036
4037 ForceSendFields []string `json:"-"`
4038
4039
4040
4041
4042 NullFields []string `json:"-"`
4043 }
4044
4045 func (s *RoleAssignments) MarshalJSON() ([]byte, error) {
4046 type NoMethod RoleAssignments
4047 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4048 }
4049
4050 type Roles struct {
4051
4052 Etag string `json:"etag,omitempty"`
4053
4054 Items []*Role `json:"items,omitempty"`
4055
4056 Kind string `json:"kind,omitempty"`
4057 NextPageToken string `json:"nextPageToken,omitempty"`
4058
4059
4060 googleapi.ServerResponse `json:"-"`
4061
4062
4063
4064
4065
4066 ForceSendFields []string `json:"-"`
4067
4068
4069
4070
4071 NullFields []string `json:"-"`
4072 }
4073
4074 func (s *Roles) MarshalJSON() ([]byte, error) {
4075 type NoMethod Roles
4076 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4077 }
4078
4079
4080
4081 type Schema struct {
4082
4083 DisplayName string `json:"displayName,omitempty"`
4084
4085 Etag string `json:"etag,omitempty"`
4086
4087 Fields []*SchemaFieldSpec `json:"fields,omitempty"`
4088
4089 Kind string `json:"kind,omitempty"`
4090
4091 SchemaId string `json:"schemaId,omitempty"`
4092
4093
4094 SchemaName string `json:"schemaName,omitempty"`
4095
4096
4097 googleapi.ServerResponse `json:"-"`
4098
4099
4100
4101
4102
4103 ForceSendFields []string `json:"-"`
4104
4105
4106
4107
4108 NullFields []string `json:"-"`
4109 }
4110
4111 func (s *Schema) MarshalJSON() ([]byte, error) {
4112 type NoMethod Schema
4113 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4114 }
4115
4116
4117
4118
4119
4120
4121 type SchemaFieldSpec struct {
4122
4123 DisplayName string `json:"displayName,omitempty"`
4124
4125 Etag string `json:"etag,omitempty"`
4126
4127 FieldId string `json:"fieldId,omitempty"`
4128
4129 FieldName string `json:"fieldName,omitempty"`
4130
4131 FieldType string `json:"fieldType,omitempty"`
4132
4133
4134
4135
4136 Indexed *bool `json:"indexed,omitempty"`
4137
4138
4139 Kind string `json:"kind,omitempty"`
4140
4141
4142 MultiValued bool `json:"multiValued,omitempty"`
4143
4144
4145
4146 NumericIndexingSpec *SchemaFieldSpecNumericIndexingSpec `json:"numericIndexingSpec,omitempty"`
4147
4148
4149
4150
4151
4152 ReadAccessType string `json:"readAccessType,omitempty"`
4153
4154
4155
4156
4157
4158 ForceSendFields []string `json:"-"`
4159
4160
4161
4162
4163 NullFields []string `json:"-"`
4164 }
4165
4166 func (s *SchemaFieldSpec) MarshalJSON() ([]byte, error) {
4167 type NoMethod SchemaFieldSpec
4168 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4169 }
4170
4171
4172
4173
4174 type SchemaFieldSpecNumericIndexingSpec struct {
4175
4176
4177
4178 MaxValue float64 `json:"maxValue,omitempty"`
4179
4180
4181
4182 MinValue float64 `json:"minValue,omitempty"`
4183
4184
4185
4186
4187
4188 ForceSendFields []string `json:"-"`
4189
4190
4191
4192
4193 NullFields []string `json:"-"`
4194 }
4195
4196 func (s *SchemaFieldSpecNumericIndexingSpec) MarshalJSON() ([]byte, error) {
4197 type NoMethod SchemaFieldSpecNumericIndexingSpec
4198 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4199 }
4200
4201 func (s *SchemaFieldSpecNumericIndexingSpec) UnmarshalJSON(data []byte) error {
4202 type NoMethod SchemaFieldSpecNumericIndexingSpec
4203 var s1 struct {
4204 MaxValue gensupport.JSONFloat64 `json:"maxValue"`
4205 MinValue gensupport.JSONFloat64 `json:"minValue"`
4206 *NoMethod
4207 }
4208 s1.NoMethod = (*NoMethod)(s)
4209 if err := json.Unmarshal(data, &s1); err != nil {
4210 return err
4211 }
4212 s.MaxValue = float64(s1.MaxValue)
4213 s.MinValue = float64(s1.MinValue)
4214 return nil
4215 }
4216
4217
4218 type Schemas struct {
4219
4220 Etag string `json:"etag,omitempty"`
4221
4222 Kind string `json:"kind,omitempty"`
4223
4224 Schemas []*Schema `json:"schemas,omitempty"`
4225
4226
4227 googleapi.ServerResponse `json:"-"`
4228
4229
4230
4231
4232
4233 ForceSendFields []string `json:"-"`
4234
4235
4236
4237
4238 NullFields []string `json:"-"`
4239 }
4240
4241 func (s *Schemas) MarshalJSON() ([]byte, error) {
4242 type NoMethod Schemas
4243 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4244 }
4245
4246
4247
4248
4249
4250
4251
4252 type Status struct {
4253
4254 Code int64 `json:"code,omitempty"`
4255
4256
4257 Details []googleapi.RawMessage `json:"details,omitempty"`
4258
4259
4260
4261 Message string `json:"message,omitempty"`
4262
4263
4264
4265
4266
4267 ForceSendFields []string `json:"-"`
4268
4269
4270
4271
4272 NullFields []string `json:"-"`
4273 }
4274
4275 func (s *Status) MarshalJSON() ([]byte, error) {
4276 type NoMethod Status
4277 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4278 }
4279
4280
4281 type Token struct {
4282
4283
4284 Anonymous bool `json:"anonymous,omitempty"`
4285
4286 ClientId string `json:"clientId,omitempty"`
4287
4288 DisplayText string `json:"displayText,omitempty"`
4289
4290 Etag string `json:"etag,omitempty"`
4291
4292 Kind string `json:"kind,omitempty"`
4293
4294
4295
4296 NativeApp bool `json:"nativeApp,omitempty"`
4297
4298 Scopes []string `json:"scopes,omitempty"`
4299
4300 UserKey string `json:"userKey,omitempty"`
4301
4302
4303 googleapi.ServerResponse `json:"-"`
4304
4305
4306
4307
4308
4309 ForceSendFields []string `json:"-"`
4310
4311
4312
4313
4314 NullFields []string `json:"-"`
4315 }
4316
4317 func (s *Token) MarshalJSON() ([]byte, error) {
4318 type NoMethod Token
4319 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4320 }
4321
4322
4323 type Tokens struct {
4324
4325 Etag string `json:"etag,omitempty"`
4326
4327 Items []*Token `json:"items,omitempty"`
4328
4329
4330 Kind string `json:"kind,omitempty"`
4331
4332
4333 googleapi.ServerResponse `json:"-"`
4334
4335
4336
4337
4338
4339 ForceSendFields []string `json:"-"`
4340
4341
4342
4343
4344 NullFields []string `json:"-"`
4345 }
4346
4347 func (s *Tokens) MarshalJSON() ([]byte, error) {
4348 type NoMethod Tokens
4349 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4350 }
4351
4352
4353
4354
4355
4356
4357 type User struct {
4358
4359
4360 Addresses interface{} `json:"addresses,omitempty"`
4361
4362
4363 AgreedToTerms bool `json:"agreedToTerms,omitempty"`
4364
4365 Aliases []string `json:"aliases,omitempty"`
4366
4367 Archived bool `json:"archived,omitempty"`
4368
4369
4370
4371
4372 ChangePasswordAtNextLogin bool `json:"changePasswordAtNextLogin,omitempty"`
4373
4374 CreationTime string `json:"creationTime,omitempty"`
4375
4376
4377 CustomSchemas map[string]googleapi.RawMessage `json:"customSchemas,omitempty"`
4378
4379
4380
4381
4382
4383
4384
4385 CustomerId string `json:"customerId,omitempty"`
4386 DeletionTime string `json:"deletionTime,omitempty"`
4387
4388
4389
4390 Emails interface{} `json:"emails,omitempty"`
4391
4392 Etag string `json:"etag,omitempty"`
4393
4394
4395 ExternalIds interface{} `json:"externalIds,omitempty"`
4396
4397
4398 Gender interface{} `json:"gender,omitempty"`
4399
4400
4401
4402
4403
4404
4405
4406
4407 HashFunction string `json:"hashFunction,omitempty"`
4408
4409
4410 Id string `json:"id,omitempty"`
4411
4412
4413
4414
4415 Ims interface{} `json:"ims,omitempty"`
4416
4417
4418
4419
4420
4421 IncludeInGlobalAddressList bool `json:"includeInGlobalAddressList,omitempty"`
4422
4423
4424
4425 IpWhitelisted bool `json:"ipWhitelisted,omitempty"`
4426
4427
4428
4429
4430
4431
4432
4433
4434 IsAdmin bool `json:"isAdmin,omitempty"`
4435
4436
4437
4438
4439
4440
4441 IsDelegatedAdmin bool `json:"isDelegatedAdmin,omitempty"`
4442
4443 IsEnforcedIn2Sv bool `json:"isEnforcedIn2Sv,omitempty"`
4444
4445 IsEnrolledIn2Sv bool `json:"isEnrolledIn2Sv,omitempty"`
4446
4447
4448
4449 IsMailboxSetup bool `json:"isMailboxSetup,omitempty"`
4450
4451
4452 Keywords interface{} `json:"keywords,omitempty"`
4453
4454
4455 Kind string `json:"kind,omitempty"`
4456
4457
4458 Languages interface{} `json:"languages,omitempty"`
4459
4460 LastLoginTime string `json:"lastLoginTime,omitempty"`
4461
4462
4463 Locations interface{} `json:"locations,omitempty"`
4464
4465
4466
4467
4468
4469
4470
4471
4472 Name *UserName `json:"name,omitempty"`
4473
4474
4475
4476 NonEditableAliases []string `json:"nonEditableAliases,omitempty"`
4477
4478 Notes interface{} `json:"notes,omitempty"`
4479
4480
4481
4482 OrgUnitPath string `json:"orgUnitPath,omitempty"`
4483
4484
4485 Organizations interface{} `json:"organizations,omitempty"`
4486
4487 Password string `json:"password,omitempty"`
4488
4489
4490 Phones interface{} `json:"phones,omitempty"`
4491
4492
4493
4494 PosixAccounts interface{} `json:"posixAccounts,omitempty"`
4495
4496
4497
4498 PrimaryEmail string `json:"primaryEmail,omitempty"`
4499
4500 RecoveryEmail string `json:"recoveryEmail,omitempty"`
4501
4502
4503 RecoveryPhone string `json:"recoveryPhone,omitempty"`
4504
4505
4506 Relations interface{} `json:"relations,omitempty"`
4507
4508 SshPublicKeys interface{} `json:"sshPublicKeys,omitempty"`
4509
4510 Suspended bool `json:"suspended,omitempty"`
4511
4512
4513
4514 SuspensionReason string `json:"suspensionReason,omitempty"`
4515
4516 ThumbnailPhotoEtag string `json:"thumbnailPhotoEtag,omitempty"`
4517
4518
4519 ThumbnailPhotoUrl string `json:"thumbnailPhotoUrl,omitempty"`
4520
4521
4522 Websites interface{} `json:"websites,omitempty"`
4523
4524
4525 googleapi.ServerResponse `json:"-"`
4526
4527
4528
4529
4530
4531 ForceSendFields []string `json:"-"`
4532
4533
4534
4535
4536 NullFields []string `json:"-"`
4537 }
4538
4539 func (s *User) MarshalJSON() ([]byte, error) {
4540 type NoMethod User
4541 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4542 }
4543
4544
4545 type UserAbout struct {
4546
4547
4548
4549 ContentType string `json:"contentType,omitempty"`
4550
4551 Value string `json:"value,omitempty"`
4552
4553
4554
4555
4556
4557 ForceSendFields []string `json:"-"`
4558
4559
4560
4561
4562 NullFields []string `json:"-"`
4563 }
4564
4565 func (s *UserAbout) MarshalJSON() ([]byte, error) {
4566 type NoMethod UserAbout
4567 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4568 }
4569
4570
4571 type UserAddress struct {
4572
4573 Country string `json:"country,omitempty"`
4574
4575 CountryCode string `json:"countryCode,omitempty"`
4576
4577 CustomType string `json:"customType,omitempty"`
4578
4579 ExtendedAddress string `json:"extendedAddress,omitempty"`
4580
4581 Formatted string `json:"formatted,omitempty"`
4582
4583 Locality string `json:"locality,omitempty"`
4584
4585 PoBox string `json:"poBox,omitempty"`
4586
4587 PostalCode string `json:"postalCode,omitempty"`
4588
4589
4590 Primary bool `json:"primary,omitempty"`
4591
4592 Region string `json:"region,omitempty"`
4593
4594
4595
4596 SourceIsStructured bool `json:"sourceIsStructured,omitempty"`
4597
4598 StreetAddress string `json:"streetAddress,omitempty"`
4599
4600
4601
4602
4603 Type string `json:"type,omitempty"`
4604
4605
4606
4607
4608
4609 ForceSendFields []string `json:"-"`
4610
4611
4612
4613
4614 NullFields []string `json:"-"`
4615 }
4616
4617 func (s *UserAddress) MarshalJSON() ([]byte, error) {
4618 type NoMethod UserAddress
4619 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4620 }
4621
4622
4623
4624 type UserAlias struct {
4625
4626 Alias string `json:"alias,omitempty"`
4627
4628 Etag string `json:"etag,omitempty"`
4629
4630 Id string `json:"id,omitempty"`
4631
4632
4633 Kind string `json:"kind,omitempty"`
4634
4635 PrimaryEmail string `json:"primaryEmail,omitempty"`
4636
4637
4638
4639
4640
4641 ForceSendFields []string `json:"-"`
4642
4643
4644
4645
4646 NullFields []string `json:"-"`
4647 }
4648
4649 func (s *UserAlias) MarshalJSON() ([]byte, error) {
4650 type NoMethod UserAlias
4651 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4652 }
4653
4654
4655 type UserEmail struct {
4656
4657 Address string `json:"address,omitempty"`
4658
4659 CustomType string `json:"customType,omitempty"`
4660
4661
4662 Primary bool `json:"primary,omitempty"`
4663
4664
4665 PublicKeyEncryptionCertificates *UserEmailPublicKeyEncryptionCertificates `json:"public_key_encryption_certificates,omitempty"`
4666
4667
4668
4669
4670 Type string `json:"type,omitempty"`
4671
4672
4673
4674
4675
4676 ForceSendFields []string `json:"-"`
4677
4678
4679
4680
4681 NullFields []string `json:"-"`
4682 }
4683
4684 func (s *UserEmail) MarshalJSON() ([]byte, error) {
4685 type NoMethod UserEmail
4686 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4687 }
4688
4689
4690
4691 type UserEmailPublicKeyEncryptionCertificates struct {
4692
4693
4694 Certificate string `json:"certificate,omitempty"`
4695
4696
4697 IsDefault bool `json:"is_default,omitempty"`
4698
4699
4700 State string `json:"state,omitempty"`
4701
4702
4703
4704
4705
4706 ForceSendFields []string `json:"-"`
4707
4708
4709
4710
4711 NullFields []string `json:"-"`
4712 }
4713
4714 func (s *UserEmailPublicKeyEncryptionCertificates) MarshalJSON() ([]byte, error) {
4715 type NoMethod UserEmailPublicKeyEncryptionCertificates
4716 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4717 }
4718
4719
4720 type UserExternalId struct {
4721
4722 CustomType string `json:"customType,omitempty"`
4723
4724 Type string `json:"type,omitempty"`
4725
4726 Value string `json:"value,omitempty"`
4727
4728
4729
4730
4731
4732 ForceSendFields []string `json:"-"`
4733
4734
4735
4736
4737 NullFields []string `json:"-"`
4738 }
4739
4740 func (s *UserExternalId) MarshalJSON() ([]byte, error) {
4741 type NoMethod UserExternalId
4742 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4743 }
4744
4745 type UserGender struct {
4746
4747
4748
4749 AddressMeAs string `json:"addressMeAs,omitempty"`
4750
4751 CustomGender string `json:"customGender,omitempty"`
4752
4753 Type string `json:"type,omitempty"`
4754
4755
4756
4757
4758
4759 ForceSendFields []string `json:"-"`
4760
4761
4762
4763
4764 NullFields []string `json:"-"`
4765 }
4766
4767 func (s *UserGender) MarshalJSON() ([]byte, error) {
4768 type NoMethod UserGender
4769 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4770 }
4771
4772
4773 type UserIm struct {
4774
4775 CustomProtocol string `json:"customProtocol,omitempty"`
4776
4777 CustomType string `json:"customType,omitempty"`
4778
4779 Im string `json:"im,omitempty"`
4780
4781
4782 Primary bool `json:"primary,omitempty"`
4783
4784
4785
4786 Protocol string `json:"protocol,omitempty"`
4787
4788
4789
4790
4791
4792 Type string `json:"type,omitempty"`
4793
4794
4795
4796
4797
4798 ForceSendFields []string `json:"-"`
4799
4800
4801
4802
4803 NullFields []string `json:"-"`
4804 }
4805
4806 func (s *UserIm) MarshalJSON() ([]byte, error) {
4807 type NoMethod UserIm
4808 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4809 }
4810
4811
4812 type UserKeyword struct {
4813
4814 CustomType string `json:"customType,omitempty"`
4815
4816
4817
4818
4819
4820 Type string `json:"type,omitempty"`
4821
4822 Value string `json:"value,omitempty"`
4823
4824
4825
4826
4827
4828 ForceSendFields []string `json:"-"`
4829
4830
4831
4832
4833 NullFields []string `json:"-"`
4834 }
4835
4836 func (s *UserKeyword) MarshalJSON() ([]byte, error) {
4837 type NoMethod UserKeyword
4838 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4839 }
4840
4841
4842 type UserLanguage struct {
4843
4844
4845
4846 CustomLanguage string `json:"customLanguage,omitempty"`
4847
4848
4849
4850
4851
4852 LanguageCode string `json:"languageCode,omitempty"`
4853
4854
4855
4856 Preference string `json:"preference,omitempty"`
4857
4858
4859
4860
4861
4862 ForceSendFields []string `json:"-"`
4863
4864
4865
4866
4867 NullFields []string `json:"-"`
4868 }
4869
4870 func (s *UserLanguage) MarshalJSON() ([]byte, error) {
4871 type NoMethod UserLanguage
4872 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4873 }
4874
4875
4876 type UserLocation struct {
4877
4878
4879
4880 Area string `json:"area,omitempty"`
4881
4882 BuildingId string `json:"buildingId,omitempty"`
4883
4884 CustomType string `json:"customType,omitempty"`
4885
4886 DeskCode string `json:"deskCode,omitempty"`
4887
4888 FloorName string `json:"floorName,omitempty"`
4889
4890
4891
4892 FloorSection string `json:"floorSection,omitempty"`
4893
4894
4895
4896
4897 Type string `json:"type,omitempty"`
4898
4899
4900
4901
4902
4903 ForceSendFields []string `json:"-"`
4904
4905
4906
4907
4908 NullFields []string `json:"-"`
4909 }
4910
4911 func (s *UserLocation) MarshalJSON() ([]byte, error) {
4912 type NoMethod UserLocation
4913 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4914 }
4915
4916 type UserMakeAdmin struct {
4917
4918 Status bool `json:"status,omitempty"`
4919
4920
4921
4922
4923
4924 ForceSendFields []string `json:"-"`
4925
4926
4927
4928
4929 NullFields []string `json:"-"`
4930 }
4931
4932 func (s *UserMakeAdmin) MarshalJSON() ([]byte, error) {
4933 type NoMethod UserMakeAdmin
4934 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4935 }
4936
4937 type UserName struct {
4938
4939 DisplayName string `json:"displayName,omitempty"`
4940
4941 FamilyName string `json:"familyName,omitempty"`
4942
4943
4944 FullName string `json:"fullName,omitempty"`
4945
4946 GivenName string `json:"givenName,omitempty"`
4947
4948
4949
4950
4951
4952 ForceSendFields []string `json:"-"`
4953
4954
4955
4956
4957 NullFields []string `json:"-"`
4958 }
4959
4960 func (s *UserName) MarshalJSON() ([]byte, error) {
4961 type NoMethod UserName
4962 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4963 }
4964
4965
4966 type UserOrganization struct {
4967
4968 CostCenter string `json:"costCenter,omitempty"`
4969
4970 CustomType string `json:"customType,omitempty"`
4971
4972 Department string `json:"department,omitempty"`
4973
4974 Description string `json:"description,omitempty"`
4975
4976 Domain string `json:"domain,omitempty"`
4977
4978
4979 FullTimeEquivalent int64 `json:"fullTimeEquivalent,omitempty"`
4980
4981
4982 Location string `json:"location,omitempty"`
4983
4984 Name string `json:"name,omitempty"`
4985
4986 Primary bool `json:"primary,omitempty"`
4987
4988 Symbol string `json:"symbol,omitempty"`
4989
4990 Title string `json:"title,omitempty"`
4991
4992
4993
4994
4995
4996 Type string `json:"type,omitempty"`
4997
4998
4999
5000
5001
5002 ForceSendFields []string `json:"-"`
5003
5004
5005
5006
5007 NullFields []string `json:"-"`
5008 }
5009
5010 func (s *UserOrganization) MarshalJSON() ([]byte, error) {
5011 type NoMethod UserOrganization
5012 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5013 }
5014
5015
5016 type UserPhone struct {
5017
5018 CustomType string `json:"customType,omitempty"`
5019
5020 Primary bool `json:"primary,omitempty"`
5021
5022
5023
5024
5025
5026 Type string `json:"type,omitempty"`
5027
5028 Value string `json:"value,omitempty"`
5029
5030
5031
5032
5033
5034 ForceSendFields []string `json:"-"`
5035
5036
5037
5038
5039 NullFields []string `json:"-"`
5040 }
5041
5042 func (s *UserPhone) MarshalJSON() ([]byte, error) {
5043 type NoMethod UserPhone
5044 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5045 }
5046
5047 type UserPhoto struct {
5048
5049 Etag string `json:"etag,omitempty"`
5050
5051 Height int64 `json:"height,omitempty"`
5052
5053 Id string `json:"id,omitempty"`
5054
5055
5056 Kind string `json:"kind,omitempty"`
5057
5058
5059 MimeType string `json:"mimeType,omitempty"`
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069 PhotoData string `json:"photoData,omitempty"`
5070
5071 PrimaryEmail string `json:"primaryEmail,omitempty"`
5072
5073 Width int64 `json:"width,omitempty"`
5074
5075
5076 googleapi.ServerResponse `json:"-"`
5077
5078
5079
5080
5081
5082 ForceSendFields []string `json:"-"`
5083
5084
5085
5086
5087 NullFields []string `json:"-"`
5088 }
5089
5090 func (s *UserPhoto) MarshalJSON() ([]byte, error) {
5091 type NoMethod UserPhoto
5092 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5093 }
5094
5095
5096 type UserPosixAccount struct {
5097
5098 AccountId string `json:"accountId,omitempty"`
5099
5100 Gecos string `json:"gecos,omitempty"`
5101
5102 Gid uint64 `json:"gid,omitempty,string"`
5103
5104 HomeDirectory string `json:"homeDirectory,omitempty"`
5105
5106 OperatingSystemType string `json:"operatingSystemType,omitempty"`
5107
5108 Primary bool `json:"primary,omitempty"`
5109
5110 Shell string `json:"shell,omitempty"`
5111
5112 SystemId string `json:"systemId,omitempty"`
5113
5114 Uid uint64 `json:"uid,omitempty,string"`
5115
5116 Username string `json:"username,omitempty"`
5117
5118
5119
5120
5121
5122 ForceSendFields []string `json:"-"`
5123
5124
5125
5126
5127 NullFields []string `json:"-"`
5128 }
5129
5130 func (s *UserPosixAccount) MarshalJSON() ([]byte, error) {
5131 type NoMethod UserPosixAccount
5132 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5133 }
5134
5135
5136 type UserRelation struct {
5137
5138 CustomType string `json:"customType,omitempty"`
5139
5140
5141 Type string `json:"type,omitempty"`
5142
5143 Value string `json:"value,omitempty"`
5144
5145
5146
5147
5148
5149 ForceSendFields []string `json:"-"`
5150
5151
5152
5153
5154 NullFields []string `json:"-"`
5155 }
5156
5157 func (s *UserRelation) MarshalJSON() ([]byte, error) {
5158 type NoMethod UserRelation
5159 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5160 }
5161
5162
5163 type UserSshPublicKey struct {
5164
5165 ExpirationTimeUsec int64 `json:"expirationTimeUsec,omitempty,string"`
5166
5167 Fingerprint string `json:"fingerprint,omitempty"`
5168
5169 Key string `json:"key,omitempty"`
5170
5171
5172
5173
5174
5175 ForceSendFields []string `json:"-"`
5176
5177
5178
5179
5180 NullFields []string `json:"-"`
5181 }
5182
5183 func (s *UserSshPublicKey) MarshalJSON() ([]byte, error) {
5184 type NoMethod UserSshPublicKey
5185 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5186 }
5187
5188 type UserUndelete struct {
5189
5190 OrgUnitPath string `json:"orgUnitPath,omitempty"`
5191
5192
5193
5194
5195
5196 ForceSendFields []string `json:"-"`
5197
5198
5199
5200
5201 NullFields []string `json:"-"`
5202 }
5203
5204 func (s *UserUndelete) MarshalJSON() ([]byte, error) {
5205 type NoMethod UserUndelete
5206 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5207 }
5208
5209
5210 type UserWebsite struct {
5211
5212 CustomType string `json:"customType,omitempty"`
5213
5214 Primary bool `json:"primary,omitempty"`
5215
5216
5217
5218
5219
5220 Type string `json:"type,omitempty"`
5221
5222 Value string `json:"value,omitempty"`
5223
5224
5225
5226
5227
5228 ForceSendFields []string `json:"-"`
5229
5230
5231
5232
5233 NullFields []string `json:"-"`
5234 }
5235
5236 func (s *UserWebsite) MarshalJSON() ([]byte, error) {
5237 type NoMethod UserWebsite
5238 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5239 }
5240
5241 type Users struct {
5242
5243 Etag string `json:"etag,omitempty"`
5244
5245 Kind string `json:"kind,omitempty"`
5246
5247 NextPageToken string `json:"nextPageToken,omitempty"`
5248
5249
5250 TriggerEvent string `json:"trigger_event,omitempty"`
5251
5252 Users []*User `json:"users,omitempty"`
5253
5254
5255 googleapi.ServerResponse `json:"-"`
5256
5257
5258
5259
5260
5261 ForceSendFields []string `json:"-"`
5262
5263
5264
5265
5266 NullFields []string `json:"-"`
5267 }
5268
5269 func (s *Users) MarshalJSON() ([]byte, error) {
5270 type NoMethod Users
5271 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5272 }
5273
5274
5275
5276 type VerificationCode struct {
5277
5278 Etag string `json:"etag,omitempty"`
5279
5280
5281 Kind string `json:"kind,omitempty"`
5282
5283 UserId string `json:"userId,omitempty"`
5284
5285
5286 VerificationCode string `json:"verificationCode,omitempty"`
5287
5288
5289
5290
5291
5292 ForceSendFields []string `json:"-"`
5293
5294
5295
5296
5297 NullFields []string `json:"-"`
5298 }
5299
5300 func (s *VerificationCode) MarshalJSON() ([]byte, error) {
5301 type NoMethod VerificationCode
5302 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5303 }
5304
5305
5306
5307 type VerificationCodes struct {
5308
5309 Etag string `json:"etag,omitempty"`
5310
5311 Items []*VerificationCode `json:"items,omitempty"`
5312
5313
5314 Kind string `json:"kind,omitempty"`
5315
5316
5317 googleapi.ServerResponse `json:"-"`
5318
5319
5320
5321
5322
5323 ForceSendFields []string `json:"-"`
5324
5325
5326
5327
5328 NullFields []string `json:"-"`
5329 }
5330
5331 func (s *VerificationCodes) MarshalJSON() ([]byte, error) {
5332 type NoMethod VerificationCodes
5333 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5334 }
5335
5336 type AspsDeleteCall struct {
5337 s *Service
5338 userKey string
5339 codeId int64
5340 urlParams_ gensupport.URLParams
5341 ctx_ context.Context
5342 header_ http.Header
5343 }
5344
5345
5346
5347
5348
5349
5350 func (r *AspsService) Delete(userKey string, codeId int64) *AspsDeleteCall {
5351 c := &AspsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5352 c.userKey = userKey
5353 c.codeId = codeId
5354 return c
5355 }
5356
5357
5358
5359
5360 func (c *AspsDeleteCall) Fields(s ...googleapi.Field) *AspsDeleteCall {
5361 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5362 return c
5363 }
5364
5365
5366 func (c *AspsDeleteCall) Context(ctx context.Context) *AspsDeleteCall {
5367 c.ctx_ = ctx
5368 return c
5369 }
5370
5371
5372
5373 func (c *AspsDeleteCall) Header() http.Header {
5374 if c.header_ == nil {
5375 c.header_ = make(http.Header)
5376 }
5377 return c.header_
5378 }
5379
5380 func (c *AspsDeleteCall) doRequest(alt string) (*http.Response, error) {
5381 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5382 var body io.Reader = nil
5383 c.urlParams_.Set("alt", alt)
5384 c.urlParams_.Set("prettyPrint", "false")
5385 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/asps/{codeId}")
5386 urls += "?" + c.urlParams_.Encode()
5387 req, err := http.NewRequest("DELETE", urls, body)
5388 if err != nil {
5389 return nil, err
5390 }
5391 req.Header = reqHeaders
5392 googleapi.Expand(req.URL, map[string]string{
5393 "userKey": c.userKey,
5394 "codeId": strconv.FormatInt(c.codeId, 10),
5395 })
5396 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5397 }
5398
5399
5400 func (c *AspsDeleteCall) Do(opts ...googleapi.CallOption) error {
5401 gensupport.SetOptions(c.urlParams_, opts...)
5402 res, err := c.doRequest("json")
5403 if err != nil {
5404 return err
5405 }
5406 defer googleapi.CloseBody(res)
5407 if err := googleapi.CheckResponse(res); err != nil {
5408 return gensupport.WrapError(err)
5409 }
5410 return nil
5411 }
5412
5413 type AspsGetCall struct {
5414 s *Service
5415 userKey string
5416 codeId int64
5417 urlParams_ gensupport.URLParams
5418 ifNoneMatch_ string
5419 ctx_ context.Context
5420 header_ http.Header
5421 }
5422
5423
5424
5425
5426
5427
5428 func (r *AspsService) Get(userKey string, codeId int64) *AspsGetCall {
5429 c := &AspsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5430 c.userKey = userKey
5431 c.codeId = codeId
5432 return c
5433 }
5434
5435
5436
5437
5438 func (c *AspsGetCall) Fields(s ...googleapi.Field) *AspsGetCall {
5439 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5440 return c
5441 }
5442
5443
5444
5445
5446 func (c *AspsGetCall) IfNoneMatch(entityTag string) *AspsGetCall {
5447 c.ifNoneMatch_ = entityTag
5448 return c
5449 }
5450
5451
5452 func (c *AspsGetCall) Context(ctx context.Context) *AspsGetCall {
5453 c.ctx_ = ctx
5454 return c
5455 }
5456
5457
5458
5459 func (c *AspsGetCall) Header() http.Header {
5460 if c.header_ == nil {
5461 c.header_ = make(http.Header)
5462 }
5463 return c.header_
5464 }
5465
5466 func (c *AspsGetCall) doRequest(alt string) (*http.Response, error) {
5467 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5468 if c.ifNoneMatch_ != "" {
5469 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5470 }
5471 var body io.Reader = nil
5472 c.urlParams_.Set("alt", alt)
5473 c.urlParams_.Set("prettyPrint", "false")
5474 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/asps/{codeId}")
5475 urls += "?" + c.urlParams_.Encode()
5476 req, err := http.NewRequest("GET", urls, body)
5477 if err != nil {
5478 return nil, err
5479 }
5480 req.Header = reqHeaders
5481 googleapi.Expand(req.URL, map[string]string{
5482 "userKey": c.userKey,
5483 "codeId": strconv.FormatInt(c.codeId, 10),
5484 })
5485 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5486 }
5487
5488
5489
5490
5491
5492
5493 func (c *AspsGetCall) Do(opts ...googleapi.CallOption) (*Asp, error) {
5494 gensupport.SetOptions(c.urlParams_, opts...)
5495 res, err := c.doRequest("json")
5496 if res != nil && res.StatusCode == http.StatusNotModified {
5497 if res.Body != nil {
5498 res.Body.Close()
5499 }
5500 return nil, gensupport.WrapError(&googleapi.Error{
5501 Code: res.StatusCode,
5502 Header: res.Header,
5503 })
5504 }
5505 if err != nil {
5506 return nil, err
5507 }
5508 defer googleapi.CloseBody(res)
5509 if err := googleapi.CheckResponse(res); err != nil {
5510 return nil, gensupport.WrapError(err)
5511 }
5512 ret := &Asp{
5513 ServerResponse: googleapi.ServerResponse{
5514 Header: res.Header,
5515 HTTPStatusCode: res.StatusCode,
5516 },
5517 }
5518 target := &ret
5519 if err := gensupport.DecodeResponse(target, res); err != nil {
5520 return nil, err
5521 }
5522 return ret, nil
5523 }
5524
5525 type AspsListCall struct {
5526 s *Service
5527 userKey string
5528 urlParams_ gensupport.URLParams
5529 ifNoneMatch_ string
5530 ctx_ context.Context
5531 header_ http.Header
5532 }
5533
5534
5535
5536
5537
5538 func (r *AspsService) List(userKey string) *AspsListCall {
5539 c := &AspsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5540 c.userKey = userKey
5541 return c
5542 }
5543
5544
5545
5546
5547 func (c *AspsListCall) Fields(s ...googleapi.Field) *AspsListCall {
5548 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5549 return c
5550 }
5551
5552
5553
5554
5555 func (c *AspsListCall) IfNoneMatch(entityTag string) *AspsListCall {
5556 c.ifNoneMatch_ = entityTag
5557 return c
5558 }
5559
5560
5561 func (c *AspsListCall) Context(ctx context.Context) *AspsListCall {
5562 c.ctx_ = ctx
5563 return c
5564 }
5565
5566
5567
5568 func (c *AspsListCall) Header() http.Header {
5569 if c.header_ == nil {
5570 c.header_ = make(http.Header)
5571 }
5572 return c.header_
5573 }
5574
5575 func (c *AspsListCall) doRequest(alt string) (*http.Response, error) {
5576 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5577 if c.ifNoneMatch_ != "" {
5578 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5579 }
5580 var body io.Reader = nil
5581 c.urlParams_.Set("alt", alt)
5582 c.urlParams_.Set("prettyPrint", "false")
5583 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/asps")
5584 urls += "?" + c.urlParams_.Encode()
5585 req, err := http.NewRequest("GET", urls, body)
5586 if err != nil {
5587 return nil, err
5588 }
5589 req.Header = reqHeaders
5590 googleapi.Expand(req.URL, map[string]string{
5591 "userKey": c.userKey,
5592 })
5593 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5594 }
5595
5596
5597
5598
5599
5600
5601 func (c *AspsListCall) Do(opts ...googleapi.CallOption) (*Asps, error) {
5602 gensupport.SetOptions(c.urlParams_, opts...)
5603 res, err := c.doRequest("json")
5604 if res != nil && res.StatusCode == http.StatusNotModified {
5605 if res.Body != nil {
5606 res.Body.Close()
5607 }
5608 return nil, gensupport.WrapError(&googleapi.Error{
5609 Code: res.StatusCode,
5610 Header: res.Header,
5611 })
5612 }
5613 if err != nil {
5614 return nil, err
5615 }
5616 defer googleapi.CloseBody(res)
5617 if err := googleapi.CheckResponse(res); err != nil {
5618 return nil, gensupport.WrapError(err)
5619 }
5620 ret := &Asps{
5621 ServerResponse: googleapi.ServerResponse{
5622 Header: res.Header,
5623 HTTPStatusCode: res.StatusCode,
5624 },
5625 }
5626 target := &ret
5627 if err := gensupport.DecodeResponse(target, res); err != nil {
5628 return nil, err
5629 }
5630 return ret, nil
5631 }
5632
5633 type ChannelsStopCall struct {
5634 s *Service
5635 channel *Channel
5636 urlParams_ gensupport.URLParams
5637 ctx_ context.Context
5638 header_ http.Header
5639 }
5640
5641
5642 func (r *ChannelsService) Stop(channel *Channel) *ChannelsStopCall {
5643 c := &ChannelsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5644 c.channel = channel
5645 return c
5646 }
5647
5648
5649
5650
5651 func (c *ChannelsStopCall) Fields(s ...googleapi.Field) *ChannelsStopCall {
5652 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5653 return c
5654 }
5655
5656
5657 func (c *ChannelsStopCall) Context(ctx context.Context) *ChannelsStopCall {
5658 c.ctx_ = ctx
5659 return c
5660 }
5661
5662
5663
5664 func (c *ChannelsStopCall) Header() http.Header {
5665 if c.header_ == nil {
5666 c.header_ = make(http.Header)
5667 }
5668 return c.header_
5669 }
5670
5671 func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) {
5672 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5673 var body io.Reader = nil
5674 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
5675 if err != nil {
5676 return nil, err
5677 }
5678 c.urlParams_.Set("alt", alt)
5679 c.urlParams_.Set("prettyPrint", "false")
5680 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory_v1/channels/stop")
5681 urls += "?" + c.urlParams_.Encode()
5682 req, err := http.NewRequest("POST", urls, body)
5683 if err != nil {
5684 return nil, err
5685 }
5686 req.Header = reqHeaders
5687 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5688 }
5689
5690
5691 func (c *ChannelsStopCall) Do(opts ...googleapi.CallOption) error {
5692 gensupport.SetOptions(c.urlParams_, opts...)
5693 res, err := c.doRequest("json")
5694 if err != nil {
5695 return err
5696 }
5697 defer googleapi.CloseBody(res)
5698 if err := googleapi.CheckResponse(res); err != nil {
5699 return gensupport.WrapError(err)
5700 }
5701 return nil
5702 }
5703
5704 type ChromeosdevicesActionCall struct {
5705 s *Service
5706 customerId string
5707 resourceId string
5708 chromeosdeviceaction *ChromeOsDeviceAction
5709 urlParams_ gensupport.URLParams
5710 ctx_ context.Context
5711 header_ http.Header
5712 }
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734 func (r *ChromeosdevicesService) Action(customerId string, resourceId string, chromeosdeviceaction *ChromeOsDeviceAction) *ChromeosdevicesActionCall {
5735 c := &ChromeosdevicesActionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5736 c.customerId = customerId
5737 c.resourceId = resourceId
5738 c.chromeosdeviceaction = chromeosdeviceaction
5739 return c
5740 }
5741
5742
5743
5744
5745 func (c *ChromeosdevicesActionCall) Fields(s ...googleapi.Field) *ChromeosdevicesActionCall {
5746 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5747 return c
5748 }
5749
5750
5751 func (c *ChromeosdevicesActionCall) Context(ctx context.Context) *ChromeosdevicesActionCall {
5752 c.ctx_ = ctx
5753 return c
5754 }
5755
5756
5757
5758 func (c *ChromeosdevicesActionCall) Header() http.Header {
5759 if c.header_ == nil {
5760 c.header_ = make(http.Header)
5761 }
5762 return c.header_
5763 }
5764
5765 func (c *ChromeosdevicesActionCall) doRequest(alt string) (*http.Response, error) {
5766 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5767 var body io.Reader = nil
5768 body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosdeviceaction)
5769 if err != nil {
5770 return nil, err
5771 }
5772 c.urlParams_.Set("alt", alt)
5773 c.urlParams_.Set("prettyPrint", "false")
5774 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos/{resourceId}/action")
5775 urls += "?" + c.urlParams_.Encode()
5776 req, err := http.NewRequest("POST", urls, body)
5777 if err != nil {
5778 return nil, err
5779 }
5780 req.Header = reqHeaders
5781 googleapi.Expand(req.URL, map[string]string{
5782 "customerId": c.customerId,
5783 "resourceId": c.resourceId,
5784 })
5785 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5786 }
5787
5788
5789 func (c *ChromeosdevicesActionCall) Do(opts ...googleapi.CallOption) error {
5790 gensupport.SetOptions(c.urlParams_, opts...)
5791 res, err := c.doRequest("json")
5792 if err != nil {
5793 return err
5794 }
5795 defer googleapi.CloseBody(res)
5796 if err := googleapi.CheckResponse(res); err != nil {
5797 return gensupport.WrapError(err)
5798 }
5799 return nil
5800 }
5801
5802 type ChromeosdevicesGetCall struct {
5803 s *Service
5804 customerId string
5805 deviceId string
5806 urlParams_ gensupport.URLParams
5807 ifNoneMatch_ string
5808 ctx_ context.Context
5809 header_ http.Header
5810 }
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821 func (r *ChromeosdevicesService) Get(customerId string, deviceId string) *ChromeosdevicesGetCall {
5822 c := &ChromeosdevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5823 c.customerId = customerId
5824 c.deviceId = deviceId
5825 return c
5826 }
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838 func (c *ChromeosdevicesGetCall) Projection(projection string) *ChromeosdevicesGetCall {
5839 c.urlParams_.Set("projection", projection)
5840 return c
5841 }
5842
5843
5844
5845
5846 func (c *ChromeosdevicesGetCall) Fields(s ...googleapi.Field) *ChromeosdevicesGetCall {
5847 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5848 return c
5849 }
5850
5851
5852
5853
5854 func (c *ChromeosdevicesGetCall) IfNoneMatch(entityTag string) *ChromeosdevicesGetCall {
5855 c.ifNoneMatch_ = entityTag
5856 return c
5857 }
5858
5859
5860 func (c *ChromeosdevicesGetCall) Context(ctx context.Context) *ChromeosdevicesGetCall {
5861 c.ctx_ = ctx
5862 return c
5863 }
5864
5865
5866
5867 func (c *ChromeosdevicesGetCall) Header() http.Header {
5868 if c.header_ == nil {
5869 c.header_ = make(http.Header)
5870 }
5871 return c.header_
5872 }
5873
5874 func (c *ChromeosdevicesGetCall) doRequest(alt string) (*http.Response, error) {
5875 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5876 if c.ifNoneMatch_ != "" {
5877 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5878 }
5879 var body io.Reader = nil
5880 c.urlParams_.Set("alt", alt)
5881 c.urlParams_.Set("prettyPrint", "false")
5882 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}")
5883 urls += "?" + c.urlParams_.Encode()
5884 req, err := http.NewRequest("GET", urls, body)
5885 if err != nil {
5886 return nil, err
5887 }
5888 req.Header = reqHeaders
5889 googleapi.Expand(req.URL, map[string]string{
5890 "customerId": c.customerId,
5891 "deviceId": c.deviceId,
5892 })
5893 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5894 }
5895
5896
5897
5898
5899
5900
5901 func (c *ChromeosdevicesGetCall) Do(opts ...googleapi.CallOption) (*ChromeOsDevice, error) {
5902 gensupport.SetOptions(c.urlParams_, opts...)
5903 res, err := c.doRequest("json")
5904 if res != nil && res.StatusCode == http.StatusNotModified {
5905 if res.Body != nil {
5906 res.Body.Close()
5907 }
5908 return nil, gensupport.WrapError(&googleapi.Error{
5909 Code: res.StatusCode,
5910 Header: res.Header,
5911 })
5912 }
5913 if err != nil {
5914 return nil, err
5915 }
5916 defer googleapi.CloseBody(res)
5917 if err := googleapi.CheckResponse(res); err != nil {
5918 return nil, gensupport.WrapError(err)
5919 }
5920 ret := &ChromeOsDevice{
5921 ServerResponse: googleapi.ServerResponse{
5922 Header: res.Header,
5923 HTTPStatusCode: res.StatusCode,
5924 },
5925 }
5926 target := &ret
5927 if err := gensupport.DecodeResponse(target, res); err != nil {
5928 return nil, err
5929 }
5930 return ret, nil
5931 }
5932
5933 type ChromeosdevicesListCall struct {
5934 s *Service
5935 customerId string
5936 urlParams_ gensupport.URLParams
5937 ifNoneMatch_ string
5938 ctx_ context.Context
5939 header_ http.Header
5940 }
5941
5942
5943
5944
5945
5946
5947
5948 func (r *ChromeosdevicesService) List(customerId string) *ChromeosdevicesListCall {
5949 c := &ChromeosdevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5950 c.customerId = customerId
5951 return c
5952 }
5953
5954
5955
5956
5957 func (c *ChromeosdevicesListCall) IncludeChildOrgunits(includeChildOrgunits bool) *ChromeosdevicesListCall {
5958 c.urlParams_.Set("includeChildOrgunits", fmt.Sprint(includeChildOrgunits))
5959 return c
5960 }
5961
5962
5963
5964 func (c *ChromeosdevicesListCall) MaxResults(maxResults int64) *ChromeosdevicesListCall {
5965 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
5966 return c
5967 }
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991 func (c *ChromeosdevicesListCall) OrderBy(orderBy string) *ChromeosdevicesListCall {
5992 c.urlParams_.Set("orderBy", orderBy)
5993 return c
5994 }
5995
5996
5997
5998 func (c *ChromeosdevicesListCall) OrgUnitPath(orgUnitPath string) *ChromeosdevicesListCall {
5999 c.urlParams_.Set("orgUnitPath", orgUnitPath)
6000 return c
6001 }
6002
6003
6004
6005
6006
6007 func (c *ChromeosdevicesListCall) PageToken(pageToken string) *ChromeosdevicesListCall {
6008 c.urlParams_.Set("pageToken", pageToken)
6009 return c
6010 }
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022 func (c *ChromeosdevicesListCall) Projection(projection string) *ChromeosdevicesListCall {
6023 c.urlParams_.Set("projection", projection)
6024 return c
6025 }
6026
6027
6028
6029 func (c *ChromeosdevicesListCall) Query(query string) *ChromeosdevicesListCall {
6030 c.urlParams_.Set("query", query)
6031 return c
6032 }
6033
6034
6035
6036
6037
6038
6039
6040
6041 func (c *ChromeosdevicesListCall) SortOrder(sortOrder string) *ChromeosdevicesListCall {
6042 c.urlParams_.Set("sortOrder", sortOrder)
6043 return c
6044 }
6045
6046
6047
6048
6049 func (c *ChromeosdevicesListCall) Fields(s ...googleapi.Field) *ChromeosdevicesListCall {
6050 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6051 return c
6052 }
6053
6054
6055
6056
6057 func (c *ChromeosdevicesListCall) IfNoneMatch(entityTag string) *ChromeosdevicesListCall {
6058 c.ifNoneMatch_ = entityTag
6059 return c
6060 }
6061
6062
6063 func (c *ChromeosdevicesListCall) Context(ctx context.Context) *ChromeosdevicesListCall {
6064 c.ctx_ = ctx
6065 return c
6066 }
6067
6068
6069
6070 func (c *ChromeosdevicesListCall) Header() http.Header {
6071 if c.header_ == nil {
6072 c.header_ = make(http.Header)
6073 }
6074 return c.header_
6075 }
6076
6077 func (c *ChromeosdevicesListCall) doRequest(alt string) (*http.Response, error) {
6078 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6079 if c.ifNoneMatch_ != "" {
6080 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6081 }
6082 var body io.Reader = nil
6083 c.urlParams_.Set("alt", alt)
6084 c.urlParams_.Set("prettyPrint", "false")
6085 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos")
6086 urls += "?" + c.urlParams_.Encode()
6087 req, err := http.NewRequest("GET", urls, body)
6088 if err != nil {
6089 return nil, err
6090 }
6091 req.Header = reqHeaders
6092 googleapi.Expand(req.URL, map[string]string{
6093 "customerId": c.customerId,
6094 })
6095 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6096 }
6097
6098
6099
6100
6101
6102
6103
6104 func (c *ChromeosdevicesListCall) Do(opts ...googleapi.CallOption) (*ChromeOsDevices, error) {
6105 gensupport.SetOptions(c.urlParams_, opts...)
6106 res, err := c.doRequest("json")
6107 if res != nil && res.StatusCode == http.StatusNotModified {
6108 if res.Body != nil {
6109 res.Body.Close()
6110 }
6111 return nil, gensupport.WrapError(&googleapi.Error{
6112 Code: res.StatusCode,
6113 Header: res.Header,
6114 })
6115 }
6116 if err != nil {
6117 return nil, err
6118 }
6119 defer googleapi.CloseBody(res)
6120 if err := googleapi.CheckResponse(res); err != nil {
6121 return nil, gensupport.WrapError(err)
6122 }
6123 ret := &ChromeOsDevices{
6124 ServerResponse: googleapi.ServerResponse{
6125 Header: res.Header,
6126 HTTPStatusCode: res.StatusCode,
6127 },
6128 }
6129 target := &ret
6130 if err := gensupport.DecodeResponse(target, res); err != nil {
6131 return nil, err
6132 }
6133 return ret, nil
6134 }
6135
6136
6137
6138
6139 func (c *ChromeosdevicesListCall) Pages(ctx context.Context, f func(*ChromeOsDevices) error) error {
6140 c.ctx_ = ctx
6141 defer c.PageToken(c.urlParams_.Get("pageToken"))
6142 for {
6143 x, err := c.Do()
6144 if err != nil {
6145 return err
6146 }
6147 if err := f(x); err != nil {
6148 return err
6149 }
6150 if x.NextPageToken == "" {
6151 return nil
6152 }
6153 c.PageToken(x.NextPageToken)
6154 }
6155 }
6156
6157 type ChromeosdevicesMoveDevicesToOuCall struct {
6158 s *Service
6159 customerId string
6160 chromeosmovedevicestoou *ChromeOsMoveDevicesToOu
6161 urlParams_ gensupport.URLParams
6162 ctx_ context.Context
6163 header_ http.Header
6164 }
6165
6166
6167
6168
6169
6170
6171 func (r *ChromeosdevicesService) MoveDevicesToOu(customerId string, orgUnitPath string, chromeosmovedevicestoou *ChromeOsMoveDevicesToOu) *ChromeosdevicesMoveDevicesToOuCall {
6172 c := &ChromeosdevicesMoveDevicesToOuCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6173 c.customerId = customerId
6174 c.urlParams_.Set("orgUnitPath", orgUnitPath)
6175 c.chromeosmovedevicestoou = chromeosmovedevicestoou
6176 return c
6177 }
6178
6179
6180
6181
6182 func (c *ChromeosdevicesMoveDevicesToOuCall) Fields(s ...googleapi.Field) *ChromeosdevicesMoveDevicesToOuCall {
6183 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6184 return c
6185 }
6186
6187
6188 func (c *ChromeosdevicesMoveDevicesToOuCall) Context(ctx context.Context) *ChromeosdevicesMoveDevicesToOuCall {
6189 c.ctx_ = ctx
6190 return c
6191 }
6192
6193
6194
6195 func (c *ChromeosdevicesMoveDevicesToOuCall) Header() http.Header {
6196 if c.header_ == nil {
6197 c.header_ = make(http.Header)
6198 }
6199 return c.header_
6200 }
6201
6202 func (c *ChromeosdevicesMoveDevicesToOuCall) doRequest(alt string) (*http.Response, error) {
6203 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6204 var body io.Reader = nil
6205 body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosmovedevicestoou)
6206 if err != nil {
6207 return nil, err
6208 }
6209 c.urlParams_.Set("alt", alt)
6210 c.urlParams_.Set("prettyPrint", "false")
6211 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos/moveDevicesToOu")
6212 urls += "?" + c.urlParams_.Encode()
6213 req, err := http.NewRequest("POST", urls, body)
6214 if err != nil {
6215 return nil, err
6216 }
6217 req.Header = reqHeaders
6218 googleapi.Expand(req.URL, map[string]string{
6219 "customerId": c.customerId,
6220 })
6221 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6222 }
6223
6224
6225 func (c *ChromeosdevicesMoveDevicesToOuCall) Do(opts ...googleapi.CallOption) error {
6226 gensupport.SetOptions(c.urlParams_, opts...)
6227 res, err := c.doRequest("json")
6228 if err != nil {
6229 return err
6230 }
6231 defer googleapi.CloseBody(res)
6232 if err := googleapi.CheckResponse(res); err != nil {
6233 return gensupport.WrapError(err)
6234 }
6235 return nil
6236 }
6237
6238 type ChromeosdevicesPatchCall struct {
6239 s *Service
6240 customerId string
6241 deviceId string
6242 chromeosdevice *ChromeOsDevice
6243 urlParams_ gensupport.URLParams
6244 ctx_ context.Context
6245 header_ http.Header
6246 }
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260 func (r *ChromeosdevicesService) Patch(customerId string, deviceId string, chromeosdevice *ChromeOsDevice) *ChromeosdevicesPatchCall {
6261 c := &ChromeosdevicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6262 c.customerId = customerId
6263 c.deviceId = deviceId
6264 c.chromeosdevice = chromeosdevice
6265 return c
6266 }
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278 func (c *ChromeosdevicesPatchCall) Projection(projection string) *ChromeosdevicesPatchCall {
6279 c.urlParams_.Set("projection", projection)
6280 return c
6281 }
6282
6283
6284
6285
6286 func (c *ChromeosdevicesPatchCall) Fields(s ...googleapi.Field) *ChromeosdevicesPatchCall {
6287 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6288 return c
6289 }
6290
6291
6292 func (c *ChromeosdevicesPatchCall) Context(ctx context.Context) *ChromeosdevicesPatchCall {
6293 c.ctx_ = ctx
6294 return c
6295 }
6296
6297
6298
6299 func (c *ChromeosdevicesPatchCall) Header() http.Header {
6300 if c.header_ == nil {
6301 c.header_ = make(http.Header)
6302 }
6303 return c.header_
6304 }
6305
6306 func (c *ChromeosdevicesPatchCall) doRequest(alt string) (*http.Response, error) {
6307 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6308 var body io.Reader = nil
6309 body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosdevice)
6310 if err != nil {
6311 return nil, err
6312 }
6313 c.urlParams_.Set("alt", alt)
6314 c.urlParams_.Set("prettyPrint", "false")
6315 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}")
6316 urls += "?" + c.urlParams_.Encode()
6317 req, err := http.NewRequest("PATCH", urls, body)
6318 if err != nil {
6319 return nil, err
6320 }
6321 req.Header = reqHeaders
6322 googleapi.Expand(req.URL, map[string]string{
6323 "customerId": c.customerId,
6324 "deviceId": c.deviceId,
6325 })
6326 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6327 }
6328
6329
6330
6331
6332
6333
6334 func (c *ChromeosdevicesPatchCall) Do(opts ...googleapi.CallOption) (*ChromeOsDevice, error) {
6335 gensupport.SetOptions(c.urlParams_, opts...)
6336 res, err := c.doRequest("json")
6337 if res != nil && res.StatusCode == http.StatusNotModified {
6338 if res.Body != nil {
6339 res.Body.Close()
6340 }
6341 return nil, gensupport.WrapError(&googleapi.Error{
6342 Code: res.StatusCode,
6343 Header: res.Header,
6344 })
6345 }
6346 if err != nil {
6347 return nil, err
6348 }
6349 defer googleapi.CloseBody(res)
6350 if err := googleapi.CheckResponse(res); err != nil {
6351 return nil, gensupport.WrapError(err)
6352 }
6353 ret := &ChromeOsDevice{
6354 ServerResponse: googleapi.ServerResponse{
6355 Header: res.Header,
6356 HTTPStatusCode: res.StatusCode,
6357 },
6358 }
6359 target := &ret
6360 if err := gensupport.DecodeResponse(target, res); err != nil {
6361 return nil, err
6362 }
6363 return ret, nil
6364 }
6365
6366 type ChromeosdevicesUpdateCall struct {
6367 s *Service
6368 customerId string
6369 deviceId string
6370 chromeosdevice *ChromeOsDevice
6371 urlParams_ gensupport.URLParams
6372 ctx_ context.Context
6373 header_ http.Header
6374 }
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386 func (r *ChromeosdevicesService) Update(customerId string, deviceId string, chromeosdevice *ChromeOsDevice) *ChromeosdevicesUpdateCall {
6387 c := &ChromeosdevicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6388 c.customerId = customerId
6389 c.deviceId = deviceId
6390 c.chromeosdevice = chromeosdevice
6391 return c
6392 }
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404 func (c *ChromeosdevicesUpdateCall) Projection(projection string) *ChromeosdevicesUpdateCall {
6405 c.urlParams_.Set("projection", projection)
6406 return c
6407 }
6408
6409
6410
6411
6412 func (c *ChromeosdevicesUpdateCall) Fields(s ...googleapi.Field) *ChromeosdevicesUpdateCall {
6413 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6414 return c
6415 }
6416
6417
6418 func (c *ChromeosdevicesUpdateCall) Context(ctx context.Context) *ChromeosdevicesUpdateCall {
6419 c.ctx_ = ctx
6420 return c
6421 }
6422
6423
6424
6425 func (c *ChromeosdevicesUpdateCall) Header() http.Header {
6426 if c.header_ == nil {
6427 c.header_ = make(http.Header)
6428 }
6429 return c.header_
6430 }
6431
6432 func (c *ChromeosdevicesUpdateCall) doRequest(alt string) (*http.Response, error) {
6433 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6434 var body io.Reader = nil
6435 body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosdevice)
6436 if err != nil {
6437 return nil, err
6438 }
6439 c.urlParams_.Set("alt", alt)
6440 c.urlParams_.Set("prettyPrint", "false")
6441 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}")
6442 urls += "?" + c.urlParams_.Encode()
6443 req, err := http.NewRequest("PUT", urls, body)
6444 if err != nil {
6445 return nil, err
6446 }
6447 req.Header = reqHeaders
6448 googleapi.Expand(req.URL, map[string]string{
6449 "customerId": c.customerId,
6450 "deviceId": c.deviceId,
6451 })
6452 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6453 }
6454
6455
6456
6457
6458
6459
6460 func (c *ChromeosdevicesUpdateCall) Do(opts ...googleapi.CallOption) (*ChromeOsDevice, error) {
6461 gensupport.SetOptions(c.urlParams_, opts...)
6462 res, err := c.doRequest("json")
6463 if res != nil && res.StatusCode == http.StatusNotModified {
6464 if res.Body != nil {
6465 res.Body.Close()
6466 }
6467 return nil, gensupport.WrapError(&googleapi.Error{
6468 Code: res.StatusCode,
6469 Header: res.Header,
6470 })
6471 }
6472 if err != nil {
6473 return nil, err
6474 }
6475 defer googleapi.CloseBody(res)
6476 if err := googleapi.CheckResponse(res); err != nil {
6477 return nil, gensupport.WrapError(err)
6478 }
6479 ret := &ChromeOsDevice{
6480 ServerResponse: googleapi.ServerResponse{
6481 Header: res.Header,
6482 HTTPStatusCode: res.StatusCode,
6483 },
6484 }
6485 target := &ret
6486 if err := gensupport.DecodeResponse(target, res); err != nil {
6487 return nil, err
6488 }
6489 return ret, nil
6490 }
6491
6492 type CustomerDevicesChromeosBatchChangeStatusCall struct {
6493 s *Service
6494 customerId string
6495 batchchangechromeosdevicestatusrequest *BatchChangeChromeOsDeviceStatusRequest
6496 urlParams_ gensupport.URLParams
6497 ctx_ context.Context
6498 header_ http.Header
6499 }
6500
6501
6502
6503
6504
6505
6506
6507 func (r *CustomerDevicesChromeosService) BatchChangeStatus(customerId string, batchchangechromeosdevicestatusrequest *BatchChangeChromeOsDeviceStatusRequest) *CustomerDevicesChromeosBatchChangeStatusCall {
6508 c := &CustomerDevicesChromeosBatchChangeStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6509 c.customerId = customerId
6510 c.batchchangechromeosdevicestatusrequest = batchchangechromeosdevicestatusrequest
6511 return c
6512 }
6513
6514
6515
6516
6517 func (c *CustomerDevicesChromeosBatchChangeStatusCall) Fields(s ...googleapi.Field) *CustomerDevicesChromeosBatchChangeStatusCall {
6518 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6519 return c
6520 }
6521
6522
6523 func (c *CustomerDevicesChromeosBatchChangeStatusCall) Context(ctx context.Context) *CustomerDevicesChromeosBatchChangeStatusCall {
6524 c.ctx_ = ctx
6525 return c
6526 }
6527
6528
6529
6530 func (c *CustomerDevicesChromeosBatchChangeStatusCall) Header() http.Header {
6531 if c.header_ == nil {
6532 c.header_ = make(http.Header)
6533 }
6534 return c.header_
6535 }
6536
6537 func (c *CustomerDevicesChromeosBatchChangeStatusCall) doRequest(alt string) (*http.Response, error) {
6538 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6539 var body io.Reader = nil
6540 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchchangechromeosdevicestatusrequest)
6541 if err != nil {
6542 return nil, err
6543 }
6544 c.urlParams_.Set("alt", alt)
6545 c.urlParams_.Set("prettyPrint", "false")
6546 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos:batchChangeStatus")
6547 urls += "?" + c.urlParams_.Encode()
6548 req, err := http.NewRequest("POST", urls, body)
6549 if err != nil {
6550 return nil, err
6551 }
6552 req.Header = reqHeaders
6553 googleapi.Expand(req.URL, map[string]string{
6554 "customerId": c.customerId,
6555 })
6556 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6557 }
6558
6559
6560
6561
6562
6563
6564
6565 func (c *CustomerDevicesChromeosBatchChangeStatusCall) Do(opts ...googleapi.CallOption) (*BatchChangeChromeOsDeviceStatusResponse, error) {
6566 gensupport.SetOptions(c.urlParams_, opts...)
6567 res, err := c.doRequest("json")
6568 if res != nil && res.StatusCode == http.StatusNotModified {
6569 if res.Body != nil {
6570 res.Body.Close()
6571 }
6572 return nil, gensupport.WrapError(&googleapi.Error{
6573 Code: res.StatusCode,
6574 Header: res.Header,
6575 })
6576 }
6577 if err != nil {
6578 return nil, err
6579 }
6580 defer googleapi.CloseBody(res)
6581 if err := googleapi.CheckResponse(res); err != nil {
6582 return nil, gensupport.WrapError(err)
6583 }
6584 ret := &BatchChangeChromeOsDeviceStatusResponse{
6585 ServerResponse: googleapi.ServerResponse{
6586 Header: res.Header,
6587 HTTPStatusCode: res.StatusCode,
6588 },
6589 }
6590 target := &ret
6591 if err := gensupport.DecodeResponse(target, res); err != nil {
6592 return nil, err
6593 }
6594 return ret, nil
6595 }
6596
6597 type CustomerDevicesChromeosIssueCommandCall struct {
6598 s *Service
6599 customerId string
6600 deviceId string
6601 directorychromeosdevicesissuecommandrequest *DirectoryChromeosdevicesIssueCommandRequest
6602 urlParams_ gensupport.URLParams
6603 ctx_ context.Context
6604 header_ http.Header
6605 }
6606
6607
6608
6609
6610
6611 func (r *CustomerDevicesChromeosService) IssueCommand(customerId string, deviceId string, directorychromeosdevicesissuecommandrequest *DirectoryChromeosdevicesIssueCommandRequest) *CustomerDevicesChromeosIssueCommandCall {
6612 c := &CustomerDevicesChromeosIssueCommandCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6613 c.customerId = customerId
6614 c.deviceId = deviceId
6615 c.directorychromeosdevicesissuecommandrequest = directorychromeosdevicesissuecommandrequest
6616 return c
6617 }
6618
6619
6620
6621
6622 func (c *CustomerDevicesChromeosIssueCommandCall) Fields(s ...googleapi.Field) *CustomerDevicesChromeosIssueCommandCall {
6623 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6624 return c
6625 }
6626
6627
6628 func (c *CustomerDevicesChromeosIssueCommandCall) Context(ctx context.Context) *CustomerDevicesChromeosIssueCommandCall {
6629 c.ctx_ = ctx
6630 return c
6631 }
6632
6633
6634
6635 func (c *CustomerDevicesChromeosIssueCommandCall) Header() http.Header {
6636 if c.header_ == nil {
6637 c.header_ = make(http.Header)
6638 }
6639 return c.header_
6640 }
6641
6642 func (c *CustomerDevicesChromeosIssueCommandCall) doRequest(alt string) (*http.Response, error) {
6643 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6644 var body io.Reader = nil
6645 body, err := googleapi.WithoutDataWrapper.JSONReader(c.directorychromeosdevicesissuecommandrequest)
6646 if err != nil {
6647 return nil, err
6648 }
6649 c.urlParams_.Set("alt", alt)
6650 c.urlParams_.Set("prettyPrint", "false")
6651 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}:issueCommand")
6652 urls += "?" + c.urlParams_.Encode()
6653 req, err := http.NewRequest("POST", urls, body)
6654 if err != nil {
6655 return nil, err
6656 }
6657 req.Header = reqHeaders
6658 googleapi.Expand(req.URL, map[string]string{
6659 "customerId": c.customerId,
6660 "deviceId": c.deviceId,
6661 })
6662 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6663 }
6664
6665
6666
6667
6668
6669
6670
6671 func (c *CustomerDevicesChromeosIssueCommandCall) Do(opts ...googleapi.CallOption) (*DirectoryChromeosdevicesIssueCommandResponse, error) {
6672 gensupport.SetOptions(c.urlParams_, opts...)
6673 res, err := c.doRequest("json")
6674 if res != nil && res.StatusCode == http.StatusNotModified {
6675 if res.Body != nil {
6676 res.Body.Close()
6677 }
6678 return nil, gensupport.WrapError(&googleapi.Error{
6679 Code: res.StatusCode,
6680 Header: res.Header,
6681 })
6682 }
6683 if err != nil {
6684 return nil, err
6685 }
6686 defer googleapi.CloseBody(res)
6687 if err := googleapi.CheckResponse(res); err != nil {
6688 return nil, gensupport.WrapError(err)
6689 }
6690 ret := &DirectoryChromeosdevicesIssueCommandResponse{
6691 ServerResponse: googleapi.ServerResponse{
6692 Header: res.Header,
6693 HTTPStatusCode: res.StatusCode,
6694 },
6695 }
6696 target := &ret
6697 if err := gensupport.DecodeResponse(target, res); err != nil {
6698 return nil, err
6699 }
6700 return ret, nil
6701 }
6702
6703 type CustomerDevicesChromeosCommandsGetCall struct {
6704 s *Service
6705 customerId string
6706 deviceId string
6707 commandId int64
6708 urlParams_ gensupport.URLParams
6709 ifNoneMatch_ string
6710 ctx_ context.Context
6711 header_ http.Header
6712 }
6713
6714
6715
6716
6717
6718
6719 func (r *CustomerDevicesChromeosCommandsService) Get(customerId string, deviceId string, commandId int64) *CustomerDevicesChromeosCommandsGetCall {
6720 c := &CustomerDevicesChromeosCommandsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6721 c.customerId = customerId
6722 c.deviceId = deviceId
6723 c.commandId = commandId
6724 return c
6725 }
6726
6727
6728
6729
6730 func (c *CustomerDevicesChromeosCommandsGetCall) Fields(s ...googleapi.Field) *CustomerDevicesChromeosCommandsGetCall {
6731 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6732 return c
6733 }
6734
6735
6736
6737
6738 func (c *CustomerDevicesChromeosCommandsGetCall) IfNoneMatch(entityTag string) *CustomerDevicesChromeosCommandsGetCall {
6739 c.ifNoneMatch_ = entityTag
6740 return c
6741 }
6742
6743
6744 func (c *CustomerDevicesChromeosCommandsGetCall) Context(ctx context.Context) *CustomerDevicesChromeosCommandsGetCall {
6745 c.ctx_ = ctx
6746 return c
6747 }
6748
6749
6750
6751 func (c *CustomerDevicesChromeosCommandsGetCall) Header() http.Header {
6752 if c.header_ == nil {
6753 c.header_ = make(http.Header)
6754 }
6755 return c.header_
6756 }
6757
6758 func (c *CustomerDevicesChromeosCommandsGetCall) doRequest(alt string) (*http.Response, error) {
6759 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6760 if c.ifNoneMatch_ != "" {
6761 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6762 }
6763 var body io.Reader = nil
6764 c.urlParams_.Set("alt", alt)
6765 c.urlParams_.Set("prettyPrint", "false")
6766 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}/commands/{commandId}")
6767 urls += "?" + c.urlParams_.Encode()
6768 req, err := http.NewRequest("GET", urls, body)
6769 if err != nil {
6770 return nil, err
6771 }
6772 req.Header = reqHeaders
6773 googleapi.Expand(req.URL, map[string]string{
6774 "customerId": c.customerId,
6775 "deviceId": c.deviceId,
6776 "commandId": strconv.FormatInt(c.commandId, 10),
6777 })
6778 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6779 }
6780
6781
6782
6783
6784
6785
6786
6787 func (c *CustomerDevicesChromeosCommandsGetCall) Do(opts ...googleapi.CallOption) (*DirectoryChromeosdevicesCommand, error) {
6788 gensupport.SetOptions(c.urlParams_, opts...)
6789 res, err := c.doRequest("json")
6790 if res != nil && res.StatusCode == http.StatusNotModified {
6791 if res.Body != nil {
6792 res.Body.Close()
6793 }
6794 return nil, gensupport.WrapError(&googleapi.Error{
6795 Code: res.StatusCode,
6796 Header: res.Header,
6797 })
6798 }
6799 if err != nil {
6800 return nil, err
6801 }
6802 defer googleapi.CloseBody(res)
6803 if err := googleapi.CheckResponse(res); err != nil {
6804 return nil, gensupport.WrapError(err)
6805 }
6806 ret := &DirectoryChromeosdevicesCommand{
6807 ServerResponse: googleapi.ServerResponse{
6808 Header: res.Header,
6809 HTTPStatusCode: res.StatusCode,
6810 },
6811 }
6812 target := &ret
6813 if err := gensupport.DecodeResponse(target, res); err != nil {
6814 return nil, err
6815 }
6816 return ret, nil
6817 }
6818
6819 type CustomersGetCall struct {
6820 s *Service
6821 customerKey string
6822 urlParams_ gensupport.URLParams
6823 ifNoneMatch_ string
6824 ctx_ context.Context
6825 header_ http.Header
6826 }
6827
6828
6829
6830
6831 func (r *CustomersService) Get(customerKey string) *CustomersGetCall {
6832 c := &CustomersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6833 c.customerKey = customerKey
6834 return c
6835 }
6836
6837
6838
6839
6840 func (c *CustomersGetCall) Fields(s ...googleapi.Field) *CustomersGetCall {
6841 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6842 return c
6843 }
6844
6845
6846
6847
6848 func (c *CustomersGetCall) IfNoneMatch(entityTag string) *CustomersGetCall {
6849 c.ifNoneMatch_ = entityTag
6850 return c
6851 }
6852
6853
6854 func (c *CustomersGetCall) Context(ctx context.Context) *CustomersGetCall {
6855 c.ctx_ = ctx
6856 return c
6857 }
6858
6859
6860
6861 func (c *CustomersGetCall) Header() http.Header {
6862 if c.header_ == nil {
6863 c.header_ = make(http.Header)
6864 }
6865 return c.header_
6866 }
6867
6868 func (c *CustomersGetCall) doRequest(alt string) (*http.Response, error) {
6869 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6870 if c.ifNoneMatch_ != "" {
6871 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6872 }
6873 var body io.Reader = nil
6874 c.urlParams_.Set("alt", alt)
6875 c.urlParams_.Set("prettyPrint", "false")
6876 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customers/{customerKey}")
6877 urls += "?" + c.urlParams_.Encode()
6878 req, err := http.NewRequest("GET", urls, body)
6879 if err != nil {
6880 return nil, err
6881 }
6882 req.Header = reqHeaders
6883 googleapi.Expand(req.URL, map[string]string{
6884 "customerKey": c.customerKey,
6885 })
6886 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6887 }
6888
6889
6890
6891
6892
6893
6894 func (c *CustomersGetCall) Do(opts ...googleapi.CallOption) (*Customer, error) {
6895 gensupport.SetOptions(c.urlParams_, opts...)
6896 res, err := c.doRequest("json")
6897 if res != nil && res.StatusCode == http.StatusNotModified {
6898 if res.Body != nil {
6899 res.Body.Close()
6900 }
6901 return nil, gensupport.WrapError(&googleapi.Error{
6902 Code: res.StatusCode,
6903 Header: res.Header,
6904 })
6905 }
6906 if err != nil {
6907 return nil, err
6908 }
6909 defer googleapi.CloseBody(res)
6910 if err := googleapi.CheckResponse(res); err != nil {
6911 return nil, gensupport.WrapError(err)
6912 }
6913 ret := &Customer{
6914 ServerResponse: googleapi.ServerResponse{
6915 Header: res.Header,
6916 HTTPStatusCode: res.StatusCode,
6917 },
6918 }
6919 target := &ret
6920 if err := gensupport.DecodeResponse(target, res); err != nil {
6921 return nil, err
6922 }
6923 return ret, nil
6924 }
6925
6926 type CustomersPatchCall struct {
6927 s *Service
6928 customerKey string
6929 customer *Customer
6930 urlParams_ gensupport.URLParams
6931 ctx_ context.Context
6932 header_ http.Header
6933 }
6934
6935
6936
6937
6938 func (r *CustomersService) Patch(customerKey string, customer *Customer) *CustomersPatchCall {
6939 c := &CustomersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6940 c.customerKey = customerKey
6941 c.customer = customer
6942 return c
6943 }
6944
6945
6946
6947
6948 func (c *CustomersPatchCall) Fields(s ...googleapi.Field) *CustomersPatchCall {
6949 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6950 return c
6951 }
6952
6953
6954 func (c *CustomersPatchCall) Context(ctx context.Context) *CustomersPatchCall {
6955 c.ctx_ = ctx
6956 return c
6957 }
6958
6959
6960
6961 func (c *CustomersPatchCall) Header() http.Header {
6962 if c.header_ == nil {
6963 c.header_ = make(http.Header)
6964 }
6965 return c.header_
6966 }
6967
6968 func (c *CustomersPatchCall) doRequest(alt string) (*http.Response, error) {
6969 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6970 var body io.Reader = nil
6971 body, err := googleapi.WithoutDataWrapper.JSONReader(c.customer)
6972 if err != nil {
6973 return nil, err
6974 }
6975 c.urlParams_.Set("alt", alt)
6976 c.urlParams_.Set("prettyPrint", "false")
6977 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customers/{customerKey}")
6978 urls += "?" + c.urlParams_.Encode()
6979 req, err := http.NewRequest("PATCH", urls, body)
6980 if err != nil {
6981 return nil, err
6982 }
6983 req.Header = reqHeaders
6984 googleapi.Expand(req.URL, map[string]string{
6985 "customerKey": c.customerKey,
6986 })
6987 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6988 }
6989
6990
6991
6992
6993
6994
6995 func (c *CustomersPatchCall) Do(opts ...googleapi.CallOption) (*Customer, error) {
6996 gensupport.SetOptions(c.urlParams_, opts...)
6997 res, err := c.doRequest("json")
6998 if res != nil && res.StatusCode == http.StatusNotModified {
6999 if res.Body != nil {
7000 res.Body.Close()
7001 }
7002 return nil, gensupport.WrapError(&googleapi.Error{
7003 Code: res.StatusCode,
7004 Header: res.Header,
7005 })
7006 }
7007 if err != nil {
7008 return nil, err
7009 }
7010 defer googleapi.CloseBody(res)
7011 if err := googleapi.CheckResponse(res); err != nil {
7012 return nil, gensupport.WrapError(err)
7013 }
7014 ret := &Customer{
7015 ServerResponse: googleapi.ServerResponse{
7016 Header: res.Header,
7017 HTTPStatusCode: res.StatusCode,
7018 },
7019 }
7020 target := &ret
7021 if err := gensupport.DecodeResponse(target, res); err != nil {
7022 return nil, err
7023 }
7024 return ret, nil
7025 }
7026
7027 type CustomersUpdateCall struct {
7028 s *Service
7029 customerKey string
7030 customer *Customer
7031 urlParams_ gensupport.URLParams
7032 ctx_ context.Context
7033 header_ http.Header
7034 }
7035
7036
7037
7038
7039 func (r *CustomersService) Update(customerKey string, customer *Customer) *CustomersUpdateCall {
7040 c := &CustomersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7041 c.customerKey = customerKey
7042 c.customer = customer
7043 return c
7044 }
7045
7046
7047
7048
7049 func (c *CustomersUpdateCall) Fields(s ...googleapi.Field) *CustomersUpdateCall {
7050 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7051 return c
7052 }
7053
7054
7055 func (c *CustomersUpdateCall) Context(ctx context.Context) *CustomersUpdateCall {
7056 c.ctx_ = ctx
7057 return c
7058 }
7059
7060
7061
7062 func (c *CustomersUpdateCall) Header() http.Header {
7063 if c.header_ == nil {
7064 c.header_ = make(http.Header)
7065 }
7066 return c.header_
7067 }
7068
7069 func (c *CustomersUpdateCall) doRequest(alt string) (*http.Response, error) {
7070 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7071 var body io.Reader = nil
7072 body, err := googleapi.WithoutDataWrapper.JSONReader(c.customer)
7073 if err != nil {
7074 return nil, err
7075 }
7076 c.urlParams_.Set("alt", alt)
7077 c.urlParams_.Set("prettyPrint", "false")
7078 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customers/{customerKey}")
7079 urls += "?" + c.urlParams_.Encode()
7080 req, err := http.NewRequest("PUT", urls, body)
7081 if err != nil {
7082 return nil, err
7083 }
7084 req.Header = reqHeaders
7085 googleapi.Expand(req.URL, map[string]string{
7086 "customerKey": c.customerKey,
7087 })
7088 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7089 }
7090
7091
7092
7093
7094
7095
7096 func (c *CustomersUpdateCall) Do(opts ...googleapi.CallOption) (*Customer, error) {
7097 gensupport.SetOptions(c.urlParams_, opts...)
7098 res, err := c.doRequest("json")
7099 if res != nil && res.StatusCode == http.StatusNotModified {
7100 if res.Body != nil {
7101 res.Body.Close()
7102 }
7103 return nil, gensupport.WrapError(&googleapi.Error{
7104 Code: res.StatusCode,
7105 Header: res.Header,
7106 })
7107 }
7108 if err != nil {
7109 return nil, err
7110 }
7111 defer googleapi.CloseBody(res)
7112 if err := googleapi.CheckResponse(res); err != nil {
7113 return nil, gensupport.WrapError(err)
7114 }
7115 ret := &Customer{
7116 ServerResponse: googleapi.ServerResponse{
7117 Header: res.Header,
7118 HTTPStatusCode: res.StatusCode,
7119 },
7120 }
7121 target := &ret
7122 if err := gensupport.DecodeResponse(target, res); err != nil {
7123 return nil, err
7124 }
7125 return ret, nil
7126 }
7127
7128 type CustomersChromePrintServersBatchCreatePrintServersCall struct {
7129 s *Service
7130 parent string
7131 batchcreateprintserversrequest *BatchCreatePrintServersRequest
7132 urlParams_ gensupport.URLParams
7133 ctx_ context.Context
7134 header_ http.Header
7135 }
7136
7137
7138
7139
7140
7141
7142 func (r *CustomersChromePrintServersService) BatchCreatePrintServers(parent string, batchcreateprintserversrequest *BatchCreatePrintServersRequest) *CustomersChromePrintServersBatchCreatePrintServersCall {
7143 c := &CustomersChromePrintServersBatchCreatePrintServersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7144 c.parent = parent
7145 c.batchcreateprintserversrequest = batchcreateprintserversrequest
7146 return c
7147 }
7148
7149
7150
7151
7152 func (c *CustomersChromePrintServersBatchCreatePrintServersCall) Fields(s ...googleapi.Field) *CustomersChromePrintServersBatchCreatePrintServersCall {
7153 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7154 return c
7155 }
7156
7157
7158 func (c *CustomersChromePrintServersBatchCreatePrintServersCall) Context(ctx context.Context) *CustomersChromePrintServersBatchCreatePrintServersCall {
7159 c.ctx_ = ctx
7160 return c
7161 }
7162
7163
7164
7165 func (c *CustomersChromePrintServersBatchCreatePrintServersCall) Header() http.Header {
7166 if c.header_ == nil {
7167 c.header_ = make(http.Header)
7168 }
7169 return c.header_
7170 }
7171
7172 func (c *CustomersChromePrintServersBatchCreatePrintServersCall) doRequest(alt string) (*http.Response, error) {
7173 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7174 var body io.Reader = nil
7175 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreateprintserversrequest)
7176 if err != nil {
7177 return nil, err
7178 }
7179 c.urlParams_.Set("alt", alt)
7180 c.urlParams_.Set("prettyPrint", "false")
7181 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printServers:batchCreatePrintServers")
7182 urls += "?" + c.urlParams_.Encode()
7183 req, err := http.NewRequest("POST", urls, body)
7184 if err != nil {
7185 return nil, err
7186 }
7187 req.Header = reqHeaders
7188 googleapi.Expand(req.URL, map[string]string{
7189 "parent": c.parent,
7190 })
7191 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7192 }
7193
7194
7195
7196
7197
7198
7199
7200 func (c *CustomersChromePrintServersBatchCreatePrintServersCall) Do(opts ...googleapi.CallOption) (*BatchCreatePrintServersResponse, error) {
7201 gensupport.SetOptions(c.urlParams_, opts...)
7202 res, err := c.doRequest("json")
7203 if res != nil && res.StatusCode == http.StatusNotModified {
7204 if res.Body != nil {
7205 res.Body.Close()
7206 }
7207 return nil, gensupport.WrapError(&googleapi.Error{
7208 Code: res.StatusCode,
7209 Header: res.Header,
7210 })
7211 }
7212 if err != nil {
7213 return nil, err
7214 }
7215 defer googleapi.CloseBody(res)
7216 if err := googleapi.CheckResponse(res); err != nil {
7217 return nil, gensupport.WrapError(err)
7218 }
7219 ret := &BatchCreatePrintServersResponse{
7220 ServerResponse: googleapi.ServerResponse{
7221 Header: res.Header,
7222 HTTPStatusCode: res.StatusCode,
7223 },
7224 }
7225 target := &ret
7226 if err := gensupport.DecodeResponse(target, res); err != nil {
7227 return nil, err
7228 }
7229 return ret, nil
7230 }
7231
7232 type CustomersChromePrintServersBatchDeletePrintServersCall struct {
7233 s *Service
7234 parent string
7235 batchdeleteprintserversrequest *BatchDeletePrintServersRequest
7236 urlParams_ gensupport.URLParams
7237 ctx_ context.Context
7238 header_ http.Header
7239 }
7240
7241
7242
7243
7244
7245
7246
7247 func (r *CustomersChromePrintServersService) BatchDeletePrintServers(parent string, batchdeleteprintserversrequest *BatchDeletePrintServersRequest) *CustomersChromePrintServersBatchDeletePrintServersCall {
7248 c := &CustomersChromePrintServersBatchDeletePrintServersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7249 c.parent = parent
7250 c.batchdeleteprintserversrequest = batchdeleteprintserversrequest
7251 return c
7252 }
7253
7254
7255
7256
7257 func (c *CustomersChromePrintServersBatchDeletePrintServersCall) Fields(s ...googleapi.Field) *CustomersChromePrintServersBatchDeletePrintServersCall {
7258 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7259 return c
7260 }
7261
7262
7263 func (c *CustomersChromePrintServersBatchDeletePrintServersCall) Context(ctx context.Context) *CustomersChromePrintServersBatchDeletePrintServersCall {
7264 c.ctx_ = ctx
7265 return c
7266 }
7267
7268
7269
7270 func (c *CustomersChromePrintServersBatchDeletePrintServersCall) Header() http.Header {
7271 if c.header_ == nil {
7272 c.header_ = make(http.Header)
7273 }
7274 return c.header_
7275 }
7276
7277 func (c *CustomersChromePrintServersBatchDeletePrintServersCall) doRequest(alt string) (*http.Response, error) {
7278 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7279 var body io.Reader = nil
7280 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchdeleteprintserversrequest)
7281 if err != nil {
7282 return nil, err
7283 }
7284 c.urlParams_.Set("alt", alt)
7285 c.urlParams_.Set("prettyPrint", "false")
7286 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printServers:batchDeletePrintServers")
7287 urls += "?" + c.urlParams_.Encode()
7288 req, err := http.NewRequest("POST", urls, body)
7289 if err != nil {
7290 return nil, err
7291 }
7292 req.Header = reqHeaders
7293 googleapi.Expand(req.URL, map[string]string{
7294 "parent": c.parent,
7295 })
7296 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7297 }
7298
7299
7300
7301
7302
7303
7304
7305 func (c *CustomersChromePrintServersBatchDeletePrintServersCall) Do(opts ...googleapi.CallOption) (*BatchDeletePrintServersResponse, error) {
7306 gensupport.SetOptions(c.urlParams_, opts...)
7307 res, err := c.doRequest("json")
7308 if res != nil && res.StatusCode == http.StatusNotModified {
7309 if res.Body != nil {
7310 res.Body.Close()
7311 }
7312 return nil, gensupport.WrapError(&googleapi.Error{
7313 Code: res.StatusCode,
7314 Header: res.Header,
7315 })
7316 }
7317 if err != nil {
7318 return nil, err
7319 }
7320 defer googleapi.CloseBody(res)
7321 if err := googleapi.CheckResponse(res); err != nil {
7322 return nil, gensupport.WrapError(err)
7323 }
7324 ret := &BatchDeletePrintServersResponse{
7325 ServerResponse: googleapi.ServerResponse{
7326 Header: res.Header,
7327 HTTPStatusCode: res.StatusCode,
7328 },
7329 }
7330 target := &ret
7331 if err := gensupport.DecodeResponse(target, res); err != nil {
7332 return nil, err
7333 }
7334 return ret, nil
7335 }
7336
7337 type CustomersChromePrintServersCreateCall struct {
7338 s *Service
7339 parent string
7340 printserver *PrintServer
7341 urlParams_ gensupport.URLParams
7342 ctx_ context.Context
7343 header_ http.Header
7344 }
7345
7346
7347
7348
7349
7350
7351 func (r *CustomersChromePrintServersService) Create(parent string, printserver *PrintServer) *CustomersChromePrintServersCreateCall {
7352 c := &CustomersChromePrintServersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7353 c.parent = parent
7354 c.printserver = printserver
7355 return c
7356 }
7357
7358
7359
7360
7361 func (c *CustomersChromePrintServersCreateCall) Fields(s ...googleapi.Field) *CustomersChromePrintServersCreateCall {
7362 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7363 return c
7364 }
7365
7366
7367 func (c *CustomersChromePrintServersCreateCall) Context(ctx context.Context) *CustomersChromePrintServersCreateCall {
7368 c.ctx_ = ctx
7369 return c
7370 }
7371
7372
7373
7374 func (c *CustomersChromePrintServersCreateCall) Header() http.Header {
7375 if c.header_ == nil {
7376 c.header_ = make(http.Header)
7377 }
7378 return c.header_
7379 }
7380
7381 func (c *CustomersChromePrintServersCreateCall) doRequest(alt string) (*http.Response, error) {
7382 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7383 var body io.Reader = nil
7384 body, err := googleapi.WithoutDataWrapper.JSONReader(c.printserver)
7385 if err != nil {
7386 return nil, err
7387 }
7388 c.urlParams_.Set("alt", alt)
7389 c.urlParams_.Set("prettyPrint", "false")
7390 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printServers")
7391 urls += "?" + c.urlParams_.Encode()
7392 req, err := http.NewRequest("POST", urls, body)
7393 if err != nil {
7394 return nil, err
7395 }
7396 req.Header = reqHeaders
7397 googleapi.Expand(req.URL, map[string]string{
7398 "parent": c.parent,
7399 })
7400 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7401 }
7402
7403
7404
7405
7406
7407
7408 func (c *CustomersChromePrintServersCreateCall) Do(opts ...googleapi.CallOption) (*PrintServer, error) {
7409 gensupport.SetOptions(c.urlParams_, opts...)
7410 res, err := c.doRequest("json")
7411 if res != nil && res.StatusCode == http.StatusNotModified {
7412 if res.Body != nil {
7413 res.Body.Close()
7414 }
7415 return nil, gensupport.WrapError(&googleapi.Error{
7416 Code: res.StatusCode,
7417 Header: res.Header,
7418 })
7419 }
7420 if err != nil {
7421 return nil, err
7422 }
7423 defer googleapi.CloseBody(res)
7424 if err := googleapi.CheckResponse(res); err != nil {
7425 return nil, gensupport.WrapError(err)
7426 }
7427 ret := &PrintServer{
7428 ServerResponse: googleapi.ServerResponse{
7429 Header: res.Header,
7430 HTTPStatusCode: res.StatusCode,
7431 },
7432 }
7433 target := &ret
7434 if err := gensupport.DecodeResponse(target, res); err != nil {
7435 return nil, err
7436 }
7437 return ret, nil
7438 }
7439
7440 type CustomersChromePrintServersDeleteCall struct {
7441 s *Service
7442 name string
7443 urlParams_ gensupport.URLParams
7444 ctx_ context.Context
7445 header_ http.Header
7446 }
7447
7448
7449
7450
7451
7452 func (r *CustomersChromePrintServersService) Delete(name string) *CustomersChromePrintServersDeleteCall {
7453 c := &CustomersChromePrintServersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7454 c.name = name
7455 return c
7456 }
7457
7458
7459
7460
7461 func (c *CustomersChromePrintServersDeleteCall) Fields(s ...googleapi.Field) *CustomersChromePrintServersDeleteCall {
7462 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7463 return c
7464 }
7465
7466
7467 func (c *CustomersChromePrintServersDeleteCall) Context(ctx context.Context) *CustomersChromePrintServersDeleteCall {
7468 c.ctx_ = ctx
7469 return c
7470 }
7471
7472
7473
7474 func (c *CustomersChromePrintServersDeleteCall) Header() http.Header {
7475 if c.header_ == nil {
7476 c.header_ = make(http.Header)
7477 }
7478 return c.header_
7479 }
7480
7481 func (c *CustomersChromePrintServersDeleteCall) doRequest(alt string) (*http.Response, error) {
7482 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7483 var body io.Reader = nil
7484 c.urlParams_.Set("alt", alt)
7485 c.urlParams_.Set("prettyPrint", "false")
7486 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+name}")
7487 urls += "?" + c.urlParams_.Encode()
7488 req, err := http.NewRequest("DELETE", urls, body)
7489 if err != nil {
7490 return nil, err
7491 }
7492 req.Header = reqHeaders
7493 googleapi.Expand(req.URL, map[string]string{
7494 "name": c.name,
7495 })
7496 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7497 }
7498
7499
7500
7501
7502
7503
7504 func (c *CustomersChromePrintServersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7505 gensupport.SetOptions(c.urlParams_, opts...)
7506 res, err := c.doRequest("json")
7507 if res != nil && res.StatusCode == http.StatusNotModified {
7508 if res.Body != nil {
7509 res.Body.Close()
7510 }
7511 return nil, gensupport.WrapError(&googleapi.Error{
7512 Code: res.StatusCode,
7513 Header: res.Header,
7514 })
7515 }
7516 if err != nil {
7517 return nil, err
7518 }
7519 defer googleapi.CloseBody(res)
7520 if err := googleapi.CheckResponse(res); err != nil {
7521 return nil, gensupport.WrapError(err)
7522 }
7523 ret := &Empty{
7524 ServerResponse: googleapi.ServerResponse{
7525 Header: res.Header,
7526 HTTPStatusCode: res.StatusCode,
7527 },
7528 }
7529 target := &ret
7530 if err := gensupport.DecodeResponse(target, res); err != nil {
7531 return nil, err
7532 }
7533 return ret, nil
7534 }
7535
7536 type CustomersChromePrintServersGetCall struct {
7537 s *Service
7538 name string
7539 urlParams_ gensupport.URLParams
7540 ifNoneMatch_ string
7541 ctx_ context.Context
7542 header_ http.Header
7543 }
7544
7545
7546
7547
7548
7549
7550 func (r *CustomersChromePrintServersService) Get(name string) *CustomersChromePrintServersGetCall {
7551 c := &CustomersChromePrintServersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7552 c.name = name
7553 return c
7554 }
7555
7556
7557
7558
7559 func (c *CustomersChromePrintServersGetCall) Fields(s ...googleapi.Field) *CustomersChromePrintServersGetCall {
7560 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7561 return c
7562 }
7563
7564
7565
7566
7567 func (c *CustomersChromePrintServersGetCall) IfNoneMatch(entityTag string) *CustomersChromePrintServersGetCall {
7568 c.ifNoneMatch_ = entityTag
7569 return c
7570 }
7571
7572
7573 func (c *CustomersChromePrintServersGetCall) Context(ctx context.Context) *CustomersChromePrintServersGetCall {
7574 c.ctx_ = ctx
7575 return c
7576 }
7577
7578
7579
7580 func (c *CustomersChromePrintServersGetCall) Header() http.Header {
7581 if c.header_ == nil {
7582 c.header_ = make(http.Header)
7583 }
7584 return c.header_
7585 }
7586
7587 func (c *CustomersChromePrintServersGetCall) doRequest(alt string) (*http.Response, error) {
7588 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7589 if c.ifNoneMatch_ != "" {
7590 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7591 }
7592 var body io.Reader = nil
7593 c.urlParams_.Set("alt", alt)
7594 c.urlParams_.Set("prettyPrint", "false")
7595 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+name}")
7596 urls += "?" + c.urlParams_.Encode()
7597 req, err := http.NewRequest("GET", urls, body)
7598 if err != nil {
7599 return nil, err
7600 }
7601 req.Header = reqHeaders
7602 googleapi.Expand(req.URL, map[string]string{
7603 "name": c.name,
7604 })
7605 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7606 }
7607
7608
7609
7610
7611
7612
7613 func (c *CustomersChromePrintServersGetCall) Do(opts ...googleapi.CallOption) (*PrintServer, error) {
7614 gensupport.SetOptions(c.urlParams_, opts...)
7615 res, err := c.doRequest("json")
7616 if res != nil && res.StatusCode == http.StatusNotModified {
7617 if res.Body != nil {
7618 res.Body.Close()
7619 }
7620 return nil, gensupport.WrapError(&googleapi.Error{
7621 Code: res.StatusCode,
7622 Header: res.Header,
7623 })
7624 }
7625 if err != nil {
7626 return nil, err
7627 }
7628 defer googleapi.CloseBody(res)
7629 if err := googleapi.CheckResponse(res); err != nil {
7630 return nil, gensupport.WrapError(err)
7631 }
7632 ret := &PrintServer{
7633 ServerResponse: googleapi.ServerResponse{
7634 Header: res.Header,
7635 HTTPStatusCode: res.StatusCode,
7636 },
7637 }
7638 target := &ret
7639 if err := gensupport.DecodeResponse(target, res); err != nil {
7640 return nil, err
7641 }
7642 return ret, nil
7643 }
7644
7645 type CustomersChromePrintServersListCall struct {
7646 s *Service
7647 parent string
7648 urlParams_ gensupport.URLParams
7649 ifNoneMatch_ string
7650 ctx_ context.Context
7651 header_ http.Header
7652 }
7653
7654
7655
7656
7657
7658
7659 func (r *CustomersChromePrintServersService) List(parent string) *CustomersChromePrintServersListCall {
7660 c := &CustomersChromePrintServersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7661 c.parent = parent
7662 return c
7663 }
7664
7665
7666
7667
7668
7669 func (c *CustomersChromePrintServersListCall) Filter(filter string) *CustomersChromePrintServersListCall {
7670 c.urlParams_.Set("filter", filter)
7671 return c
7672 }
7673
7674
7675
7676
7677
7678
7679
7680 func (c *CustomersChromePrintServersListCall) OrderBy(orderBy string) *CustomersChromePrintServersListCall {
7681 c.urlParams_.Set("orderBy", orderBy)
7682 return c
7683 }
7684
7685
7686
7687
7688
7689
7690
7691 func (c *CustomersChromePrintServersListCall) OrgUnitId(orgUnitId string) *CustomersChromePrintServersListCall {
7692 c.urlParams_.Set("orgUnitId", orgUnitId)
7693 return c
7694 }
7695
7696
7697
7698
7699 func (c *CustomersChromePrintServersListCall) PageSize(pageSize int64) *CustomersChromePrintServersListCall {
7700 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7701 return c
7702 }
7703
7704
7705
7706 func (c *CustomersChromePrintServersListCall) PageToken(pageToken string) *CustomersChromePrintServersListCall {
7707 c.urlParams_.Set("pageToken", pageToken)
7708 return c
7709 }
7710
7711
7712
7713
7714 func (c *CustomersChromePrintServersListCall) Fields(s ...googleapi.Field) *CustomersChromePrintServersListCall {
7715 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7716 return c
7717 }
7718
7719
7720
7721
7722 func (c *CustomersChromePrintServersListCall) IfNoneMatch(entityTag string) *CustomersChromePrintServersListCall {
7723 c.ifNoneMatch_ = entityTag
7724 return c
7725 }
7726
7727
7728 func (c *CustomersChromePrintServersListCall) Context(ctx context.Context) *CustomersChromePrintServersListCall {
7729 c.ctx_ = ctx
7730 return c
7731 }
7732
7733
7734
7735 func (c *CustomersChromePrintServersListCall) Header() http.Header {
7736 if c.header_ == nil {
7737 c.header_ = make(http.Header)
7738 }
7739 return c.header_
7740 }
7741
7742 func (c *CustomersChromePrintServersListCall) doRequest(alt string) (*http.Response, error) {
7743 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7744 if c.ifNoneMatch_ != "" {
7745 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7746 }
7747 var body io.Reader = nil
7748 c.urlParams_.Set("alt", alt)
7749 c.urlParams_.Set("prettyPrint", "false")
7750 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printServers")
7751 urls += "?" + c.urlParams_.Encode()
7752 req, err := http.NewRequest("GET", urls, body)
7753 if err != nil {
7754 return nil, err
7755 }
7756 req.Header = reqHeaders
7757 googleapi.Expand(req.URL, map[string]string{
7758 "parent": c.parent,
7759 })
7760 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7761 }
7762
7763
7764
7765
7766
7767
7768
7769 func (c *CustomersChromePrintServersListCall) Do(opts ...googleapi.CallOption) (*ListPrintServersResponse, error) {
7770 gensupport.SetOptions(c.urlParams_, opts...)
7771 res, err := c.doRequest("json")
7772 if res != nil && res.StatusCode == http.StatusNotModified {
7773 if res.Body != nil {
7774 res.Body.Close()
7775 }
7776 return nil, gensupport.WrapError(&googleapi.Error{
7777 Code: res.StatusCode,
7778 Header: res.Header,
7779 })
7780 }
7781 if err != nil {
7782 return nil, err
7783 }
7784 defer googleapi.CloseBody(res)
7785 if err := googleapi.CheckResponse(res); err != nil {
7786 return nil, gensupport.WrapError(err)
7787 }
7788 ret := &ListPrintServersResponse{
7789 ServerResponse: googleapi.ServerResponse{
7790 Header: res.Header,
7791 HTTPStatusCode: res.StatusCode,
7792 },
7793 }
7794 target := &ret
7795 if err := gensupport.DecodeResponse(target, res); err != nil {
7796 return nil, err
7797 }
7798 return ret, nil
7799 }
7800
7801
7802
7803
7804 func (c *CustomersChromePrintServersListCall) Pages(ctx context.Context, f func(*ListPrintServersResponse) error) error {
7805 c.ctx_ = ctx
7806 defer c.PageToken(c.urlParams_.Get("pageToken"))
7807 for {
7808 x, err := c.Do()
7809 if err != nil {
7810 return err
7811 }
7812 if err := f(x); err != nil {
7813 return err
7814 }
7815 if x.NextPageToken == "" {
7816 return nil
7817 }
7818 c.PageToken(x.NextPageToken)
7819 }
7820 }
7821
7822 type CustomersChromePrintServersPatchCall struct {
7823 s *Service
7824 name string
7825 printserver *PrintServer
7826 urlParams_ gensupport.URLParams
7827 ctx_ context.Context
7828 header_ http.Header
7829 }
7830
7831
7832
7833
7834
7835 func (r *CustomersChromePrintServersService) Patch(name string, printserver *PrintServer) *CustomersChromePrintServersPatchCall {
7836 c := &CustomersChromePrintServersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7837 c.name = name
7838 c.printserver = printserver
7839 return c
7840 }
7841
7842
7843
7844
7845 func (c *CustomersChromePrintServersPatchCall) UpdateMask(updateMask string) *CustomersChromePrintServersPatchCall {
7846 c.urlParams_.Set("updateMask", updateMask)
7847 return c
7848 }
7849
7850
7851
7852
7853 func (c *CustomersChromePrintServersPatchCall) Fields(s ...googleapi.Field) *CustomersChromePrintServersPatchCall {
7854 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7855 return c
7856 }
7857
7858
7859 func (c *CustomersChromePrintServersPatchCall) Context(ctx context.Context) *CustomersChromePrintServersPatchCall {
7860 c.ctx_ = ctx
7861 return c
7862 }
7863
7864
7865
7866 func (c *CustomersChromePrintServersPatchCall) Header() http.Header {
7867 if c.header_ == nil {
7868 c.header_ = make(http.Header)
7869 }
7870 return c.header_
7871 }
7872
7873 func (c *CustomersChromePrintServersPatchCall) doRequest(alt string) (*http.Response, error) {
7874 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7875 var body io.Reader = nil
7876 body, err := googleapi.WithoutDataWrapper.JSONReader(c.printserver)
7877 if err != nil {
7878 return nil, err
7879 }
7880 c.urlParams_.Set("alt", alt)
7881 c.urlParams_.Set("prettyPrint", "false")
7882 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+name}")
7883 urls += "?" + c.urlParams_.Encode()
7884 req, err := http.NewRequest("PATCH", urls, body)
7885 if err != nil {
7886 return nil, err
7887 }
7888 req.Header = reqHeaders
7889 googleapi.Expand(req.URL, map[string]string{
7890 "name": c.name,
7891 })
7892 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7893 }
7894
7895
7896
7897
7898
7899
7900 func (c *CustomersChromePrintServersPatchCall) Do(opts ...googleapi.CallOption) (*PrintServer, error) {
7901 gensupport.SetOptions(c.urlParams_, opts...)
7902 res, err := c.doRequest("json")
7903 if res != nil && res.StatusCode == http.StatusNotModified {
7904 if res.Body != nil {
7905 res.Body.Close()
7906 }
7907 return nil, gensupport.WrapError(&googleapi.Error{
7908 Code: res.StatusCode,
7909 Header: res.Header,
7910 })
7911 }
7912 if err != nil {
7913 return nil, err
7914 }
7915 defer googleapi.CloseBody(res)
7916 if err := googleapi.CheckResponse(res); err != nil {
7917 return nil, gensupport.WrapError(err)
7918 }
7919 ret := &PrintServer{
7920 ServerResponse: googleapi.ServerResponse{
7921 Header: res.Header,
7922 HTTPStatusCode: res.StatusCode,
7923 },
7924 }
7925 target := &ret
7926 if err := gensupport.DecodeResponse(target, res); err != nil {
7927 return nil, err
7928 }
7929 return ret, nil
7930 }
7931
7932 type CustomersChromePrintersBatchCreatePrintersCall struct {
7933 s *Service
7934 parent string
7935 batchcreateprintersrequest *BatchCreatePrintersRequest
7936 urlParams_ gensupport.URLParams
7937 ctx_ context.Context
7938 header_ http.Header
7939 }
7940
7941
7942
7943
7944 func (r *CustomersChromePrintersService) BatchCreatePrinters(parent string, batchcreateprintersrequest *BatchCreatePrintersRequest) *CustomersChromePrintersBatchCreatePrintersCall {
7945 c := &CustomersChromePrintersBatchCreatePrintersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7946 c.parent = parent
7947 c.batchcreateprintersrequest = batchcreateprintersrequest
7948 return c
7949 }
7950
7951
7952
7953
7954 func (c *CustomersChromePrintersBatchCreatePrintersCall) Fields(s ...googleapi.Field) *CustomersChromePrintersBatchCreatePrintersCall {
7955 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7956 return c
7957 }
7958
7959
7960 func (c *CustomersChromePrintersBatchCreatePrintersCall) Context(ctx context.Context) *CustomersChromePrintersBatchCreatePrintersCall {
7961 c.ctx_ = ctx
7962 return c
7963 }
7964
7965
7966
7967 func (c *CustomersChromePrintersBatchCreatePrintersCall) Header() http.Header {
7968 if c.header_ == nil {
7969 c.header_ = make(http.Header)
7970 }
7971 return c.header_
7972 }
7973
7974 func (c *CustomersChromePrintersBatchCreatePrintersCall) doRequest(alt string) (*http.Response, error) {
7975 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7976 var body io.Reader = nil
7977 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreateprintersrequest)
7978 if err != nil {
7979 return nil, err
7980 }
7981 c.urlParams_.Set("alt", alt)
7982 c.urlParams_.Set("prettyPrint", "false")
7983 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printers:batchCreatePrinters")
7984 urls += "?" + c.urlParams_.Encode()
7985 req, err := http.NewRequest("POST", urls, body)
7986 if err != nil {
7987 return nil, err
7988 }
7989 req.Header = reqHeaders
7990 googleapi.Expand(req.URL, map[string]string{
7991 "parent": c.parent,
7992 })
7993 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7994 }
7995
7996
7997
7998
7999
8000
8001
8002 func (c *CustomersChromePrintersBatchCreatePrintersCall) Do(opts ...googleapi.CallOption) (*BatchCreatePrintersResponse, error) {
8003 gensupport.SetOptions(c.urlParams_, opts...)
8004 res, err := c.doRequest("json")
8005 if res != nil && res.StatusCode == http.StatusNotModified {
8006 if res.Body != nil {
8007 res.Body.Close()
8008 }
8009 return nil, gensupport.WrapError(&googleapi.Error{
8010 Code: res.StatusCode,
8011 Header: res.Header,
8012 })
8013 }
8014 if err != nil {
8015 return nil, err
8016 }
8017 defer googleapi.CloseBody(res)
8018 if err := googleapi.CheckResponse(res); err != nil {
8019 return nil, gensupport.WrapError(err)
8020 }
8021 ret := &BatchCreatePrintersResponse{
8022 ServerResponse: googleapi.ServerResponse{
8023 Header: res.Header,
8024 HTTPStatusCode: res.StatusCode,
8025 },
8026 }
8027 target := &ret
8028 if err := gensupport.DecodeResponse(target, res); err != nil {
8029 return nil, err
8030 }
8031 return ret, nil
8032 }
8033
8034 type CustomersChromePrintersBatchDeletePrintersCall struct {
8035 s *Service
8036 parent string
8037 batchdeleteprintersrequest *BatchDeletePrintersRequest
8038 urlParams_ gensupport.URLParams
8039 ctx_ context.Context
8040 header_ http.Header
8041 }
8042
8043
8044
8045
8046 func (r *CustomersChromePrintersService) BatchDeletePrinters(parent string, batchdeleteprintersrequest *BatchDeletePrintersRequest) *CustomersChromePrintersBatchDeletePrintersCall {
8047 c := &CustomersChromePrintersBatchDeletePrintersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8048 c.parent = parent
8049 c.batchdeleteprintersrequest = batchdeleteprintersrequest
8050 return c
8051 }
8052
8053
8054
8055
8056 func (c *CustomersChromePrintersBatchDeletePrintersCall) Fields(s ...googleapi.Field) *CustomersChromePrintersBatchDeletePrintersCall {
8057 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8058 return c
8059 }
8060
8061
8062 func (c *CustomersChromePrintersBatchDeletePrintersCall) Context(ctx context.Context) *CustomersChromePrintersBatchDeletePrintersCall {
8063 c.ctx_ = ctx
8064 return c
8065 }
8066
8067
8068
8069 func (c *CustomersChromePrintersBatchDeletePrintersCall) Header() http.Header {
8070 if c.header_ == nil {
8071 c.header_ = make(http.Header)
8072 }
8073 return c.header_
8074 }
8075
8076 func (c *CustomersChromePrintersBatchDeletePrintersCall) doRequest(alt string) (*http.Response, error) {
8077 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8078 var body io.Reader = nil
8079 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchdeleteprintersrequest)
8080 if err != nil {
8081 return nil, err
8082 }
8083 c.urlParams_.Set("alt", alt)
8084 c.urlParams_.Set("prettyPrint", "false")
8085 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printers:batchDeletePrinters")
8086 urls += "?" + c.urlParams_.Encode()
8087 req, err := http.NewRequest("POST", urls, body)
8088 if err != nil {
8089 return nil, err
8090 }
8091 req.Header = reqHeaders
8092 googleapi.Expand(req.URL, map[string]string{
8093 "parent": c.parent,
8094 })
8095 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8096 }
8097
8098
8099
8100
8101
8102
8103
8104 func (c *CustomersChromePrintersBatchDeletePrintersCall) Do(opts ...googleapi.CallOption) (*BatchDeletePrintersResponse, error) {
8105 gensupport.SetOptions(c.urlParams_, opts...)
8106 res, err := c.doRequest("json")
8107 if res != nil && res.StatusCode == http.StatusNotModified {
8108 if res.Body != nil {
8109 res.Body.Close()
8110 }
8111 return nil, gensupport.WrapError(&googleapi.Error{
8112 Code: res.StatusCode,
8113 Header: res.Header,
8114 })
8115 }
8116 if err != nil {
8117 return nil, err
8118 }
8119 defer googleapi.CloseBody(res)
8120 if err := googleapi.CheckResponse(res); err != nil {
8121 return nil, gensupport.WrapError(err)
8122 }
8123 ret := &BatchDeletePrintersResponse{
8124 ServerResponse: googleapi.ServerResponse{
8125 Header: res.Header,
8126 HTTPStatusCode: res.StatusCode,
8127 },
8128 }
8129 target := &ret
8130 if err := gensupport.DecodeResponse(target, res); err != nil {
8131 return nil, err
8132 }
8133 return ret, nil
8134 }
8135
8136 type CustomersChromePrintersCreateCall struct {
8137 s *Service
8138 parent string
8139 printer *Printer
8140 urlParams_ gensupport.URLParams
8141 ctx_ context.Context
8142 header_ http.Header
8143 }
8144
8145
8146
8147
8148 func (r *CustomersChromePrintersService) Create(parent string, printer *Printer) *CustomersChromePrintersCreateCall {
8149 c := &CustomersChromePrintersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8150 c.parent = parent
8151 c.printer = printer
8152 return c
8153 }
8154
8155
8156
8157
8158 func (c *CustomersChromePrintersCreateCall) Fields(s ...googleapi.Field) *CustomersChromePrintersCreateCall {
8159 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8160 return c
8161 }
8162
8163
8164 func (c *CustomersChromePrintersCreateCall) Context(ctx context.Context) *CustomersChromePrintersCreateCall {
8165 c.ctx_ = ctx
8166 return c
8167 }
8168
8169
8170
8171 func (c *CustomersChromePrintersCreateCall) Header() http.Header {
8172 if c.header_ == nil {
8173 c.header_ = make(http.Header)
8174 }
8175 return c.header_
8176 }
8177
8178 func (c *CustomersChromePrintersCreateCall) doRequest(alt string) (*http.Response, error) {
8179 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8180 var body io.Reader = nil
8181 body, err := googleapi.WithoutDataWrapper.JSONReader(c.printer)
8182 if err != nil {
8183 return nil, err
8184 }
8185 c.urlParams_.Set("alt", alt)
8186 c.urlParams_.Set("prettyPrint", "false")
8187 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printers")
8188 urls += "?" + c.urlParams_.Encode()
8189 req, err := http.NewRequest("POST", urls, body)
8190 if err != nil {
8191 return nil, err
8192 }
8193 req.Header = reqHeaders
8194 googleapi.Expand(req.URL, map[string]string{
8195 "parent": c.parent,
8196 })
8197 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8198 }
8199
8200
8201
8202
8203
8204
8205 func (c *CustomersChromePrintersCreateCall) Do(opts ...googleapi.CallOption) (*Printer, error) {
8206 gensupport.SetOptions(c.urlParams_, opts...)
8207 res, err := c.doRequest("json")
8208 if res != nil && res.StatusCode == http.StatusNotModified {
8209 if res.Body != nil {
8210 res.Body.Close()
8211 }
8212 return nil, gensupport.WrapError(&googleapi.Error{
8213 Code: res.StatusCode,
8214 Header: res.Header,
8215 })
8216 }
8217 if err != nil {
8218 return nil, err
8219 }
8220 defer googleapi.CloseBody(res)
8221 if err := googleapi.CheckResponse(res); err != nil {
8222 return nil, gensupport.WrapError(err)
8223 }
8224 ret := &Printer{
8225 ServerResponse: googleapi.ServerResponse{
8226 Header: res.Header,
8227 HTTPStatusCode: res.StatusCode,
8228 },
8229 }
8230 target := &ret
8231 if err := gensupport.DecodeResponse(target, res); err != nil {
8232 return nil, err
8233 }
8234 return ret, nil
8235 }
8236
8237 type CustomersChromePrintersDeleteCall struct {
8238 s *Service
8239 name string
8240 urlParams_ gensupport.URLParams
8241 ctx_ context.Context
8242 header_ http.Header
8243 }
8244
8245
8246
8247
8248
8249 func (r *CustomersChromePrintersService) Delete(name string) *CustomersChromePrintersDeleteCall {
8250 c := &CustomersChromePrintersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8251 c.name = name
8252 return c
8253 }
8254
8255
8256
8257
8258 func (c *CustomersChromePrintersDeleteCall) Fields(s ...googleapi.Field) *CustomersChromePrintersDeleteCall {
8259 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8260 return c
8261 }
8262
8263
8264 func (c *CustomersChromePrintersDeleteCall) Context(ctx context.Context) *CustomersChromePrintersDeleteCall {
8265 c.ctx_ = ctx
8266 return c
8267 }
8268
8269
8270
8271 func (c *CustomersChromePrintersDeleteCall) Header() http.Header {
8272 if c.header_ == nil {
8273 c.header_ = make(http.Header)
8274 }
8275 return c.header_
8276 }
8277
8278 func (c *CustomersChromePrintersDeleteCall) doRequest(alt string) (*http.Response, error) {
8279 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8280 var body io.Reader = nil
8281 c.urlParams_.Set("alt", alt)
8282 c.urlParams_.Set("prettyPrint", "false")
8283 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+name}")
8284 urls += "?" + c.urlParams_.Encode()
8285 req, err := http.NewRequest("DELETE", urls, body)
8286 if err != nil {
8287 return nil, err
8288 }
8289 req.Header = reqHeaders
8290 googleapi.Expand(req.URL, map[string]string{
8291 "name": c.name,
8292 })
8293 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8294 }
8295
8296
8297
8298
8299
8300
8301 func (c *CustomersChromePrintersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8302 gensupport.SetOptions(c.urlParams_, opts...)
8303 res, err := c.doRequest("json")
8304 if res != nil && res.StatusCode == http.StatusNotModified {
8305 if res.Body != nil {
8306 res.Body.Close()
8307 }
8308 return nil, gensupport.WrapError(&googleapi.Error{
8309 Code: res.StatusCode,
8310 Header: res.Header,
8311 })
8312 }
8313 if err != nil {
8314 return nil, err
8315 }
8316 defer googleapi.CloseBody(res)
8317 if err := googleapi.CheckResponse(res); err != nil {
8318 return nil, gensupport.WrapError(err)
8319 }
8320 ret := &Empty{
8321 ServerResponse: googleapi.ServerResponse{
8322 Header: res.Header,
8323 HTTPStatusCode: res.StatusCode,
8324 },
8325 }
8326 target := &ret
8327 if err := gensupport.DecodeResponse(target, res); err != nil {
8328 return nil, err
8329 }
8330 return ret, nil
8331 }
8332
8333 type CustomersChromePrintersGetCall struct {
8334 s *Service
8335 name string
8336 urlParams_ gensupport.URLParams
8337 ifNoneMatch_ string
8338 ctx_ context.Context
8339 header_ http.Header
8340 }
8341
8342
8343
8344
8345
8346 func (r *CustomersChromePrintersService) Get(name string) *CustomersChromePrintersGetCall {
8347 c := &CustomersChromePrintersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8348 c.name = name
8349 return c
8350 }
8351
8352
8353
8354
8355 func (c *CustomersChromePrintersGetCall) Fields(s ...googleapi.Field) *CustomersChromePrintersGetCall {
8356 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8357 return c
8358 }
8359
8360
8361
8362
8363 func (c *CustomersChromePrintersGetCall) IfNoneMatch(entityTag string) *CustomersChromePrintersGetCall {
8364 c.ifNoneMatch_ = entityTag
8365 return c
8366 }
8367
8368
8369 func (c *CustomersChromePrintersGetCall) Context(ctx context.Context) *CustomersChromePrintersGetCall {
8370 c.ctx_ = ctx
8371 return c
8372 }
8373
8374
8375
8376 func (c *CustomersChromePrintersGetCall) Header() http.Header {
8377 if c.header_ == nil {
8378 c.header_ = make(http.Header)
8379 }
8380 return c.header_
8381 }
8382
8383 func (c *CustomersChromePrintersGetCall) doRequest(alt string) (*http.Response, error) {
8384 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8385 if c.ifNoneMatch_ != "" {
8386 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8387 }
8388 var body io.Reader = nil
8389 c.urlParams_.Set("alt", alt)
8390 c.urlParams_.Set("prettyPrint", "false")
8391 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+name}")
8392 urls += "?" + c.urlParams_.Encode()
8393 req, err := http.NewRequest("GET", urls, body)
8394 if err != nil {
8395 return nil, err
8396 }
8397 req.Header = reqHeaders
8398 googleapi.Expand(req.URL, map[string]string{
8399 "name": c.name,
8400 })
8401 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8402 }
8403
8404
8405
8406
8407
8408
8409 func (c *CustomersChromePrintersGetCall) Do(opts ...googleapi.CallOption) (*Printer, error) {
8410 gensupport.SetOptions(c.urlParams_, opts...)
8411 res, err := c.doRequest("json")
8412 if res != nil && res.StatusCode == http.StatusNotModified {
8413 if res.Body != nil {
8414 res.Body.Close()
8415 }
8416 return nil, gensupport.WrapError(&googleapi.Error{
8417 Code: res.StatusCode,
8418 Header: res.Header,
8419 })
8420 }
8421 if err != nil {
8422 return nil, err
8423 }
8424 defer googleapi.CloseBody(res)
8425 if err := googleapi.CheckResponse(res); err != nil {
8426 return nil, gensupport.WrapError(err)
8427 }
8428 ret := &Printer{
8429 ServerResponse: googleapi.ServerResponse{
8430 Header: res.Header,
8431 HTTPStatusCode: res.StatusCode,
8432 },
8433 }
8434 target := &ret
8435 if err := gensupport.DecodeResponse(target, res); err != nil {
8436 return nil, err
8437 }
8438 return ret, nil
8439 }
8440
8441 type CustomersChromePrintersListCall struct {
8442 s *Service
8443 parent string
8444 urlParams_ gensupport.URLParams
8445 ifNoneMatch_ string
8446 ctx_ context.Context
8447 header_ http.Header
8448 }
8449
8450
8451
8452
8453
8454 func (r *CustomersChromePrintersService) List(parent string) *CustomersChromePrintersListCall {
8455 c := &CustomersChromePrintersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8456 c.parent = parent
8457 return c
8458 }
8459
8460
8461
8462 func (c *CustomersChromePrintersListCall) Filter(filter string) *CustomersChromePrintersListCall {
8463 c.urlParams_.Set("filter", filter)
8464 return c
8465 }
8466
8467
8468
8469
8470
8471
8472 func (c *CustomersChromePrintersListCall) OrderBy(orderBy string) *CustomersChromePrintersListCall {
8473 c.urlParams_.Set("orderBy", orderBy)
8474 return c
8475 }
8476
8477
8478
8479
8480
8481
8482
8483 func (c *CustomersChromePrintersListCall) OrgUnitId(orgUnitId string) *CustomersChromePrintersListCall {
8484 c.urlParams_.Set("orgUnitId", orgUnitId)
8485 return c
8486 }
8487
8488
8489
8490 func (c *CustomersChromePrintersListCall) PageSize(pageSize int64) *CustomersChromePrintersListCall {
8491 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8492 return c
8493 }
8494
8495
8496
8497 func (c *CustomersChromePrintersListCall) PageToken(pageToken string) *CustomersChromePrintersListCall {
8498 c.urlParams_.Set("pageToken", pageToken)
8499 return c
8500 }
8501
8502
8503
8504
8505 func (c *CustomersChromePrintersListCall) Fields(s ...googleapi.Field) *CustomersChromePrintersListCall {
8506 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8507 return c
8508 }
8509
8510
8511
8512
8513 func (c *CustomersChromePrintersListCall) IfNoneMatch(entityTag string) *CustomersChromePrintersListCall {
8514 c.ifNoneMatch_ = entityTag
8515 return c
8516 }
8517
8518
8519 func (c *CustomersChromePrintersListCall) Context(ctx context.Context) *CustomersChromePrintersListCall {
8520 c.ctx_ = ctx
8521 return c
8522 }
8523
8524
8525
8526 func (c *CustomersChromePrintersListCall) Header() http.Header {
8527 if c.header_ == nil {
8528 c.header_ = make(http.Header)
8529 }
8530 return c.header_
8531 }
8532
8533 func (c *CustomersChromePrintersListCall) doRequest(alt string) (*http.Response, error) {
8534 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8535 if c.ifNoneMatch_ != "" {
8536 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8537 }
8538 var body io.Reader = nil
8539 c.urlParams_.Set("alt", alt)
8540 c.urlParams_.Set("prettyPrint", "false")
8541 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printers")
8542 urls += "?" + c.urlParams_.Encode()
8543 req, err := http.NewRequest("GET", urls, body)
8544 if err != nil {
8545 return nil, err
8546 }
8547 req.Header = reqHeaders
8548 googleapi.Expand(req.URL, map[string]string{
8549 "parent": c.parent,
8550 })
8551 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8552 }
8553
8554
8555
8556
8557
8558
8559
8560 func (c *CustomersChromePrintersListCall) Do(opts ...googleapi.CallOption) (*ListPrintersResponse, error) {
8561 gensupport.SetOptions(c.urlParams_, opts...)
8562 res, err := c.doRequest("json")
8563 if res != nil && res.StatusCode == http.StatusNotModified {
8564 if res.Body != nil {
8565 res.Body.Close()
8566 }
8567 return nil, gensupport.WrapError(&googleapi.Error{
8568 Code: res.StatusCode,
8569 Header: res.Header,
8570 })
8571 }
8572 if err != nil {
8573 return nil, err
8574 }
8575 defer googleapi.CloseBody(res)
8576 if err := googleapi.CheckResponse(res); err != nil {
8577 return nil, gensupport.WrapError(err)
8578 }
8579 ret := &ListPrintersResponse{
8580 ServerResponse: googleapi.ServerResponse{
8581 Header: res.Header,
8582 HTTPStatusCode: res.StatusCode,
8583 },
8584 }
8585 target := &ret
8586 if err := gensupport.DecodeResponse(target, res); err != nil {
8587 return nil, err
8588 }
8589 return ret, nil
8590 }
8591
8592
8593
8594
8595 func (c *CustomersChromePrintersListCall) Pages(ctx context.Context, f func(*ListPrintersResponse) error) error {
8596 c.ctx_ = ctx
8597 defer c.PageToken(c.urlParams_.Get("pageToken"))
8598 for {
8599 x, err := c.Do()
8600 if err != nil {
8601 return err
8602 }
8603 if err := f(x); err != nil {
8604 return err
8605 }
8606 if x.NextPageToken == "" {
8607 return nil
8608 }
8609 c.PageToken(x.NextPageToken)
8610 }
8611 }
8612
8613 type CustomersChromePrintersListPrinterModelsCall struct {
8614 s *Service
8615 parent string
8616 urlParams_ gensupport.URLParams
8617 ifNoneMatch_ string
8618 ctx_ context.Context
8619 header_ http.Header
8620 }
8621
8622
8623
8624
8625
8626 func (r *CustomersChromePrintersService) ListPrinterModels(parent string) *CustomersChromePrintersListPrinterModelsCall {
8627 c := &CustomersChromePrintersListPrinterModelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8628 c.parent = parent
8629 return c
8630 }
8631
8632
8633
8634
8635 func (c *CustomersChromePrintersListPrinterModelsCall) Filter(filter string) *CustomersChromePrintersListPrinterModelsCall {
8636 c.urlParams_.Set("filter", filter)
8637 return c
8638 }
8639
8640
8641
8642 func (c *CustomersChromePrintersListPrinterModelsCall) PageSize(pageSize int64) *CustomersChromePrintersListPrinterModelsCall {
8643 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8644 return c
8645 }
8646
8647
8648
8649 func (c *CustomersChromePrintersListPrinterModelsCall) PageToken(pageToken string) *CustomersChromePrintersListPrinterModelsCall {
8650 c.urlParams_.Set("pageToken", pageToken)
8651 return c
8652 }
8653
8654
8655
8656
8657 func (c *CustomersChromePrintersListPrinterModelsCall) Fields(s ...googleapi.Field) *CustomersChromePrintersListPrinterModelsCall {
8658 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8659 return c
8660 }
8661
8662
8663
8664
8665 func (c *CustomersChromePrintersListPrinterModelsCall) IfNoneMatch(entityTag string) *CustomersChromePrintersListPrinterModelsCall {
8666 c.ifNoneMatch_ = entityTag
8667 return c
8668 }
8669
8670
8671 func (c *CustomersChromePrintersListPrinterModelsCall) Context(ctx context.Context) *CustomersChromePrintersListPrinterModelsCall {
8672 c.ctx_ = ctx
8673 return c
8674 }
8675
8676
8677
8678 func (c *CustomersChromePrintersListPrinterModelsCall) Header() http.Header {
8679 if c.header_ == nil {
8680 c.header_ = make(http.Header)
8681 }
8682 return c.header_
8683 }
8684
8685 func (c *CustomersChromePrintersListPrinterModelsCall) doRequest(alt string) (*http.Response, error) {
8686 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8687 if c.ifNoneMatch_ != "" {
8688 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8689 }
8690 var body io.Reader = nil
8691 c.urlParams_.Set("alt", alt)
8692 c.urlParams_.Set("prettyPrint", "false")
8693 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printers:listPrinterModels")
8694 urls += "?" + c.urlParams_.Encode()
8695 req, err := http.NewRequest("GET", urls, body)
8696 if err != nil {
8697 return nil, err
8698 }
8699 req.Header = reqHeaders
8700 googleapi.Expand(req.URL, map[string]string{
8701 "parent": c.parent,
8702 })
8703 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8704 }
8705
8706
8707
8708
8709
8710
8711
8712 func (c *CustomersChromePrintersListPrinterModelsCall) Do(opts ...googleapi.CallOption) (*ListPrinterModelsResponse, error) {
8713 gensupport.SetOptions(c.urlParams_, opts...)
8714 res, err := c.doRequest("json")
8715 if res != nil && res.StatusCode == http.StatusNotModified {
8716 if res.Body != nil {
8717 res.Body.Close()
8718 }
8719 return nil, gensupport.WrapError(&googleapi.Error{
8720 Code: res.StatusCode,
8721 Header: res.Header,
8722 })
8723 }
8724 if err != nil {
8725 return nil, err
8726 }
8727 defer googleapi.CloseBody(res)
8728 if err := googleapi.CheckResponse(res); err != nil {
8729 return nil, gensupport.WrapError(err)
8730 }
8731 ret := &ListPrinterModelsResponse{
8732 ServerResponse: googleapi.ServerResponse{
8733 Header: res.Header,
8734 HTTPStatusCode: res.StatusCode,
8735 },
8736 }
8737 target := &ret
8738 if err := gensupport.DecodeResponse(target, res); err != nil {
8739 return nil, err
8740 }
8741 return ret, nil
8742 }
8743
8744
8745
8746
8747 func (c *CustomersChromePrintersListPrinterModelsCall) Pages(ctx context.Context, f func(*ListPrinterModelsResponse) error) error {
8748 c.ctx_ = ctx
8749 defer c.PageToken(c.urlParams_.Get("pageToken"))
8750 for {
8751 x, err := c.Do()
8752 if err != nil {
8753 return err
8754 }
8755 if err := f(x); err != nil {
8756 return err
8757 }
8758 if x.NextPageToken == "" {
8759 return nil
8760 }
8761 c.PageToken(x.NextPageToken)
8762 }
8763 }
8764
8765 type CustomersChromePrintersPatchCall struct {
8766 s *Service
8767 name string
8768 printer *Printer
8769 urlParams_ gensupport.URLParams
8770 ctx_ context.Context
8771 header_ http.Header
8772 }
8773
8774
8775
8776
8777
8778
8779 func (r *CustomersChromePrintersService) Patch(name string, printer *Printer) *CustomersChromePrintersPatchCall {
8780 c := &CustomersChromePrintersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8781 c.name = name
8782 c.printer = printer
8783 return c
8784 }
8785
8786
8787
8788
8789 func (c *CustomersChromePrintersPatchCall) ClearMask(clearMask string) *CustomersChromePrintersPatchCall {
8790 c.urlParams_.Set("clearMask", clearMask)
8791 return c
8792 }
8793
8794
8795
8796
8797 func (c *CustomersChromePrintersPatchCall) UpdateMask(updateMask string) *CustomersChromePrintersPatchCall {
8798 c.urlParams_.Set("updateMask", updateMask)
8799 return c
8800 }
8801
8802
8803
8804
8805 func (c *CustomersChromePrintersPatchCall) Fields(s ...googleapi.Field) *CustomersChromePrintersPatchCall {
8806 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8807 return c
8808 }
8809
8810
8811 func (c *CustomersChromePrintersPatchCall) Context(ctx context.Context) *CustomersChromePrintersPatchCall {
8812 c.ctx_ = ctx
8813 return c
8814 }
8815
8816
8817
8818 func (c *CustomersChromePrintersPatchCall) Header() http.Header {
8819 if c.header_ == nil {
8820 c.header_ = make(http.Header)
8821 }
8822 return c.header_
8823 }
8824
8825 func (c *CustomersChromePrintersPatchCall) doRequest(alt string) (*http.Response, error) {
8826 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8827 var body io.Reader = nil
8828 body, err := googleapi.WithoutDataWrapper.JSONReader(c.printer)
8829 if err != nil {
8830 return nil, err
8831 }
8832 c.urlParams_.Set("alt", alt)
8833 c.urlParams_.Set("prettyPrint", "false")
8834 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+name}")
8835 urls += "?" + c.urlParams_.Encode()
8836 req, err := http.NewRequest("PATCH", urls, body)
8837 if err != nil {
8838 return nil, err
8839 }
8840 req.Header = reqHeaders
8841 googleapi.Expand(req.URL, map[string]string{
8842 "name": c.name,
8843 })
8844 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8845 }
8846
8847
8848
8849
8850
8851
8852 func (c *CustomersChromePrintersPatchCall) Do(opts ...googleapi.CallOption) (*Printer, error) {
8853 gensupport.SetOptions(c.urlParams_, opts...)
8854 res, err := c.doRequest("json")
8855 if res != nil && res.StatusCode == http.StatusNotModified {
8856 if res.Body != nil {
8857 res.Body.Close()
8858 }
8859 return nil, gensupport.WrapError(&googleapi.Error{
8860 Code: res.StatusCode,
8861 Header: res.Header,
8862 })
8863 }
8864 if err != nil {
8865 return nil, err
8866 }
8867 defer googleapi.CloseBody(res)
8868 if err := googleapi.CheckResponse(res); err != nil {
8869 return nil, gensupport.WrapError(err)
8870 }
8871 ret := &Printer{
8872 ServerResponse: googleapi.ServerResponse{
8873 Header: res.Header,
8874 HTTPStatusCode: res.StatusCode,
8875 },
8876 }
8877 target := &ret
8878 if err := gensupport.DecodeResponse(target, res); err != nil {
8879 return nil, err
8880 }
8881 return ret, nil
8882 }
8883
8884 type DomainAliasesDeleteCall struct {
8885 s *Service
8886 customer string
8887 domainAliasName string
8888 urlParams_ gensupport.URLParams
8889 ctx_ context.Context
8890 header_ http.Header
8891 }
8892
8893
8894
8895
8896
8897 func (r *DomainAliasesService) Delete(customer string, domainAliasName string) *DomainAliasesDeleteCall {
8898 c := &DomainAliasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8899 c.customer = customer
8900 c.domainAliasName = domainAliasName
8901 return c
8902 }
8903
8904
8905
8906
8907 func (c *DomainAliasesDeleteCall) Fields(s ...googleapi.Field) *DomainAliasesDeleteCall {
8908 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8909 return c
8910 }
8911
8912
8913 func (c *DomainAliasesDeleteCall) Context(ctx context.Context) *DomainAliasesDeleteCall {
8914 c.ctx_ = ctx
8915 return c
8916 }
8917
8918
8919
8920 func (c *DomainAliasesDeleteCall) Header() http.Header {
8921 if c.header_ == nil {
8922 c.header_ = make(http.Header)
8923 }
8924 return c.header_
8925 }
8926
8927 func (c *DomainAliasesDeleteCall) doRequest(alt string) (*http.Response, error) {
8928 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8929 var body io.Reader = nil
8930 c.urlParams_.Set("alt", alt)
8931 c.urlParams_.Set("prettyPrint", "false")
8932 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}")
8933 urls += "?" + c.urlParams_.Encode()
8934 req, err := http.NewRequest("DELETE", urls, body)
8935 if err != nil {
8936 return nil, err
8937 }
8938 req.Header = reqHeaders
8939 googleapi.Expand(req.URL, map[string]string{
8940 "customer": c.customer,
8941 "domainAliasName": c.domainAliasName,
8942 })
8943 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8944 }
8945
8946
8947 func (c *DomainAliasesDeleteCall) Do(opts ...googleapi.CallOption) error {
8948 gensupport.SetOptions(c.urlParams_, opts...)
8949 res, err := c.doRequest("json")
8950 if err != nil {
8951 return err
8952 }
8953 defer googleapi.CloseBody(res)
8954 if err := googleapi.CheckResponse(res); err != nil {
8955 return gensupport.WrapError(err)
8956 }
8957 return nil
8958 }
8959
8960 type DomainAliasesGetCall struct {
8961 s *Service
8962 customer string
8963 domainAliasName string
8964 urlParams_ gensupport.URLParams
8965 ifNoneMatch_ string
8966 ctx_ context.Context
8967 header_ http.Header
8968 }
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980 func (r *DomainAliasesService) Get(customer string, domainAliasName string) *DomainAliasesGetCall {
8981 c := &DomainAliasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8982 c.customer = customer
8983 c.domainAliasName = domainAliasName
8984 return c
8985 }
8986
8987
8988
8989
8990 func (c *DomainAliasesGetCall) Fields(s ...googleapi.Field) *DomainAliasesGetCall {
8991 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8992 return c
8993 }
8994
8995
8996
8997
8998 func (c *DomainAliasesGetCall) IfNoneMatch(entityTag string) *DomainAliasesGetCall {
8999 c.ifNoneMatch_ = entityTag
9000 return c
9001 }
9002
9003
9004 func (c *DomainAliasesGetCall) Context(ctx context.Context) *DomainAliasesGetCall {
9005 c.ctx_ = ctx
9006 return c
9007 }
9008
9009
9010
9011 func (c *DomainAliasesGetCall) Header() http.Header {
9012 if c.header_ == nil {
9013 c.header_ = make(http.Header)
9014 }
9015 return c.header_
9016 }
9017
9018 func (c *DomainAliasesGetCall) doRequest(alt string) (*http.Response, error) {
9019 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9020 if c.ifNoneMatch_ != "" {
9021 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9022 }
9023 var body io.Reader = nil
9024 c.urlParams_.Set("alt", alt)
9025 c.urlParams_.Set("prettyPrint", "false")
9026 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}")
9027 urls += "?" + c.urlParams_.Encode()
9028 req, err := http.NewRequest("GET", urls, body)
9029 if err != nil {
9030 return nil, err
9031 }
9032 req.Header = reqHeaders
9033 googleapi.Expand(req.URL, map[string]string{
9034 "customer": c.customer,
9035 "domainAliasName": c.domainAliasName,
9036 })
9037 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9038 }
9039
9040
9041
9042
9043
9044
9045 func (c *DomainAliasesGetCall) Do(opts ...googleapi.CallOption) (*DomainAlias, error) {
9046 gensupport.SetOptions(c.urlParams_, opts...)
9047 res, err := c.doRequest("json")
9048 if res != nil && res.StatusCode == http.StatusNotModified {
9049 if res.Body != nil {
9050 res.Body.Close()
9051 }
9052 return nil, gensupport.WrapError(&googleapi.Error{
9053 Code: res.StatusCode,
9054 Header: res.Header,
9055 })
9056 }
9057 if err != nil {
9058 return nil, err
9059 }
9060 defer googleapi.CloseBody(res)
9061 if err := googleapi.CheckResponse(res); err != nil {
9062 return nil, gensupport.WrapError(err)
9063 }
9064 ret := &DomainAlias{
9065 ServerResponse: googleapi.ServerResponse{
9066 Header: res.Header,
9067 HTTPStatusCode: res.StatusCode,
9068 },
9069 }
9070 target := &ret
9071 if err := gensupport.DecodeResponse(target, res); err != nil {
9072 return nil, err
9073 }
9074 return ret, nil
9075 }
9076
9077 type DomainAliasesInsertCall struct {
9078 s *Service
9079 customer string
9080 domainalias *DomainAlias
9081 urlParams_ gensupport.URLParams
9082 ctx_ context.Context
9083 header_ http.Header
9084 }
9085
9086
9087
9088
9089 func (r *DomainAliasesService) Insert(customer string, domainalias *DomainAlias) *DomainAliasesInsertCall {
9090 c := &DomainAliasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9091 c.customer = customer
9092 c.domainalias = domainalias
9093 return c
9094 }
9095
9096
9097
9098
9099 func (c *DomainAliasesInsertCall) Fields(s ...googleapi.Field) *DomainAliasesInsertCall {
9100 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9101 return c
9102 }
9103
9104
9105 func (c *DomainAliasesInsertCall) Context(ctx context.Context) *DomainAliasesInsertCall {
9106 c.ctx_ = ctx
9107 return c
9108 }
9109
9110
9111
9112 func (c *DomainAliasesInsertCall) Header() http.Header {
9113 if c.header_ == nil {
9114 c.header_ = make(http.Header)
9115 }
9116 return c.header_
9117 }
9118
9119 func (c *DomainAliasesInsertCall) doRequest(alt string) (*http.Response, error) {
9120 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9121 var body io.Reader = nil
9122 body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainalias)
9123 if err != nil {
9124 return nil, err
9125 }
9126 c.urlParams_.Set("alt", alt)
9127 c.urlParams_.Set("prettyPrint", "false")
9128 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/domainaliases")
9129 urls += "?" + c.urlParams_.Encode()
9130 req, err := http.NewRequest("POST", urls, body)
9131 if err != nil {
9132 return nil, err
9133 }
9134 req.Header = reqHeaders
9135 googleapi.Expand(req.URL, map[string]string{
9136 "customer": c.customer,
9137 })
9138 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9139 }
9140
9141
9142
9143
9144
9145
9146 func (c *DomainAliasesInsertCall) Do(opts ...googleapi.CallOption) (*DomainAlias, error) {
9147 gensupport.SetOptions(c.urlParams_, opts...)
9148 res, err := c.doRequest("json")
9149 if res != nil && res.StatusCode == http.StatusNotModified {
9150 if res.Body != nil {
9151 res.Body.Close()
9152 }
9153 return nil, gensupport.WrapError(&googleapi.Error{
9154 Code: res.StatusCode,
9155 Header: res.Header,
9156 })
9157 }
9158 if err != nil {
9159 return nil, err
9160 }
9161 defer googleapi.CloseBody(res)
9162 if err := googleapi.CheckResponse(res); err != nil {
9163 return nil, gensupport.WrapError(err)
9164 }
9165 ret := &DomainAlias{
9166 ServerResponse: googleapi.ServerResponse{
9167 Header: res.Header,
9168 HTTPStatusCode: res.StatusCode,
9169 },
9170 }
9171 target := &ret
9172 if err := gensupport.DecodeResponse(target, res); err != nil {
9173 return nil, err
9174 }
9175 return ret, nil
9176 }
9177
9178 type DomainAliasesListCall struct {
9179 s *Service
9180 customer string
9181 urlParams_ gensupport.URLParams
9182 ifNoneMatch_ string
9183 ctx_ context.Context
9184 header_ http.Header
9185 }
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196 func (r *DomainAliasesService) List(customer string) *DomainAliasesListCall {
9197 c := &DomainAliasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9198 c.customer = customer
9199 return c
9200 }
9201
9202
9203
9204 func (c *DomainAliasesListCall) ParentDomainName(parentDomainName string) *DomainAliasesListCall {
9205 c.urlParams_.Set("parentDomainName", parentDomainName)
9206 return c
9207 }
9208
9209
9210
9211
9212 func (c *DomainAliasesListCall) Fields(s ...googleapi.Field) *DomainAliasesListCall {
9213 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9214 return c
9215 }
9216
9217
9218
9219
9220 func (c *DomainAliasesListCall) IfNoneMatch(entityTag string) *DomainAliasesListCall {
9221 c.ifNoneMatch_ = entityTag
9222 return c
9223 }
9224
9225
9226 func (c *DomainAliasesListCall) Context(ctx context.Context) *DomainAliasesListCall {
9227 c.ctx_ = ctx
9228 return c
9229 }
9230
9231
9232
9233 func (c *DomainAliasesListCall) Header() http.Header {
9234 if c.header_ == nil {
9235 c.header_ = make(http.Header)
9236 }
9237 return c.header_
9238 }
9239
9240 func (c *DomainAliasesListCall) doRequest(alt string) (*http.Response, error) {
9241 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9242 if c.ifNoneMatch_ != "" {
9243 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9244 }
9245 var body io.Reader = nil
9246 c.urlParams_.Set("alt", alt)
9247 c.urlParams_.Set("prettyPrint", "false")
9248 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/domainaliases")
9249 urls += "?" + c.urlParams_.Encode()
9250 req, err := http.NewRequest("GET", urls, body)
9251 if err != nil {
9252 return nil, err
9253 }
9254 req.Header = reqHeaders
9255 googleapi.Expand(req.URL, map[string]string{
9256 "customer": c.customer,
9257 })
9258 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9259 }
9260
9261
9262
9263
9264
9265
9266 func (c *DomainAliasesListCall) Do(opts ...googleapi.CallOption) (*DomainAliases, error) {
9267 gensupport.SetOptions(c.urlParams_, opts...)
9268 res, err := c.doRequest("json")
9269 if res != nil && res.StatusCode == http.StatusNotModified {
9270 if res.Body != nil {
9271 res.Body.Close()
9272 }
9273 return nil, gensupport.WrapError(&googleapi.Error{
9274 Code: res.StatusCode,
9275 Header: res.Header,
9276 })
9277 }
9278 if err != nil {
9279 return nil, err
9280 }
9281 defer googleapi.CloseBody(res)
9282 if err := googleapi.CheckResponse(res); err != nil {
9283 return nil, gensupport.WrapError(err)
9284 }
9285 ret := &DomainAliases{
9286 ServerResponse: googleapi.ServerResponse{
9287 Header: res.Header,
9288 HTTPStatusCode: res.StatusCode,
9289 },
9290 }
9291 target := &ret
9292 if err := gensupport.DecodeResponse(target, res); err != nil {
9293 return nil, err
9294 }
9295 return ret, nil
9296 }
9297
9298 type DomainsDeleteCall struct {
9299 s *Service
9300 customer string
9301 domainName string
9302 urlParams_ gensupport.URLParams
9303 ctx_ context.Context
9304 header_ http.Header
9305 }
9306
9307
9308
9309
9310
9311 func (r *DomainsService) Delete(customer string, domainName string) *DomainsDeleteCall {
9312 c := &DomainsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9313 c.customer = customer
9314 c.domainName = domainName
9315 return c
9316 }
9317
9318
9319
9320
9321 func (c *DomainsDeleteCall) Fields(s ...googleapi.Field) *DomainsDeleteCall {
9322 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9323 return c
9324 }
9325
9326
9327 func (c *DomainsDeleteCall) Context(ctx context.Context) *DomainsDeleteCall {
9328 c.ctx_ = ctx
9329 return c
9330 }
9331
9332
9333
9334 func (c *DomainsDeleteCall) Header() http.Header {
9335 if c.header_ == nil {
9336 c.header_ = make(http.Header)
9337 }
9338 return c.header_
9339 }
9340
9341 func (c *DomainsDeleteCall) doRequest(alt string) (*http.Response, error) {
9342 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9343 var body io.Reader = nil
9344 c.urlParams_.Set("alt", alt)
9345 c.urlParams_.Set("prettyPrint", "false")
9346 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/domains/{domainName}")
9347 urls += "?" + c.urlParams_.Encode()
9348 req, err := http.NewRequest("DELETE", urls, body)
9349 if err != nil {
9350 return nil, err
9351 }
9352 req.Header = reqHeaders
9353 googleapi.Expand(req.URL, map[string]string{
9354 "customer": c.customer,
9355 "domainName": c.domainName,
9356 })
9357 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9358 }
9359
9360
9361 func (c *DomainsDeleteCall) Do(opts ...googleapi.CallOption) error {
9362 gensupport.SetOptions(c.urlParams_, opts...)
9363 res, err := c.doRequest("json")
9364 if err != nil {
9365 return err
9366 }
9367 defer googleapi.CloseBody(res)
9368 if err := googleapi.CheckResponse(res); err != nil {
9369 return gensupport.WrapError(err)
9370 }
9371 return nil
9372 }
9373
9374 type DomainsGetCall struct {
9375 s *Service
9376 customer string
9377 domainName string
9378 urlParams_ gensupport.URLParams
9379 ifNoneMatch_ string
9380 ctx_ context.Context
9381 header_ http.Header
9382 }
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394 func (r *DomainsService) Get(customer string, domainName string) *DomainsGetCall {
9395 c := &DomainsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9396 c.customer = customer
9397 c.domainName = domainName
9398 return c
9399 }
9400
9401
9402
9403
9404 func (c *DomainsGetCall) Fields(s ...googleapi.Field) *DomainsGetCall {
9405 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9406 return c
9407 }
9408
9409
9410
9411
9412 func (c *DomainsGetCall) IfNoneMatch(entityTag string) *DomainsGetCall {
9413 c.ifNoneMatch_ = entityTag
9414 return c
9415 }
9416
9417
9418 func (c *DomainsGetCall) Context(ctx context.Context) *DomainsGetCall {
9419 c.ctx_ = ctx
9420 return c
9421 }
9422
9423
9424
9425 func (c *DomainsGetCall) Header() http.Header {
9426 if c.header_ == nil {
9427 c.header_ = make(http.Header)
9428 }
9429 return c.header_
9430 }
9431
9432 func (c *DomainsGetCall) doRequest(alt string) (*http.Response, error) {
9433 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9434 if c.ifNoneMatch_ != "" {
9435 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9436 }
9437 var body io.Reader = nil
9438 c.urlParams_.Set("alt", alt)
9439 c.urlParams_.Set("prettyPrint", "false")
9440 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/domains/{domainName}")
9441 urls += "?" + c.urlParams_.Encode()
9442 req, err := http.NewRequest("GET", urls, body)
9443 if err != nil {
9444 return nil, err
9445 }
9446 req.Header = reqHeaders
9447 googleapi.Expand(req.URL, map[string]string{
9448 "customer": c.customer,
9449 "domainName": c.domainName,
9450 })
9451 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9452 }
9453
9454
9455
9456
9457
9458
9459 func (c *DomainsGetCall) Do(opts ...googleapi.CallOption) (*Domains, error) {
9460 gensupport.SetOptions(c.urlParams_, opts...)
9461 res, err := c.doRequest("json")
9462 if res != nil && res.StatusCode == http.StatusNotModified {
9463 if res.Body != nil {
9464 res.Body.Close()
9465 }
9466 return nil, gensupport.WrapError(&googleapi.Error{
9467 Code: res.StatusCode,
9468 Header: res.Header,
9469 })
9470 }
9471 if err != nil {
9472 return nil, err
9473 }
9474 defer googleapi.CloseBody(res)
9475 if err := googleapi.CheckResponse(res); err != nil {
9476 return nil, gensupport.WrapError(err)
9477 }
9478 ret := &Domains{
9479 ServerResponse: googleapi.ServerResponse{
9480 Header: res.Header,
9481 HTTPStatusCode: res.StatusCode,
9482 },
9483 }
9484 target := &ret
9485 if err := gensupport.DecodeResponse(target, res); err != nil {
9486 return nil, err
9487 }
9488 return ret, nil
9489 }
9490
9491 type DomainsInsertCall struct {
9492 s *Service
9493 customer string
9494 domains *Domains
9495 urlParams_ gensupport.URLParams
9496 ctx_ context.Context
9497 header_ http.Header
9498 }
9499
9500
9501
9502
9503 func (r *DomainsService) Insert(customer string, domains *Domains) *DomainsInsertCall {
9504 c := &DomainsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9505 c.customer = customer
9506 c.domains = domains
9507 return c
9508 }
9509
9510
9511
9512
9513 func (c *DomainsInsertCall) Fields(s ...googleapi.Field) *DomainsInsertCall {
9514 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9515 return c
9516 }
9517
9518
9519 func (c *DomainsInsertCall) Context(ctx context.Context) *DomainsInsertCall {
9520 c.ctx_ = ctx
9521 return c
9522 }
9523
9524
9525
9526 func (c *DomainsInsertCall) Header() http.Header {
9527 if c.header_ == nil {
9528 c.header_ = make(http.Header)
9529 }
9530 return c.header_
9531 }
9532
9533 func (c *DomainsInsertCall) doRequest(alt string) (*http.Response, error) {
9534 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9535 var body io.Reader = nil
9536 body, err := googleapi.WithoutDataWrapper.JSONReader(c.domains)
9537 if err != nil {
9538 return nil, err
9539 }
9540 c.urlParams_.Set("alt", alt)
9541 c.urlParams_.Set("prettyPrint", "false")
9542 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/domains")
9543 urls += "?" + c.urlParams_.Encode()
9544 req, err := http.NewRequest("POST", urls, body)
9545 if err != nil {
9546 return nil, err
9547 }
9548 req.Header = reqHeaders
9549 googleapi.Expand(req.URL, map[string]string{
9550 "customer": c.customer,
9551 })
9552 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9553 }
9554
9555
9556
9557
9558
9559
9560 func (c *DomainsInsertCall) Do(opts ...googleapi.CallOption) (*Domains, error) {
9561 gensupport.SetOptions(c.urlParams_, opts...)
9562 res, err := c.doRequest("json")
9563 if res != nil && res.StatusCode == http.StatusNotModified {
9564 if res.Body != nil {
9565 res.Body.Close()
9566 }
9567 return nil, gensupport.WrapError(&googleapi.Error{
9568 Code: res.StatusCode,
9569 Header: res.Header,
9570 })
9571 }
9572 if err != nil {
9573 return nil, err
9574 }
9575 defer googleapi.CloseBody(res)
9576 if err := googleapi.CheckResponse(res); err != nil {
9577 return nil, gensupport.WrapError(err)
9578 }
9579 ret := &Domains{
9580 ServerResponse: googleapi.ServerResponse{
9581 Header: res.Header,
9582 HTTPStatusCode: res.StatusCode,
9583 },
9584 }
9585 target := &ret
9586 if err := gensupport.DecodeResponse(target, res); err != nil {
9587 return nil, err
9588 }
9589 return ret, nil
9590 }
9591
9592 type DomainsListCall struct {
9593 s *Service
9594 customer string
9595 urlParams_ gensupport.URLParams
9596 ifNoneMatch_ string
9597 ctx_ context.Context
9598 header_ http.Header
9599 }
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610 func (r *DomainsService) List(customer string) *DomainsListCall {
9611 c := &DomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9612 c.customer = customer
9613 return c
9614 }
9615
9616
9617
9618
9619 func (c *DomainsListCall) Fields(s ...googleapi.Field) *DomainsListCall {
9620 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9621 return c
9622 }
9623
9624
9625
9626
9627 func (c *DomainsListCall) IfNoneMatch(entityTag string) *DomainsListCall {
9628 c.ifNoneMatch_ = entityTag
9629 return c
9630 }
9631
9632
9633 func (c *DomainsListCall) Context(ctx context.Context) *DomainsListCall {
9634 c.ctx_ = ctx
9635 return c
9636 }
9637
9638
9639
9640 func (c *DomainsListCall) Header() http.Header {
9641 if c.header_ == nil {
9642 c.header_ = make(http.Header)
9643 }
9644 return c.header_
9645 }
9646
9647 func (c *DomainsListCall) doRequest(alt string) (*http.Response, error) {
9648 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9649 if c.ifNoneMatch_ != "" {
9650 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9651 }
9652 var body io.Reader = nil
9653 c.urlParams_.Set("alt", alt)
9654 c.urlParams_.Set("prettyPrint", "false")
9655 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/domains")
9656 urls += "?" + c.urlParams_.Encode()
9657 req, err := http.NewRequest("GET", urls, body)
9658 if err != nil {
9659 return nil, err
9660 }
9661 req.Header = reqHeaders
9662 googleapi.Expand(req.URL, map[string]string{
9663 "customer": c.customer,
9664 })
9665 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9666 }
9667
9668
9669
9670
9671
9672
9673 func (c *DomainsListCall) Do(opts ...googleapi.CallOption) (*Domains2, error) {
9674 gensupport.SetOptions(c.urlParams_, opts...)
9675 res, err := c.doRequest("json")
9676 if res != nil && res.StatusCode == http.StatusNotModified {
9677 if res.Body != nil {
9678 res.Body.Close()
9679 }
9680 return nil, gensupport.WrapError(&googleapi.Error{
9681 Code: res.StatusCode,
9682 Header: res.Header,
9683 })
9684 }
9685 if err != nil {
9686 return nil, err
9687 }
9688 defer googleapi.CloseBody(res)
9689 if err := googleapi.CheckResponse(res); err != nil {
9690 return nil, gensupport.WrapError(err)
9691 }
9692 ret := &Domains2{
9693 ServerResponse: googleapi.ServerResponse{
9694 Header: res.Header,
9695 HTTPStatusCode: res.StatusCode,
9696 },
9697 }
9698 target := &ret
9699 if err := gensupport.DecodeResponse(target, res); err != nil {
9700 return nil, err
9701 }
9702 return ret, nil
9703 }
9704
9705 type GroupsDeleteCall struct {
9706 s *Service
9707 groupKey string
9708 urlParams_ gensupport.URLParams
9709 ctx_ context.Context
9710 header_ http.Header
9711 }
9712
9713
9714
9715
9716
9717 func (r *GroupsService) Delete(groupKey string) *GroupsDeleteCall {
9718 c := &GroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9719 c.groupKey = groupKey
9720 return c
9721 }
9722
9723
9724
9725
9726 func (c *GroupsDeleteCall) Fields(s ...googleapi.Field) *GroupsDeleteCall {
9727 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9728 return c
9729 }
9730
9731
9732 func (c *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall {
9733 c.ctx_ = ctx
9734 return c
9735 }
9736
9737
9738
9739 func (c *GroupsDeleteCall) Header() http.Header {
9740 if c.header_ == nil {
9741 c.header_ = make(http.Header)
9742 }
9743 return c.header_
9744 }
9745
9746 func (c *GroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
9747 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9748 var body io.Reader = nil
9749 c.urlParams_.Set("alt", alt)
9750 c.urlParams_.Set("prettyPrint", "false")
9751 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}")
9752 urls += "?" + c.urlParams_.Encode()
9753 req, err := http.NewRequest("DELETE", urls, body)
9754 if err != nil {
9755 return nil, err
9756 }
9757 req.Header = reqHeaders
9758 googleapi.Expand(req.URL, map[string]string{
9759 "groupKey": c.groupKey,
9760 })
9761 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9762 }
9763
9764
9765 func (c *GroupsDeleteCall) Do(opts ...googleapi.CallOption) error {
9766 gensupport.SetOptions(c.urlParams_, opts...)
9767 res, err := c.doRequest("json")
9768 if err != nil {
9769 return err
9770 }
9771 defer googleapi.CloseBody(res)
9772 if err := googleapi.CheckResponse(res); err != nil {
9773 return gensupport.WrapError(err)
9774 }
9775 return nil
9776 }
9777
9778 type GroupsGetCall struct {
9779 s *Service
9780 groupKey string
9781 urlParams_ gensupport.URLParams
9782 ifNoneMatch_ string
9783 ctx_ context.Context
9784 header_ http.Header
9785 }
9786
9787
9788
9789
9790
9791 func (r *GroupsService) Get(groupKey string) *GroupsGetCall {
9792 c := &GroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9793 c.groupKey = groupKey
9794 return c
9795 }
9796
9797
9798
9799
9800 func (c *GroupsGetCall) Fields(s ...googleapi.Field) *GroupsGetCall {
9801 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9802 return c
9803 }
9804
9805
9806
9807
9808 func (c *GroupsGetCall) IfNoneMatch(entityTag string) *GroupsGetCall {
9809 c.ifNoneMatch_ = entityTag
9810 return c
9811 }
9812
9813
9814 func (c *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall {
9815 c.ctx_ = ctx
9816 return c
9817 }
9818
9819
9820
9821 func (c *GroupsGetCall) Header() http.Header {
9822 if c.header_ == nil {
9823 c.header_ = make(http.Header)
9824 }
9825 return c.header_
9826 }
9827
9828 func (c *GroupsGetCall) doRequest(alt string) (*http.Response, error) {
9829 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9830 if c.ifNoneMatch_ != "" {
9831 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9832 }
9833 var body io.Reader = nil
9834 c.urlParams_.Set("alt", alt)
9835 c.urlParams_.Set("prettyPrint", "false")
9836 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}")
9837 urls += "?" + c.urlParams_.Encode()
9838 req, err := http.NewRequest("GET", urls, body)
9839 if err != nil {
9840 return nil, err
9841 }
9842 req.Header = reqHeaders
9843 googleapi.Expand(req.URL, map[string]string{
9844 "groupKey": c.groupKey,
9845 })
9846 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9847 }
9848
9849
9850
9851
9852
9853
9854 func (c *GroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) {
9855 gensupport.SetOptions(c.urlParams_, opts...)
9856 res, err := c.doRequest("json")
9857 if res != nil && res.StatusCode == http.StatusNotModified {
9858 if res.Body != nil {
9859 res.Body.Close()
9860 }
9861 return nil, gensupport.WrapError(&googleapi.Error{
9862 Code: res.StatusCode,
9863 Header: res.Header,
9864 })
9865 }
9866 if err != nil {
9867 return nil, err
9868 }
9869 defer googleapi.CloseBody(res)
9870 if err := googleapi.CheckResponse(res); err != nil {
9871 return nil, gensupport.WrapError(err)
9872 }
9873 ret := &Group{
9874 ServerResponse: googleapi.ServerResponse{
9875 Header: res.Header,
9876 HTTPStatusCode: res.StatusCode,
9877 },
9878 }
9879 target := &ret
9880 if err := gensupport.DecodeResponse(target, res); err != nil {
9881 return nil, err
9882 }
9883 return ret, nil
9884 }
9885
9886 type GroupsInsertCall struct {
9887 s *Service
9888 group *Group
9889 urlParams_ gensupport.URLParams
9890 ctx_ context.Context
9891 header_ http.Header
9892 }
9893
9894
9895 func (r *GroupsService) Insert(group *Group) *GroupsInsertCall {
9896 c := &GroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9897 c.group = group
9898 return c
9899 }
9900
9901
9902
9903
9904 func (c *GroupsInsertCall) Fields(s ...googleapi.Field) *GroupsInsertCall {
9905 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9906 return c
9907 }
9908
9909
9910 func (c *GroupsInsertCall) Context(ctx context.Context) *GroupsInsertCall {
9911 c.ctx_ = ctx
9912 return c
9913 }
9914
9915
9916
9917 func (c *GroupsInsertCall) Header() http.Header {
9918 if c.header_ == nil {
9919 c.header_ = make(http.Header)
9920 }
9921 return c.header_
9922 }
9923
9924 func (c *GroupsInsertCall) doRequest(alt string) (*http.Response, error) {
9925 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9926 var body io.Reader = nil
9927 body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
9928 if err != nil {
9929 return nil, err
9930 }
9931 c.urlParams_.Set("alt", alt)
9932 c.urlParams_.Set("prettyPrint", "false")
9933 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups")
9934 urls += "?" + c.urlParams_.Encode()
9935 req, err := http.NewRequest("POST", urls, body)
9936 if err != nil {
9937 return nil, err
9938 }
9939 req.Header = reqHeaders
9940 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9941 }
9942
9943
9944
9945
9946
9947
9948 func (c *GroupsInsertCall) Do(opts ...googleapi.CallOption) (*Group, error) {
9949 gensupport.SetOptions(c.urlParams_, opts...)
9950 res, err := c.doRequest("json")
9951 if res != nil && res.StatusCode == http.StatusNotModified {
9952 if res.Body != nil {
9953 res.Body.Close()
9954 }
9955 return nil, gensupport.WrapError(&googleapi.Error{
9956 Code: res.StatusCode,
9957 Header: res.Header,
9958 })
9959 }
9960 if err != nil {
9961 return nil, err
9962 }
9963 defer googleapi.CloseBody(res)
9964 if err := googleapi.CheckResponse(res); err != nil {
9965 return nil, gensupport.WrapError(err)
9966 }
9967 ret := &Group{
9968 ServerResponse: googleapi.ServerResponse{
9969 Header: res.Header,
9970 HTTPStatusCode: res.StatusCode,
9971 },
9972 }
9973 target := &ret
9974 if err := gensupport.DecodeResponse(target, res); err != nil {
9975 return nil, err
9976 }
9977 return ret, nil
9978 }
9979
9980 type GroupsListCall struct {
9981 s *Service
9982 urlParams_ gensupport.URLParams
9983 ifNoneMatch_ string
9984 ctx_ context.Context
9985 header_ http.Header
9986 }
9987
9988
9989
9990 func (r *GroupsService) List() *GroupsListCall {
9991 c := &GroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9992 return c
9993 }
9994
9995
9996
9997
9998
9999
10000
10001
10002 func (c *GroupsListCall) Customer(customer string) *GroupsListCall {
10003 c.urlParams_.Set("customer", customer)
10004 return c
10005 }
10006
10007
10008
10009
10010 func (c *GroupsListCall) Domain(domain string) *GroupsListCall {
10011 c.urlParams_.Set("domain", domain)
10012 return c
10013 }
10014
10015
10016
10017 func (c *GroupsListCall) MaxResults(maxResults int64) *GroupsListCall {
10018 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
10019 return c
10020 }
10021
10022
10023
10024
10025
10026
10027
10028 func (c *GroupsListCall) OrderBy(orderBy string) *GroupsListCall {
10029 c.urlParams_.Set("orderBy", orderBy)
10030 return c
10031 }
10032
10033
10034
10035 func (c *GroupsListCall) PageToken(pageToken string) *GroupsListCall {
10036 c.urlParams_.Set("pageToken", pageToken)
10037 return c
10038 }
10039
10040
10041
10042
10043 func (c *GroupsListCall) Query(query string) *GroupsListCall {
10044 c.urlParams_.Set("query", query)
10045 return c
10046 }
10047
10048
10049
10050
10051
10052
10053
10054
10055 func (c *GroupsListCall) SortOrder(sortOrder string) *GroupsListCall {
10056 c.urlParams_.Set("sortOrder", sortOrder)
10057 return c
10058 }
10059
10060
10061
10062
10063 func (c *GroupsListCall) UserKey(userKey string) *GroupsListCall {
10064 c.urlParams_.Set("userKey", userKey)
10065 return c
10066 }
10067
10068
10069
10070
10071 func (c *GroupsListCall) Fields(s ...googleapi.Field) *GroupsListCall {
10072 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10073 return c
10074 }
10075
10076
10077
10078
10079 func (c *GroupsListCall) IfNoneMatch(entityTag string) *GroupsListCall {
10080 c.ifNoneMatch_ = entityTag
10081 return c
10082 }
10083
10084
10085 func (c *GroupsListCall) Context(ctx context.Context) *GroupsListCall {
10086 c.ctx_ = ctx
10087 return c
10088 }
10089
10090
10091
10092 func (c *GroupsListCall) Header() http.Header {
10093 if c.header_ == nil {
10094 c.header_ = make(http.Header)
10095 }
10096 return c.header_
10097 }
10098
10099 func (c *GroupsListCall) doRequest(alt string) (*http.Response, error) {
10100 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10101 if c.ifNoneMatch_ != "" {
10102 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10103 }
10104 var body io.Reader = nil
10105 c.urlParams_.Set("alt", alt)
10106 c.urlParams_.Set("prettyPrint", "false")
10107 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups")
10108 urls += "?" + c.urlParams_.Encode()
10109 req, err := http.NewRequest("GET", urls, body)
10110 if err != nil {
10111 return nil, err
10112 }
10113 req.Header = reqHeaders
10114 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10115 }
10116
10117
10118
10119
10120
10121
10122 func (c *GroupsListCall) Do(opts ...googleapi.CallOption) (*Groups, error) {
10123 gensupport.SetOptions(c.urlParams_, opts...)
10124 res, err := c.doRequest("json")
10125 if res != nil && res.StatusCode == http.StatusNotModified {
10126 if res.Body != nil {
10127 res.Body.Close()
10128 }
10129 return nil, gensupport.WrapError(&googleapi.Error{
10130 Code: res.StatusCode,
10131 Header: res.Header,
10132 })
10133 }
10134 if err != nil {
10135 return nil, err
10136 }
10137 defer googleapi.CloseBody(res)
10138 if err := googleapi.CheckResponse(res); err != nil {
10139 return nil, gensupport.WrapError(err)
10140 }
10141 ret := &Groups{
10142 ServerResponse: googleapi.ServerResponse{
10143 Header: res.Header,
10144 HTTPStatusCode: res.StatusCode,
10145 },
10146 }
10147 target := &ret
10148 if err := gensupport.DecodeResponse(target, res); err != nil {
10149 return nil, err
10150 }
10151 return ret, nil
10152 }
10153
10154
10155
10156
10157 func (c *GroupsListCall) Pages(ctx context.Context, f func(*Groups) error) error {
10158 c.ctx_ = ctx
10159 defer c.PageToken(c.urlParams_.Get("pageToken"))
10160 for {
10161 x, err := c.Do()
10162 if err != nil {
10163 return err
10164 }
10165 if err := f(x); err != nil {
10166 return err
10167 }
10168 if x.NextPageToken == "" {
10169 return nil
10170 }
10171 c.PageToken(x.NextPageToken)
10172 }
10173 }
10174
10175 type GroupsPatchCall struct {
10176 s *Service
10177 groupKey string
10178 group *Group
10179 urlParams_ gensupport.URLParams
10180 ctx_ context.Context
10181 header_ http.Header
10182 }
10183
10184
10185
10186
10187
10188
10189 func (r *GroupsService) Patch(groupKey string, group *Group) *GroupsPatchCall {
10190 c := &GroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10191 c.groupKey = groupKey
10192 c.group = group
10193 return c
10194 }
10195
10196
10197
10198
10199 func (c *GroupsPatchCall) Fields(s ...googleapi.Field) *GroupsPatchCall {
10200 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10201 return c
10202 }
10203
10204
10205 func (c *GroupsPatchCall) Context(ctx context.Context) *GroupsPatchCall {
10206 c.ctx_ = ctx
10207 return c
10208 }
10209
10210
10211
10212 func (c *GroupsPatchCall) Header() http.Header {
10213 if c.header_ == nil {
10214 c.header_ = make(http.Header)
10215 }
10216 return c.header_
10217 }
10218
10219 func (c *GroupsPatchCall) doRequest(alt string) (*http.Response, error) {
10220 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10221 var body io.Reader = nil
10222 body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
10223 if err != nil {
10224 return nil, err
10225 }
10226 c.urlParams_.Set("alt", alt)
10227 c.urlParams_.Set("prettyPrint", "false")
10228 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}")
10229 urls += "?" + c.urlParams_.Encode()
10230 req, err := http.NewRequest("PATCH", urls, body)
10231 if err != nil {
10232 return nil, err
10233 }
10234 req.Header = reqHeaders
10235 googleapi.Expand(req.URL, map[string]string{
10236 "groupKey": c.groupKey,
10237 })
10238 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10239 }
10240
10241
10242
10243
10244
10245
10246 func (c *GroupsPatchCall) Do(opts ...googleapi.CallOption) (*Group, error) {
10247 gensupport.SetOptions(c.urlParams_, opts...)
10248 res, err := c.doRequest("json")
10249 if res != nil && res.StatusCode == http.StatusNotModified {
10250 if res.Body != nil {
10251 res.Body.Close()
10252 }
10253 return nil, gensupport.WrapError(&googleapi.Error{
10254 Code: res.StatusCode,
10255 Header: res.Header,
10256 })
10257 }
10258 if err != nil {
10259 return nil, err
10260 }
10261 defer googleapi.CloseBody(res)
10262 if err := googleapi.CheckResponse(res); err != nil {
10263 return nil, gensupport.WrapError(err)
10264 }
10265 ret := &Group{
10266 ServerResponse: googleapi.ServerResponse{
10267 Header: res.Header,
10268 HTTPStatusCode: res.StatusCode,
10269 },
10270 }
10271 target := &ret
10272 if err := gensupport.DecodeResponse(target, res); err != nil {
10273 return nil, err
10274 }
10275 return ret, nil
10276 }
10277
10278 type GroupsUpdateCall struct {
10279 s *Service
10280 groupKey string
10281 group *Group
10282 urlParams_ gensupport.URLParams
10283 ctx_ context.Context
10284 header_ http.Header
10285 }
10286
10287
10288
10289
10290
10291 func (r *GroupsService) Update(groupKey string, group *Group) *GroupsUpdateCall {
10292 c := &GroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10293 c.groupKey = groupKey
10294 c.group = group
10295 return c
10296 }
10297
10298
10299
10300
10301 func (c *GroupsUpdateCall) Fields(s ...googleapi.Field) *GroupsUpdateCall {
10302 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10303 return c
10304 }
10305
10306
10307 func (c *GroupsUpdateCall) Context(ctx context.Context) *GroupsUpdateCall {
10308 c.ctx_ = ctx
10309 return c
10310 }
10311
10312
10313
10314 func (c *GroupsUpdateCall) Header() http.Header {
10315 if c.header_ == nil {
10316 c.header_ = make(http.Header)
10317 }
10318 return c.header_
10319 }
10320
10321 func (c *GroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
10322 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10323 var body io.Reader = nil
10324 body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
10325 if err != nil {
10326 return nil, err
10327 }
10328 c.urlParams_.Set("alt", alt)
10329 c.urlParams_.Set("prettyPrint", "false")
10330 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}")
10331 urls += "?" + c.urlParams_.Encode()
10332 req, err := http.NewRequest("PUT", urls, body)
10333 if err != nil {
10334 return nil, err
10335 }
10336 req.Header = reqHeaders
10337 googleapi.Expand(req.URL, map[string]string{
10338 "groupKey": c.groupKey,
10339 })
10340 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10341 }
10342
10343
10344
10345
10346
10347
10348 func (c *GroupsUpdateCall) Do(opts ...googleapi.CallOption) (*Group, error) {
10349 gensupport.SetOptions(c.urlParams_, opts...)
10350 res, err := c.doRequest("json")
10351 if res != nil && res.StatusCode == http.StatusNotModified {
10352 if res.Body != nil {
10353 res.Body.Close()
10354 }
10355 return nil, gensupport.WrapError(&googleapi.Error{
10356 Code: res.StatusCode,
10357 Header: res.Header,
10358 })
10359 }
10360 if err != nil {
10361 return nil, err
10362 }
10363 defer googleapi.CloseBody(res)
10364 if err := googleapi.CheckResponse(res); err != nil {
10365 return nil, gensupport.WrapError(err)
10366 }
10367 ret := &Group{
10368 ServerResponse: googleapi.ServerResponse{
10369 Header: res.Header,
10370 HTTPStatusCode: res.StatusCode,
10371 },
10372 }
10373 target := &ret
10374 if err := gensupport.DecodeResponse(target, res); err != nil {
10375 return nil, err
10376 }
10377 return ret, nil
10378 }
10379
10380 type GroupsAliasesDeleteCall struct {
10381 s *Service
10382 groupKey string
10383 alias string
10384 urlParams_ gensupport.URLParams
10385 ctx_ context.Context
10386 header_ http.Header
10387 }
10388
10389
10390
10391
10392
10393
10394 func (r *GroupsAliasesService) Delete(groupKey string, alias string) *GroupsAliasesDeleteCall {
10395 c := &GroupsAliasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10396 c.groupKey = groupKey
10397 c.alias = alias
10398 return c
10399 }
10400
10401
10402
10403
10404 func (c *GroupsAliasesDeleteCall) Fields(s ...googleapi.Field) *GroupsAliasesDeleteCall {
10405 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10406 return c
10407 }
10408
10409
10410 func (c *GroupsAliasesDeleteCall) Context(ctx context.Context) *GroupsAliasesDeleteCall {
10411 c.ctx_ = ctx
10412 return c
10413 }
10414
10415
10416
10417 func (c *GroupsAliasesDeleteCall) Header() http.Header {
10418 if c.header_ == nil {
10419 c.header_ = make(http.Header)
10420 }
10421 return c.header_
10422 }
10423
10424 func (c *GroupsAliasesDeleteCall) doRequest(alt string) (*http.Response, error) {
10425 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10426 var body io.Reader = nil
10427 c.urlParams_.Set("alt", alt)
10428 c.urlParams_.Set("prettyPrint", "false")
10429 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/aliases/{alias}")
10430 urls += "?" + c.urlParams_.Encode()
10431 req, err := http.NewRequest("DELETE", urls, body)
10432 if err != nil {
10433 return nil, err
10434 }
10435 req.Header = reqHeaders
10436 googleapi.Expand(req.URL, map[string]string{
10437 "groupKey": c.groupKey,
10438 "alias": c.alias,
10439 })
10440 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10441 }
10442
10443
10444 func (c *GroupsAliasesDeleteCall) Do(opts ...googleapi.CallOption) error {
10445 gensupport.SetOptions(c.urlParams_, opts...)
10446 res, err := c.doRequest("json")
10447 if err != nil {
10448 return err
10449 }
10450 defer googleapi.CloseBody(res)
10451 if err := googleapi.CheckResponse(res); err != nil {
10452 return gensupport.WrapError(err)
10453 }
10454 return nil
10455 }
10456
10457 type GroupsAliasesInsertCall struct {
10458 s *Service
10459 groupKey string
10460 alias *Alias
10461 urlParams_ gensupport.URLParams
10462 ctx_ context.Context
10463 header_ http.Header
10464 }
10465
10466
10467
10468
10469
10470 func (r *GroupsAliasesService) Insert(groupKey string, alias *Alias) *GroupsAliasesInsertCall {
10471 c := &GroupsAliasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10472 c.groupKey = groupKey
10473 c.alias = alias
10474 return c
10475 }
10476
10477
10478
10479
10480 func (c *GroupsAliasesInsertCall) Fields(s ...googleapi.Field) *GroupsAliasesInsertCall {
10481 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10482 return c
10483 }
10484
10485
10486 func (c *GroupsAliasesInsertCall) Context(ctx context.Context) *GroupsAliasesInsertCall {
10487 c.ctx_ = ctx
10488 return c
10489 }
10490
10491
10492
10493 func (c *GroupsAliasesInsertCall) Header() http.Header {
10494 if c.header_ == nil {
10495 c.header_ = make(http.Header)
10496 }
10497 return c.header_
10498 }
10499
10500 func (c *GroupsAliasesInsertCall) doRequest(alt string) (*http.Response, error) {
10501 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10502 var body io.Reader = nil
10503 body, err := googleapi.WithoutDataWrapper.JSONReader(c.alias)
10504 if err != nil {
10505 return nil, err
10506 }
10507 c.urlParams_.Set("alt", alt)
10508 c.urlParams_.Set("prettyPrint", "false")
10509 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/aliases")
10510 urls += "?" + c.urlParams_.Encode()
10511 req, err := http.NewRequest("POST", urls, body)
10512 if err != nil {
10513 return nil, err
10514 }
10515 req.Header = reqHeaders
10516 googleapi.Expand(req.URL, map[string]string{
10517 "groupKey": c.groupKey,
10518 })
10519 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10520 }
10521
10522
10523
10524
10525
10526
10527 func (c *GroupsAliasesInsertCall) Do(opts ...googleapi.CallOption) (*Alias, error) {
10528 gensupport.SetOptions(c.urlParams_, opts...)
10529 res, err := c.doRequest("json")
10530 if res != nil && res.StatusCode == http.StatusNotModified {
10531 if res.Body != nil {
10532 res.Body.Close()
10533 }
10534 return nil, gensupport.WrapError(&googleapi.Error{
10535 Code: res.StatusCode,
10536 Header: res.Header,
10537 })
10538 }
10539 if err != nil {
10540 return nil, err
10541 }
10542 defer googleapi.CloseBody(res)
10543 if err := googleapi.CheckResponse(res); err != nil {
10544 return nil, gensupport.WrapError(err)
10545 }
10546 ret := &Alias{
10547 ServerResponse: googleapi.ServerResponse{
10548 Header: res.Header,
10549 HTTPStatusCode: res.StatusCode,
10550 },
10551 }
10552 target := &ret
10553 if err := gensupport.DecodeResponse(target, res); err != nil {
10554 return nil, err
10555 }
10556 return ret, nil
10557 }
10558
10559 type GroupsAliasesListCall struct {
10560 s *Service
10561 groupKey string
10562 urlParams_ gensupport.URLParams
10563 ifNoneMatch_ string
10564 ctx_ context.Context
10565 header_ http.Header
10566 }
10567
10568
10569
10570
10571
10572 func (r *GroupsAliasesService) List(groupKey string) *GroupsAliasesListCall {
10573 c := &GroupsAliasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10574 c.groupKey = groupKey
10575 return c
10576 }
10577
10578
10579
10580
10581 func (c *GroupsAliasesListCall) Fields(s ...googleapi.Field) *GroupsAliasesListCall {
10582 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10583 return c
10584 }
10585
10586
10587
10588
10589 func (c *GroupsAliasesListCall) IfNoneMatch(entityTag string) *GroupsAliasesListCall {
10590 c.ifNoneMatch_ = entityTag
10591 return c
10592 }
10593
10594
10595 func (c *GroupsAliasesListCall) Context(ctx context.Context) *GroupsAliasesListCall {
10596 c.ctx_ = ctx
10597 return c
10598 }
10599
10600
10601
10602 func (c *GroupsAliasesListCall) Header() http.Header {
10603 if c.header_ == nil {
10604 c.header_ = make(http.Header)
10605 }
10606 return c.header_
10607 }
10608
10609 func (c *GroupsAliasesListCall) doRequest(alt string) (*http.Response, error) {
10610 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10611 if c.ifNoneMatch_ != "" {
10612 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10613 }
10614 var body io.Reader = nil
10615 c.urlParams_.Set("alt", alt)
10616 c.urlParams_.Set("prettyPrint", "false")
10617 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/aliases")
10618 urls += "?" + c.urlParams_.Encode()
10619 req, err := http.NewRequest("GET", urls, body)
10620 if err != nil {
10621 return nil, err
10622 }
10623 req.Header = reqHeaders
10624 googleapi.Expand(req.URL, map[string]string{
10625 "groupKey": c.groupKey,
10626 })
10627 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10628 }
10629
10630
10631
10632
10633
10634
10635 func (c *GroupsAliasesListCall) Do(opts ...googleapi.CallOption) (*Aliases, error) {
10636 gensupport.SetOptions(c.urlParams_, opts...)
10637 res, err := c.doRequest("json")
10638 if res != nil && res.StatusCode == http.StatusNotModified {
10639 if res.Body != nil {
10640 res.Body.Close()
10641 }
10642 return nil, gensupport.WrapError(&googleapi.Error{
10643 Code: res.StatusCode,
10644 Header: res.Header,
10645 })
10646 }
10647 if err != nil {
10648 return nil, err
10649 }
10650 defer googleapi.CloseBody(res)
10651 if err := googleapi.CheckResponse(res); err != nil {
10652 return nil, gensupport.WrapError(err)
10653 }
10654 ret := &Aliases{
10655 ServerResponse: googleapi.ServerResponse{
10656 Header: res.Header,
10657 HTTPStatusCode: res.StatusCode,
10658 },
10659 }
10660 target := &ret
10661 if err := gensupport.DecodeResponse(target, res); err != nil {
10662 return nil, err
10663 }
10664 return ret, nil
10665 }
10666
10667 type MembersDeleteCall struct {
10668 s *Service
10669 groupKey string
10670 memberKey string
10671 urlParams_ gensupport.URLParams
10672 ctx_ context.Context
10673 header_ http.Header
10674 }
10675
10676
10677
10678
10679
10680
10681
10682
10683 func (r *MembersService) Delete(groupKey string, memberKey string) *MembersDeleteCall {
10684 c := &MembersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10685 c.groupKey = groupKey
10686 c.memberKey = memberKey
10687 return c
10688 }
10689
10690
10691
10692
10693 func (c *MembersDeleteCall) Fields(s ...googleapi.Field) *MembersDeleteCall {
10694 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10695 return c
10696 }
10697
10698
10699 func (c *MembersDeleteCall) Context(ctx context.Context) *MembersDeleteCall {
10700 c.ctx_ = ctx
10701 return c
10702 }
10703
10704
10705
10706 func (c *MembersDeleteCall) Header() http.Header {
10707 if c.header_ == nil {
10708 c.header_ = make(http.Header)
10709 }
10710 return c.header_
10711 }
10712
10713 func (c *MembersDeleteCall) doRequest(alt string) (*http.Response, error) {
10714 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10715 var body io.Reader = nil
10716 c.urlParams_.Set("alt", alt)
10717 c.urlParams_.Set("prettyPrint", "false")
10718 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/members/{memberKey}")
10719 urls += "?" + c.urlParams_.Encode()
10720 req, err := http.NewRequest("DELETE", urls, body)
10721 if err != nil {
10722 return nil, err
10723 }
10724 req.Header = reqHeaders
10725 googleapi.Expand(req.URL, map[string]string{
10726 "groupKey": c.groupKey,
10727 "memberKey": c.memberKey,
10728 })
10729 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10730 }
10731
10732
10733 func (c *MembersDeleteCall) Do(opts ...googleapi.CallOption) error {
10734 gensupport.SetOptions(c.urlParams_, opts...)
10735 res, err := c.doRequest("json")
10736 if err != nil {
10737 return err
10738 }
10739 defer googleapi.CloseBody(res)
10740 if err := googleapi.CheckResponse(res); err != nil {
10741 return gensupport.WrapError(err)
10742 }
10743 return nil
10744 }
10745
10746 type MembersGetCall struct {
10747 s *Service
10748 groupKey string
10749 memberKey string
10750 urlParams_ gensupport.URLParams
10751 ifNoneMatch_ string
10752 ctx_ context.Context
10753 header_ http.Header
10754 }
10755
10756
10757
10758
10759
10760
10761
10762
10763 func (r *MembersService) Get(groupKey string, memberKey string) *MembersGetCall {
10764 c := &MembersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10765 c.groupKey = groupKey
10766 c.memberKey = memberKey
10767 return c
10768 }
10769
10770
10771
10772
10773 func (c *MembersGetCall) Fields(s ...googleapi.Field) *MembersGetCall {
10774 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10775 return c
10776 }
10777
10778
10779
10780
10781 func (c *MembersGetCall) IfNoneMatch(entityTag string) *MembersGetCall {
10782 c.ifNoneMatch_ = entityTag
10783 return c
10784 }
10785
10786
10787 func (c *MembersGetCall) Context(ctx context.Context) *MembersGetCall {
10788 c.ctx_ = ctx
10789 return c
10790 }
10791
10792
10793
10794 func (c *MembersGetCall) Header() http.Header {
10795 if c.header_ == nil {
10796 c.header_ = make(http.Header)
10797 }
10798 return c.header_
10799 }
10800
10801 func (c *MembersGetCall) doRequest(alt string) (*http.Response, error) {
10802 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10803 if c.ifNoneMatch_ != "" {
10804 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10805 }
10806 var body io.Reader = nil
10807 c.urlParams_.Set("alt", alt)
10808 c.urlParams_.Set("prettyPrint", "false")
10809 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/members/{memberKey}")
10810 urls += "?" + c.urlParams_.Encode()
10811 req, err := http.NewRequest("GET", urls, body)
10812 if err != nil {
10813 return nil, err
10814 }
10815 req.Header = reqHeaders
10816 googleapi.Expand(req.URL, map[string]string{
10817 "groupKey": c.groupKey,
10818 "memberKey": c.memberKey,
10819 })
10820 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10821 }
10822
10823
10824
10825
10826
10827
10828 func (c *MembersGetCall) Do(opts ...googleapi.CallOption) (*Member, error) {
10829 gensupport.SetOptions(c.urlParams_, opts...)
10830 res, err := c.doRequest("json")
10831 if res != nil && res.StatusCode == http.StatusNotModified {
10832 if res.Body != nil {
10833 res.Body.Close()
10834 }
10835 return nil, gensupport.WrapError(&googleapi.Error{
10836 Code: res.StatusCode,
10837 Header: res.Header,
10838 })
10839 }
10840 if err != nil {
10841 return nil, err
10842 }
10843 defer googleapi.CloseBody(res)
10844 if err := googleapi.CheckResponse(res); err != nil {
10845 return nil, gensupport.WrapError(err)
10846 }
10847 ret := &Member{
10848 ServerResponse: googleapi.ServerResponse{
10849 Header: res.Header,
10850 HTTPStatusCode: res.StatusCode,
10851 },
10852 }
10853 target := &ret
10854 if err := gensupport.DecodeResponse(target, res); err != nil {
10855 return nil, err
10856 }
10857 return ret, nil
10858 }
10859
10860 type MembersHasMemberCall struct {
10861 s *Service
10862 groupKey string
10863 memberKey string
10864 urlParams_ gensupport.URLParams
10865 ifNoneMatch_ string
10866 ctx_ context.Context
10867 header_ http.Header
10868 }
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882 func (r *MembersService) HasMember(groupKey string, memberKey string) *MembersHasMemberCall {
10883 c := &MembersHasMemberCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10884 c.groupKey = groupKey
10885 c.memberKey = memberKey
10886 return c
10887 }
10888
10889
10890
10891
10892 func (c *MembersHasMemberCall) Fields(s ...googleapi.Field) *MembersHasMemberCall {
10893 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10894 return c
10895 }
10896
10897
10898
10899
10900 func (c *MembersHasMemberCall) IfNoneMatch(entityTag string) *MembersHasMemberCall {
10901 c.ifNoneMatch_ = entityTag
10902 return c
10903 }
10904
10905
10906 func (c *MembersHasMemberCall) Context(ctx context.Context) *MembersHasMemberCall {
10907 c.ctx_ = ctx
10908 return c
10909 }
10910
10911
10912
10913 func (c *MembersHasMemberCall) Header() http.Header {
10914 if c.header_ == nil {
10915 c.header_ = make(http.Header)
10916 }
10917 return c.header_
10918 }
10919
10920 func (c *MembersHasMemberCall) doRequest(alt string) (*http.Response, error) {
10921 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10922 if c.ifNoneMatch_ != "" {
10923 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10924 }
10925 var body io.Reader = nil
10926 c.urlParams_.Set("alt", alt)
10927 c.urlParams_.Set("prettyPrint", "false")
10928 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/hasMember/{memberKey}")
10929 urls += "?" + c.urlParams_.Encode()
10930 req, err := http.NewRequest("GET", urls, body)
10931 if err != nil {
10932 return nil, err
10933 }
10934 req.Header = reqHeaders
10935 googleapi.Expand(req.URL, map[string]string{
10936 "groupKey": c.groupKey,
10937 "memberKey": c.memberKey,
10938 })
10939 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10940 }
10941
10942
10943
10944
10945
10946
10947
10948 func (c *MembersHasMemberCall) Do(opts ...googleapi.CallOption) (*MembersHasMember, error) {
10949 gensupport.SetOptions(c.urlParams_, opts...)
10950 res, err := c.doRequest("json")
10951 if res != nil && res.StatusCode == http.StatusNotModified {
10952 if res.Body != nil {
10953 res.Body.Close()
10954 }
10955 return nil, gensupport.WrapError(&googleapi.Error{
10956 Code: res.StatusCode,
10957 Header: res.Header,
10958 })
10959 }
10960 if err != nil {
10961 return nil, err
10962 }
10963 defer googleapi.CloseBody(res)
10964 if err := googleapi.CheckResponse(res); err != nil {
10965 return nil, gensupport.WrapError(err)
10966 }
10967 ret := &MembersHasMember{
10968 ServerResponse: googleapi.ServerResponse{
10969 Header: res.Header,
10970 HTTPStatusCode: res.StatusCode,
10971 },
10972 }
10973 target := &ret
10974 if err := gensupport.DecodeResponse(target, res); err != nil {
10975 return nil, err
10976 }
10977 return ret, nil
10978 }
10979
10980 type MembersInsertCall struct {
10981 s *Service
10982 groupKey string
10983 member *Member
10984 urlParams_ gensupport.URLParams
10985 ctx_ context.Context
10986 header_ http.Header
10987 }
10988
10989
10990
10991
10992
10993 func (r *MembersService) Insert(groupKey string, member *Member) *MembersInsertCall {
10994 c := &MembersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10995 c.groupKey = groupKey
10996 c.member = member
10997 return c
10998 }
10999
11000
11001
11002
11003 func (c *MembersInsertCall) Fields(s ...googleapi.Field) *MembersInsertCall {
11004 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11005 return c
11006 }
11007
11008
11009 func (c *MembersInsertCall) Context(ctx context.Context) *MembersInsertCall {
11010 c.ctx_ = ctx
11011 return c
11012 }
11013
11014
11015
11016 func (c *MembersInsertCall) Header() http.Header {
11017 if c.header_ == nil {
11018 c.header_ = make(http.Header)
11019 }
11020 return c.header_
11021 }
11022
11023 func (c *MembersInsertCall) doRequest(alt string) (*http.Response, error) {
11024 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11025 var body io.Reader = nil
11026 body, err := googleapi.WithoutDataWrapper.JSONReader(c.member)
11027 if err != nil {
11028 return nil, err
11029 }
11030 c.urlParams_.Set("alt", alt)
11031 c.urlParams_.Set("prettyPrint", "false")
11032 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/members")
11033 urls += "?" + c.urlParams_.Encode()
11034 req, err := http.NewRequest("POST", urls, body)
11035 if err != nil {
11036 return nil, err
11037 }
11038 req.Header = reqHeaders
11039 googleapi.Expand(req.URL, map[string]string{
11040 "groupKey": c.groupKey,
11041 })
11042 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11043 }
11044
11045
11046
11047
11048
11049
11050 func (c *MembersInsertCall) Do(opts ...googleapi.CallOption) (*Member, error) {
11051 gensupport.SetOptions(c.urlParams_, opts...)
11052 res, err := c.doRequest("json")
11053 if res != nil && res.StatusCode == http.StatusNotModified {
11054 if res.Body != nil {
11055 res.Body.Close()
11056 }
11057 return nil, gensupport.WrapError(&googleapi.Error{
11058 Code: res.StatusCode,
11059 Header: res.Header,
11060 })
11061 }
11062 if err != nil {
11063 return nil, err
11064 }
11065 defer googleapi.CloseBody(res)
11066 if err := googleapi.CheckResponse(res); err != nil {
11067 return nil, gensupport.WrapError(err)
11068 }
11069 ret := &Member{
11070 ServerResponse: googleapi.ServerResponse{
11071 Header: res.Header,
11072 HTTPStatusCode: res.StatusCode,
11073 },
11074 }
11075 target := &ret
11076 if err := gensupport.DecodeResponse(target, res); err != nil {
11077 return nil, err
11078 }
11079 return ret, nil
11080 }
11081
11082 type MembersListCall struct {
11083 s *Service
11084 groupKey string
11085 urlParams_ gensupport.URLParams
11086 ifNoneMatch_ string
11087 ctx_ context.Context
11088 header_ http.Header
11089 }
11090
11091
11092
11093
11094
11095
11096
11097
11098 func (r *MembersService) List(groupKey string) *MembersListCall {
11099 c := &MembersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11100 c.groupKey = groupKey
11101 return c
11102 }
11103
11104
11105
11106
11107 func (c *MembersListCall) IncludeDerivedMembership(includeDerivedMembership bool) *MembersListCall {
11108 c.urlParams_.Set("includeDerivedMembership", fmt.Sprint(includeDerivedMembership))
11109 return c
11110 }
11111
11112
11113
11114 func (c *MembersListCall) MaxResults(maxResults int64) *MembersListCall {
11115 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
11116 return c
11117 }
11118
11119
11120
11121 func (c *MembersListCall) PageToken(pageToken string) *MembersListCall {
11122 c.urlParams_.Set("pageToken", pageToken)
11123 return c
11124 }
11125
11126
11127
11128
11129 func (c *MembersListCall) Roles(roles string) *MembersListCall {
11130 c.urlParams_.Set("roles", roles)
11131 return c
11132 }
11133
11134
11135
11136
11137 func (c *MembersListCall) Fields(s ...googleapi.Field) *MembersListCall {
11138 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11139 return c
11140 }
11141
11142
11143
11144
11145 func (c *MembersListCall) IfNoneMatch(entityTag string) *MembersListCall {
11146 c.ifNoneMatch_ = entityTag
11147 return c
11148 }
11149
11150
11151 func (c *MembersListCall) Context(ctx context.Context) *MembersListCall {
11152 c.ctx_ = ctx
11153 return c
11154 }
11155
11156
11157
11158 func (c *MembersListCall) Header() http.Header {
11159 if c.header_ == nil {
11160 c.header_ = make(http.Header)
11161 }
11162 return c.header_
11163 }
11164
11165 func (c *MembersListCall) doRequest(alt string) (*http.Response, error) {
11166 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11167 if c.ifNoneMatch_ != "" {
11168 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11169 }
11170 var body io.Reader = nil
11171 c.urlParams_.Set("alt", alt)
11172 c.urlParams_.Set("prettyPrint", "false")
11173 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/members")
11174 urls += "?" + c.urlParams_.Encode()
11175 req, err := http.NewRequest("GET", urls, body)
11176 if err != nil {
11177 return nil, err
11178 }
11179 req.Header = reqHeaders
11180 googleapi.Expand(req.URL, map[string]string{
11181 "groupKey": c.groupKey,
11182 })
11183 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11184 }
11185
11186
11187
11188
11189
11190
11191 func (c *MembersListCall) Do(opts ...googleapi.CallOption) (*Members, error) {
11192 gensupport.SetOptions(c.urlParams_, opts...)
11193 res, err := c.doRequest("json")
11194 if res != nil && res.StatusCode == http.StatusNotModified {
11195 if res.Body != nil {
11196 res.Body.Close()
11197 }
11198 return nil, gensupport.WrapError(&googleapi.Error{
11199 Code: res.StatusCode,
11200 Header: res.Header,
11201 })
11202 }
11203 if err != nil {
11204 return nil, err
11205 }
11206 defer googleapi.CloseBody(res)
11207 if err := googleapi.CheckResponse(res); err != nil {
11208 return nil, gensupport.WrapError(err)
11209 }
11210 ret := &Members{
11211 ServerResponse: googleapi.ServerResponse{
11212 Header: res.Header,
11213 HTTPStatusCode: res.StatusCode,
11214 },
11215 }
11216 target := &ret
11217 if err := gensupport.DecodeResponse(target, res); err != nil {
11218 return nil, err
11219 }
11220 return ret, nil
11221 }
11222
11223
11224
11225
11226 func (c *MembersListCall) Pages(ctx context.Context, f func(*Members) error) error {
11227 c.ctx_ = ctx
11228 defer c.PageToken(c.urlParams_.Get("pageToken"))
11229 for {
11230 x, err := c.Do()
11231 if err != nil {
11232 return err
11233 }
11234 if err := f(x); err != nil {
11235 return err
11236 }
11237 if x.NextPageToken == "" {
11238 return nil
11239 }
11240 c.PageToken(x.NextPageToken)
11241 }
11242 }
11243
11244 type MembersPatchCall struct {
11245 s *Service
11246 groupKey string
11247 memberKey string
11248 member *Member
11249 urlParams_ gensupport.URLParams
11250 ctx_ context.Context
11251 header_ http.Header
11252 }
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263 func (r *MembersService) Patch(groupKey string, memberKey string, member *Member) *MembersPatchCall {
11264 c := &MembersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11265 c.groupKey = groupKey
11266 c.memberKey = memberKey
11267 c.member = member
11268 return c
11269 }
11270
11271
11272
11273
11274 func (c *MembersPatchCall) Fields(s ...googleapi.Field) *MembersPatchCall {
11275 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11276 return c
11277 }
11278
11279
11280 func (c *MembersPatchCall) Context(ctx context.Context) *MembersPatchCall {
11281 c.ctx_ = ctx
11282 return c
11283 }
11284
11285
11286
11287 func (c *MembersPatchCall) Header() http.Header {
11288 if c.header_ == nil {
11289 c.header_ = make(http.Header)
11290 }
11291 return c.header_
11292 }
11293
11294 func (c *MembersPatchCall) doRequest(alt string) (*http.Response, error) {
11295 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11296 var body io.Reader = nil
11297 body, err := googleapi.WithoutDataWrapper.JSONReader(c.member)
11298 if err != nil {
11299 return nil, err
11300 }
11301 c.urlParams_.Set("alt", alt)
11302 c.urlParams_.Set("prettyPrint", "false")
11303 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/members/{memberKey}")
11304 urls += "?" + c.urlParams_.Encode()
11305 req, err := http.NewRequest("PATCH", urls, body)
11306 if err != nil {
11307 return nil, err
11308 }
11309 req.Header = reqHeaders
11310 googleapi.Expand(req.URL, map[string]string{
11311 "groupKey": c.groupKey,
11312 "memberKey": c.memberKey,
11313 })
11314 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11315 }
11316
11317
11318
11319
11320
11321
11322 func (c *MembersPatchCall) Do(opts ...googleapi.CallOption) (*Member, error) {
11323 gensupport.SetOptions(c.urlParams_, opts...)
11324 res, err := c.doRequest("json")
11325 if res != nil && res.StatusCode == http.StatusNotModified {
11326 if res.Body != nil {
11327 res.Body.Close()
11328 }
11329 return nil, gensupport.WrapError(&googleapi.Error{
11330 Code: res.StatusCode,
11331 Header: res.Header,
11332 })
11333 }
11334 if err != nil {
11335 return nil, err
11336 }
11337 defer googleapi.CloseBody(res)
11338 if err := googleapi.CheckResponse(res); err != nil {
11339 return nil, gensupport.WrapError(err)
11340 }
11341 ret := &Member{
11342 ServerResponse: googleapi.ServerResponse{
11343 Header: res.Header,
11344 HTTPStatusCode: res.StatusCode,
11345 },
11346 }
11347 target := &ret
11348 if err := gensupport.DecodeResponse(target, res); err != nil {
11349 return nil, err
11350 }
11351 return ret, nil
11352 }
11353
11354 type MembersUpdateCall struct {
11355 s *Service
11356 groupKey string
11357 memberKey string
11358 member *Member
11359 urlParams_ gensupport.URLParams
11360 ctx_ context.Context
11361 header_ http.Header
11362 }
11363
11364
11365
11366
11367
11368
11369
11370
11371 func (r *MembersService) Update(groupKey string, memberKey string, member *Member) *MembersUpdateCall {
11372 c := &MembersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11373 c.groupKey = groupKey
11374 c.memberKey = memberKey
11375 c.member = member
11376 return c
11377 }
11378
11379
11380
11381
11382 func (c *MembersUpdateCall) Fields(s ...googleapi.Field) *MembersUpdateCall {
11383 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11384 return c
11385 }
11386
11387
11388 func (c *MembersUpdateCall) Context(ctx context.Context) *MembersUpdateCall {
11389 c.ctx_ = ctx
11390 return c
11391 }
11392
11393
11394
11395 func (c *MembersUpdateCall) Header() http.Header {
11396 if c.header_ == nil {
11397 c.header_ = make(http.Header)
11398 }
11399 return c.header_
11400 }
11401
11402 func (c *MembersUpdateCall) doRequest(alt string) (*http.Response, error) {
11403 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11404 var body io.Reader = nil
11405 body, err := googleapi.WithoutDataWrapper.JSONReader(c.member)
11406 if err != nil {
11407 return nil, err
11408 }
11409 c.urlParams_.Set("alt", alt)
11410 c.urlParams_.Set("prettyPrint", "false")
11411 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/members/{memberKey}")
11412 urls += "?" + c.urlParams_.Encode()
11413 req, err := http.NewRequest("PUT", urls, body)
11414 if err != nil {
11415 return nil, err
11416 }
11417 req.Header = reqHeaders
11418 googleapi.Expand(req.URL, map[string]string{
11419 "groupKey": c.groupKey,
11420 "memberKey": c.memberKey,
11421 })
11422 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11423 }
11424
11425
11426
11427
11428
11429
11430 func (c *MembersUpdateCall) Do(opts ...googleapi.CallOption) (*Member, error) {
11431 gensupport.SetOptions(c.urlParams_, opts...)
11432 res, err := c.doRequest("json")
11433 if res != nil && res.StatusCode == http.StatusNotModified {
11434 if res.Body != nil {
11435 res.Body.Close()
11436 }
11437 return nil, gensupport.WrapError(&googleapi.Error{
11438 Code: res.StatusCode,
11439 Header: res.Header,
11440 })
11441 }
11442 if err != nil {
11443 return nil, err
11444 }
11445 defer googleapi.CloseBody(res)
11446 if err := googleapi.CheckResponse(res); err != nil {
11447 return nil, gensupport.WrapError(err)
11448 }
11449 ret := &Member{
11450 ServerResponse: googleapi.ServerResponse{
11451 Header: res.Header,
11452 HTTPStatusCode: res.StatusCode,
11453 },
11454 }
11455 target := &ret
11456 if err := gensupport.DecodeResponse(target, res); err != nil {
11457 return nil, err
11458 }
11459 return ret, nil
11460 }
11461
11462 type MobiledevicesActionCall struct {
11463 s *Service
11464 customerId string
11465 resourceId string
11466 mobiledeviceaction *MobileDeviceAction
11467 urlParams_ gensupport.URLParams
11468 ctx_ context.Context
11469 header_ http.Header
11470 }
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481 func (r *MobiledevicesService) Action(customerId string, resourceId string, mobiledeviceaction *MobileDeviceAction) *MobiledevicesActionCall {
11482 c := &MobiledevicesActionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11483 c.customerId = customerId
11484 c.resourceId = resourceId
11485 c.mobiledeviceaction = mobiledeviceaction
11486 return c
11487 }
11488
11489
11490
11491
11492 func (c *MobiledevicesActionCall) Fields(s ...googleapi.Field) *MobiledevicesActionCall {
11493 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11494 return c
11495 }
11496
11497
11498 func (c *MobiledevicesActionCall) Context(ctx context.Context) *MobiledevicesActionCall {
11499 c.ctx_ = ctx
11500 return c
11501 }
11502
11503
11504
11505 func (c *MobiledevicesActionCall) Header() http.Header {
11506 if c.header_ == nil {
11507 c.header_ = make(http.Header)
11508 }
11509 return c.header_
11510 }
11511
11512 func (c *MobiledevicesActionCall) doRequest(alt string) (*http.Response, error) {
11513 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11514 var body io.Reader = nil
11515 body, err := googleapi.WithoutDataWrapper.JSONReader(c.mobiledeviceaction)
11516 if err != nil {
11517 return nil, err
11518 }
11519 c.urlParams_.Set("alt", alt)
11520 c.urlParams_.Set("prettyPrint", "false")
11521 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}/action")
11522 urls += "?" + c.urlParams_.Encode()
11523 req, err := http.NewRequest("POST", urls, body)
11524 if err != nil {
11525 return nil, err
11526 }
11527 req.Header = reqHeaders
11528 googleapi.Expand(req.URL, map[string]string{
11529 "customerId": c.customerId,
11530 "resourceId": c.resourceId,
11531 })
11532 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11533 }
11534
11535
11536 func (c *MobiledevicesActionCall) Do(opts ...googleapi.CallOption) error {
11537 gensupport.SetOptions(c.urlParams_, opts...)
11538 res, err := c.doRequest("json")
11539 if err != nil {
11540 return err
11541 }
11542 defer googleapi.CloseBody(res)
11543 if err := googleapi.CheckResponse(res); err != nil {
11544 return gensupport.WrapError(err)
11545 }
11546 return nil
11547 }
11548
11549 type MobiledevicesDeleteCall struct {
11550 s *Service
11551 customerId string
11552 resourceId string
11553 urlParams_ gensupport.URLParams
11554 ctx_ context.Context
11555 header_ http.Header
11556 }
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566 func (r *MobiledevicesService) Delete(customerId string, resourceId string) *MobiledevicesDeleteCall {
11567 c := &MobiledevicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11568 c.customerId = customerId
11569 c.resourceId = resourceId
11570 return c
11571 }
11572
11573
11574
11575
11576 func (c *MobiledevicesDeleteCall) Fields(s ...googleapi.Field) *MobiledevicesDeleteCall {
11577 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11578 return c
11579 }
11580
11581
11582 func (c *MobiledevicesDeleteCall) Context(ctx context.Context) *MobiledevicesDeleteCall {
11583 c.ctx_ = ctx
11584 return c
11585 }
11586
11587
11588
11589 func (c *MobiledevicesDeleteCall) Header() http.Header {
11590 if c.header_ == nil {
11591 c.header_ = make(http.Header)
11592 }
11593 return c.header_
11594 }
11595
11596 func (c *MobiledevicesDeleteCall) doRequest(alt string) (*http.Response, error) {
11597 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11598 var body io.Reader = nil
11599 c.urlParams_.Set("alt", alt)
11600 c.urlParams_.Set("prettyPrint", "false")
11601 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}")
11602 urls += "?" + c.urlParams_.Encode()
11603 req, err := http.NewRequest("DELETE", urls, body)
11604 if err != nil {
11605 return nil, err
11606 }
11607 req.Header = reqHeaders
11608 googleapi.Expand(req.URL, map[string]string{
11609 "customerId": c.customerId,
11610 "resourceId": c.resourceId,
11611 })
11612 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11613 }
11614
11615
11616 func (c *MobiledevicesDeleteCall) Do(opts ...googleapi.CallOption) error {
11617 gensupport.SetOptions(c.urlParams_, opts...)
11618 res, err := c.doRequest("json")
11619 if err != nil {
11620 return err
11621 }
11622 defer googleapi.CloseBody(res)
11623 if err := googleapi.CheckResponse(res); err != nil {
11624 return gensupport.WrapError(err)
11625 }
11626 return nil
11627 }
11628
11629 type MobiledevicesGetCall struct {
11630 s *Service
11631 customerId string
11632 resourceId string
11633 urlParams_ gensupport.URLParams
11634 ifNoneMatch_ string
11635 ctx_ context.Context
11636 header_ http.Header
11637 }
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647 func (r *MobiledevicesService) Get(customerId string, resourceId string) *MobiledevicesGetCall {
11648 c := &MobiledevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11649 c.customerId = customerId
11650 c.resourceId = resourceId
11651 return c
11652 }
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664 func (c *MobiledevicesGetCall) Projection(projection string) *MobiledevicesGetCall {
11665 c.urlParams_.Set("projection", projection)
11666 return c
11667 }
11668
11669
11670
11671
11672 func (c *MobiledevicesGetCall) Fields(s ...googleapi.Field) *MobiledevicesGetCall {
11673 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11674 return c
11675 }
11676
11677
11678
11679
11680 func (c *MobiledevicesGetCall) IfNoneMatch(entityTag string) *MobiledevicesGetCall {
11681 c.ifNoneMatch_ = entityTag
11682 return c
11683 }
11684
11685
11686 func (c *MobiledevicesGetCall) Context(ctx context.Context) *MobiledevicesGetCall {
11687 c.ctx_ = ctx
11688 return c
11689 }
11690
11691
11692
11693 func (c *MobiledevicesGetCall) Header() http.Header {
11694 if c.header_ == nil {
11695 c.header_ = make(http.Header)
11696 }
11697 return c.header_
11698 }
11699
11700 func (c *MobiledevicesGetCall) doRequest(alt string) (*http.Response, error) {
11701 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11702 if c.ifNoneMatch_ != "" {
11703 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11704 }
11705 var body io.Reader = nil
11706 c.urlParams_.Set("alt", alt)
11707 c.urlParams_.Set("prettyPrint", "false")
11708 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}")
11709 urls += "?" + c.urlParams_.Encode()
11710 req, err := http.NewRequest("GET", urls, body)
11711 if err != nil {
11712 return nil, err
11713 }
11714 req.Header = reqHeaders
11715 googleapi.Expand(req.URL, map[string]string{
11716 "customerId": c.customerId,
11717 "resourceId": c.resourceId,
11718 })
11719 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11720 }
11721
11722
11723
11724
11725
11726
11727 func (c *MobiledevicesGetCall) Do(opts ...googleapi.CallOption) (*MobileDevice, error) {
11728 gensupport.SetOptions(c.urlParams_, opts...)
11729 res, err := c.doRequest("json")
11730 if res != nil && res.StatusCode == http.StatusNotModified {
11731 if res.Body != nil {
11732 res.Body.Close()
11733 }
11734 return nil, gensupport.WrapError(&googleapi.Error{
11735 Code: res.StatusCode,
11736 Header: res.Header,
11737 })
11738 }
11739 if err != nil {
11740 return nil, err
11741 }
11742 defer googleapi.CloseBody(res)
11743 if err := googleapi.CheckResponse(res); err != nil {
11744 return nil, gensupport.WrapError(err)
11745 }
11746 ret := &MobileDevice{
11747 ServerResponse: googleapi.ServerResponse{
11748 Header: res.Header,
11749 HTTPStatusCode: res.StatusCode,
11750 },
11751 }
11752 target := &ret
11753 if err := gensupport.DecodeResponse(target, res); err != nil {
11754 return nil, err
11755 }
11756 return ret, nil
11757 }
11758
11759 type MobiledevicesListCall struct {
11760 s *Service
11761 customerId string
11762 urlParams_ gensupport.URLParams
11763 ifNoneMatch_ string
11764 ctx_ context.Context
11765 header_ http.Header
11766 }
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780 func (r *MobiledevicesService) List(customerId string) *MobiledevicesListCall {
11781 c := &MobiledevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11782 c.customerId = customerId
11783 return c
11784 }
11785
11786
11787
11788 func (c *MobiledevicesListCall) MaxResults(maxResults int64) *MobiledevicesListCall {
11789 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
11790 return c
11791 }
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809 func (c *MobiledevicesListCall) OrderBy(orderBy string) *MobiledevicesListCall {
11810 c.urlParams_.Set("orderBy", orderBy)
11811 return c
11812 }
11813
11814
11815
11816 func (c *MobiledevicesListCall) PageToken(pageToken string) *MobiledevicesListCall {
11817 c.urlParams_.Set("pageToken", pageToken)
11818 return c
11819 }
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831 func (c *MobiledevicesListCall) Projection(projection string) *MobiledevicesListCall {
11832 c.urlParams_.Set("projection", projection)
11833 return c
11834 }
11835
11836
11837
11838 func (c *MobiledevicesListCall) Query(query string) *MobiledevicesListCall {
11839 c.urlParams_.Set("query", query)
11840 return c
11841 }
11842
11843
11844
11845
11846
11847
11848
11849
11850 func (c *MobiledevicesListCall) SortOrder(sortOrder string) *MobiledevicesListCall {
11851 c.urlParams_.Set("sortOrder", sortOrder)
11852 return c
11853 }
11854
11855
11856
11857
11858 func (c *MobiledevicesListCall) Fields(s ...googleapi.Field) *MobiledevicesListCall {
11859 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11860 return c
11861 }
11862
11863
11864
11865
11866 func (c *MobiledevicesListCall) IfNoneMatch(entityTag string) *MobiledevicesListCall {
11867 c.ifNoneMatch_ = entityTag
11868 return c
11869 }
11870
11871
11872 func (c *MobiledevicesListCall) Context(ctx context.Context) *MobiledevicesListCall {
11873 c.ctx_ = ctx
11874 return c
11875 }
11876
11877
11878
11879 func (c *MobiledevicesListCall) Header() http.Header {
11880 if c.header_ == nil {
11881 c.header_ = make(http.Header)
11882 }
11883 return c.header_
11884 }
11885
11886 func (c *MobiledevicesListCall) doRequest(alt string) (*http.Response, error) {
11887 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11888 if c.ifNoneMatch_ != "" {
11889 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11890 }
11891 var body io.Reader = nil
11892 c.urlParams_.Set("alt", alt)
11893 c.urlParams_.Set("prettyPrint", "false")
11894 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/mobile")
11895 urls += "?" + c.urlParams_.Encode()
11896 req, err := http.NewRequest("GET", urls, body)
11897 if err != nil {
11898 return nil, err
11899 }
11900 req.Header = reqHeaders
11901 googleapi.Expand(req.URL, map[string]string{
11902 "customerId": c.customerId,
11903 })
11904 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11905 }
11906
11907
11908
11909
11910
11911
11912 func (c *MobiledevicesListCall) Do(opts ...googleapi.CallOption) (*MobileDevices, error) {
11913 gensupport.SetOptions(c.urlParams_, opts...)
11914 res, err := c.doRequest("json")
11915 if res != nil && res.StatusCode == http.StatusNotModified {
11916 if res.Body != nil {
11917 res.Body.Close()
11918 }
11919 return nil, gensupport.WrapError(&googleapi.Error{
11920 Code: res.StatusCode,
11921 Header: res.Header,
11922 })
11923 }
11924 if err != nil {
11925 return nil, err
11926 }
11927 defer googleapi.CloseBody(res)
11928 if err := googleapi.CheckResponse(res); err != nil {
11929 return nil, gensupport.WrapError(err)
11930 }
11931 ret := &MobileDevices{
11932 ServerResponse: googleapi.ServerResponse{
11933 Header: res.Header,
11934 HTTPStatusCode: res.StatusCode,
11935 },
11936 }
11937 target := &ret
11938 if err := gensupport.DecodeResponse(target, res); err != nil {
11939 return nil, err
11940 }
11941 return ret, nil
11942 }
11943
11944
11945
11946
11947 func (c *MobiledevicesListCall) Pages(ctx context.Context, f func(*MobileDevices) error) error {
11948 c.ctx_ = ctx
11949 defer c.PageToken(c.urlParams_.Get("pageToken"))
11950 for {
11951 x, err := c.Do()
11952 if err != nil {
11953 return err
11954 }
11955 if err := f(x); err != nil {
11956 return err
11957 }
11958 if x.NextPageToken == "" {
11959 return nil
11960 }
11961 c.PageToken(x.NextPageToken)
11962 }
11963 }
11964
11965 type OrgunitsDeleteCall struct {
11966 s *Service
11967 customerId string
11968 orgUnitPath string
11969 urlParams_ gensupport.URLParams
11970 ctx_ context.Context
11971 header_ http.Header
11972 }
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982 func (r *OrgunitsService) Delete(customerId string, orgUnitPath string) *OrgunitsDeleteCall {
11983 c := &OrgunitsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11984 c.customerId = customerId
11985 c.orgUnitPath = orgUnitPath
11986 return c
11987 }
11988
11989
11990
11991
11992 func (c *OrgunitsDeleteCall) Fields(s ...googleapi.Field) *OrgunitsDeleteCall {
11993 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11994 return c
11995 }
11996
11997
11998 func (c *OrgunitsDeleteCall) Context(ctx context.Context) *OrgunitsDeleteCall {
11999 c.ctx_ = ctx
12000 return c
12001 }
12002
12003
12004
12005 func (c *OrgunitsDeleteCall) Header() http.Header {
12006 if c.header_ == nil {
12007 c.header_ = make(http.Header)
12008 }
12009 return c.header_
12010 }
12011
12012 func (c *OrgunitsDeleteCall) doRequest(alt string) (*http.Response, error) {
12013 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12014 var body io.Reader = nil
12015 c.urlParams_.Set("alt", alt)
12016 c.urlParams_.Set("prettyPrint", "false")
12017 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}")
12018 urls += "?" + c.urlParams_.Encode()
12019 req, err := http.NewRequest("DELETE", urls, body)
12020 if err != nil {
12021 return nil, err
12022 }
12023 req.Header = reqHeaders
12024 googleapi.Expand(req.URL, map[string]string{
12025 "customerId": c.customerId,
12026 "orgUnitPath": c.orgUnitPath,
12027 })
12028 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12029 }
12030
12031
12032 func (c *OrgunitsDeleteCall) Do(opts ...googleapi.CallOption) error {
12033 gensupport.SetOptions(c.urlParams_, opts...)
12034 res, err := c.doRequest("json")
12035 if err != nil {
12036 return err
12037 }
12038 defer googleapi.CloseBody(res)
12039 if err := googleapi.CheckResponse(res); err != nil {
12040 return gensupport.WrapError(err)
12041 }
12042 return nil
12043 }
12044
12045 type OrgunitsGetCall struct {
12046 s *Service
12047 customerId string
12048 orgUnitPath string
12049 urlParams_ gensupport.URLParams
12050 ifNoneMatch_ string
12051 ctx_ context.Context
12052 header_ http.Header
12053 }
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063 func (r *OrgunitsService) Get(customerId string, orgUnitPath string) *OrgunitsGetCall {
12064 c := &OrgunitsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12065 c.customerId = customerId
12066 c.orgUnitPath = orgUnitPath
12067 return c
12068 }
12069
12070
12071
12072
12073 func (c *OrgunitsGetCall) Fields(s ...googleapi.Field) *OrgunitsGetCall {
12074 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12075 return c
12076 }
12077
12078
12079
12080
12081 func (c *OrgunitsGetCall) IfNoneMatch(entityTag string) *OrgunitsGetCall {
12082 c.ifNoneMatch_ = entityTag
12083 return c
12084 }
12085
12086
12087 func (c *OrgunitsGetCall) Context(ctx context.Context) *OrgunitsGetCall {
12088 c.ctx_ = ctx
12089 return c
12090 }
12091
12092
12093
12094 func (c *OrgunitsGetCall) Header() http.Header {
12095 if c.header_ == nil {
12096 c.header_ = make(http.Header)
12097 }
12098 return c.header_
12099 }
12100
12101 func (c *OrgunitsGetCall) doRequest(alt string) (*http.Response, error) {
12102 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12103 if c.ifNoneMatch_ != "" {
12104 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12105 }
12106 var body io.Reader = nil
12107 c.urlParams_.Set("alt", alt)
12108 c.urlParams_.Set("prettyPrint", "false")
12109 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}")
12110 urls += "?" + c.urlParams_.Encode()
12111 req, err := http.NewRequest("GET", urls, body)
12112 if err != nil {
12113 return nil, err
12114 }
12115 req.Header = reqHeaders
12116 googleapi.Expand(req.URL, map[string]string{
12117 "customerId": c.customerId,
12118 "orgUnitPath": c.orgUnitPath,
12119 })
12120 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12121 }
12122
12123
12124
12125
12126
12127
12128 func (c *OrgunitsGetCall) Do(opts ...googleapi.CallOption) (*OrgUnit, error) {
12129 gensupport.SetOptions(c.urlParams_, opts...)
12130 res, err := c.doRequest("json")
12131 if res != nil && res.StatusCode == http.StatusNotModified {
12132 if res.Body != nil {
12133 res.Body.Close()
12134 }
12135 return nil, gensupport.WrapError(&googleapi.Error{
12136 Code: res.StatusCode,
12137 Header: res.Header,
12138 })
12139 }
12140 if err != nil {
12141 return nil, err
12142 }
12143 defer googleapi.CloseBody(res)
12144 if err := googleapi.CheckResponse(res); err != nil {
12145 return nil, gensupport.WrapError(err)
12146 }
12147 ret := &OrgUnit{
12148 ServerResponse: googleapi.ServerResponse{
12149 Header: res.Header,
12150 HTTPStatusCode: res.StatusCode,
12151 },
12152 }
12153 target := &ret
12154 if err := gensupport.DecodeResponse(target, res); err != nil {
12155 return nil, err
12156 }
12157 return ret, nil
12158 }
12159
12160 type OrgunitsInsertCall struct {
12161 s *Service
12162 customerId string
12163 orgunit *OrgUnit
12164 urlParams_ gensupport.URLParams
12165 ctx_ context.Context
12166 header_ http.Header
12167 }
12168
12169
12170
12171
12172
12173
12174
12175 func (r *OrgunitsService) Insert(customerId string, orgunit *OrgUnit) *OrgunitsInsertCall {
12176 c := &OrgunitsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12177 c.customerId = customerId
12178 c.orgunit = orgunit
12179 return c
12180 }
12181
12182
12183
12184
12185 func (c *OrgunitsInsertCall) Fields(s ...googleapi.Field) *OrgunitsInsertCall {
12186 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12187 return c
12188 }
12189
12190
12191 func (c *OrgunitsInsertCall) Context(ctx context.Context) *OrgunitsInsertCall {
12192 c.ctx_ = ctx
12193 return c
12194 }
12195
12196
12197
12198 func (c *OrgunitsInsertCall) Header() http.Header {
12199 if c.header_ == nil {
12200 c.header_ = make(http.Header)
12201 }
12202 return c.header_
12203 }
12204
12205 func (c *OrgunitsInsertCall) doRequest(alt string) (*http.Response, error) {
12206 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12207 var body io.Reader = nil
12208 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orgunit)
12209 if err != nil {
12210 return nil, err
12211 }
12212 c.urlParams_.Set("alt", alt)
12213 c.urlParams_.Set("prettyPrint", "false")
12214 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/orgunits")
12215 urls += "?" + c.urlParams_.Encode()
12216 req, err := http.NewRequest("POST", urls, body)
12217 if err != nil {
12218 return nil, err
12219 }
12220 req.Header = reqHeaders
12221 googleapi.Expand(req.URL, map[string]string{
12222 "customerId": c.customerId,
12223 })
12224 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12225 }
12226
12227
12228
12229
12230
12231
12232 func (c *OrgunitsInsertCall) Do(opts ...googleapi.CallOption) (*OrgUnit, error) {
12233 gensupport.SetOptions(c.urlParams_, opts...)
12234 res, err := c.doRequest("json")
12235 if res != nil && res.StatusCode == http.StatusNotModified {
12236 if res.Body != nil {
12237 res.Body.Close()
12238 }
12239 return nil, gensupport.WrapError(&googleapi.Error{
12240 Code: res.StatusCode,
12241 Header: res.Header,
12242 })
12243 }
12244 if err != nil {
12245 return nil, err
12246 }
12247 defer googleapi.CloseBody(res)
12248 if err := googleapi.CheckResponse(res); err != nil {
12249 return nil, gensupport.WrapError(err)
12250 }
12251 ret := &OrgUnit{
12252 ServerResponse: googleapi.ServerResponse{
12253 Header: res.Header,
12254 HTTPStatusCode: res.StatusCode,
12255 },
12256 }
12257 target := &ret
12258 if err := gensupport.DecodeResponse(target, res); err != nil {
12259 return nil, err
12260 }
12261 return ret, nil
12262 }
12263
12264 type OrgunitsListCall struct {
12265 s *Service
12266 customerId string
12267 urlParams_ gensupport.URLParams
12268 ifNoneMatch_ string
12269 ctx_ context.Context
12270 header_ http.Header
12271 }
12272
12273
12274
12275
12276
12277
12278
12279 func (r *OrgunitsService) List(customerId string) *OrgunitsListCall {
12280 c := &OrgunitsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12281 c.customerId = customerId
12282 return c
12283 }
12284
12285
12286
12287
12288 func (c *OrgunitsListCall) OrgUnitPath(orgUnitPath string) *OrgunitsListCall {
12289 c.urlParams_.Set("orgUnitPath", orgUnitPath)
12290 return c
12291 }
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303 func (c *OrgunitsListCall) Type(type_ string) *OrgunitsListCall {
12304 c.urlParams_.Set("type", type_)
12305 return c
12306 }
12307
12308
12309
12310
12311 func (c *OrgunitsListCall) Fields(s ...googleapi.Field) *OrgunitsListCall {
12312 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12313 return c
12314 }
12315
12316
12317
12318
12319 func (c *OrgunitsListCall) IfNoneMatch(entityTag string) *OrgunitsListCall {
12320 c.ifNoneMatch_ = entityTag
12321 return c
12322 }
12323
12324
12325 func (c *OrgunitsListCall) Context(ctx context.Context) *OrgunitsListCall {
12326 c.ctx_ = ctx
12327 return c
12328 }
12329
12330
12331
12332 func (c *OrgunitsListCall) Header() http.Header {
12333 if c.header_ == nil {
12334 c.header_ = make(http.Header)
12335 }
12336 return c.header_
12337 }
12338
12339 func (c *OrgunitsListCall) doRequest(alt string) (*http.Response, error) {
12340 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12341 if c.ifNoneMatch_ != "" {
12342 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12343 }
12344 var body io.Reader = nil
12345 c.urlParams_.Set("alt", alt)
12346 c.urlParams_.Set("prettyPrint", "false")
12347 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/orgunits")
12348 urls += "?" + c.urlParams_.Encode()
12349 req, err := http.NewRequest("GET", urls, body)
12350 if err != nil {
12351 return nil, err
12352 }
12353 req.Header = reqHeaders
12354 googleapi.Expand(req.URL, map[string]string{
12355 "customerId": c.customerId,
12356 })
12357 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12358 }
12359
12360
12361
12362
12363
12364
12365 func (c *OrgunitsListCall) Do(opts ...googleapi.CallOption) (*OrgUnits, error) {
12366 gensupport.SetOptions(c.urlParams_, opts...)
12367 res, err := c.doRequest("json")
12368 if res != nil && res.StatusCode == http.StatusNotModified {
12369 if res.Body != nil {
12370 res.Body.Close()
12371 }
12372 return nil, gensupport.WrapError(&googleapi.Error{
12373 Code: res.StatusCode,
12374 Header: res.Header,
12375 })
12376 }
12377 if err != nil {
12378 return nil, err
12379 }
12380 defer googleapi.CloseBody(res)
12381 if err := googleapi.CheckResponse(res); err != nil {
12382 return nil, gensupport.WrapError(err)
12383 }
12384 ret := &OrgUnits{
12385 ServerResponse: googleapi.ServerResponse{
12386 Header: res.Header,
12387 HTTPStatusCode: res.StatusCode,
12388 },
12389 }
12390 target := &ret
12391 if err := gensupport.DecodeResponse(target, res); err != nil {
12392 return nil, err
12393 }
12394 return ret, nil
12395 }
12396
12397 type OrgunitsPatchCall struct {
12398 s *Service
12399 customerId string
12400 orgUnitPath string
12401 orgunit *OrgUnit
12402 urlParams_ gensupport.URLParams
12403 ctx_ context.Context
12404 header_ http.Header
12405 }
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416 func (r *OrgunitsService) Patch(customerId string, orgUnitPath string, orgunit *OrgUnit) *OrgunitsPatchCall {
12417 c := &OrgunitsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12418 c.customerId = customerId
12419 c.orgUnitPath = orgUnitPath
12420 c.orgunit = orgunit
12421 return c
12422 }
12423
12424
12425
12426
12427 func (c *OrgunitsPatchCall) Fields(s ...googleapi.Field) *OrgunitsPatchCall {
12428 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12429 return c
12430 }
12431
12432
12433 func (c *OrgunitsPatchCall) Context(ctx context.Context) *OrgunitsPatchCall {
12434 c.ctx_ = ctx
12435 return c
12436 }
12437
12438
12439
12440 func (c *OrgunitsPatchCall) Header() http.Header {
12441 if c.header_ == nil {
12442 c.header_ = make(http.Header)
12443 }
12444 return c.header_
12445 }
12446
12447 func (c *OrgunitsPatchCall) doRequest(alt string) (*http.Response, error) {
12448 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12449 var body io.Reader = nil
12450 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orgunit)
12451 if err != nil {
12452 return nil, err
12453 }
12454 c.urlParams_.Set("alt", alt)
12455 c.urlParams_.Set("prettyPrint", "false")
12456 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}")
12457 urls += "?" + c.urlParams_.Encode()
12458 req, err := http.NewRequest("PATCH", urls, body)
12459 if err != nil {
12460 return nil, err
12461 }
12462 req.Header = reqHeaders
12463 googleapi.Expand(req.URL, map[string]string{
12464 "customerId": c.customerId,
12465 "orgUnitPath": c.orgUnitPath,
12466 })
12467 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12468 }
12469
12470
12471
12472
12473
12474
12475 func (c *OrgunitsPatchCall) Do(opts ...googleapi.CallOption) (*OrgUnit, error) {
12476 gensupport.SetOptions(c.urlParams_, opts...)
12477 res, err := c.doRequest("json")
12478 if res != nil && res.StatusCode == http.StatusNotModified {
12479 if res.Body != nil {
12480 res.Body.Close()
12481 }
12482 return nil, gensupport.WrapError(&googleapi.Error{
12483 Code: res.StatusCode,
12484 Header: res.Header,
12485 })
12486 }
12487 if err != nil {
12488 return nil, err
12489 }
12490 defer googleapi.CloseBody(res)
12491 if err := googleapi.CheckResponse(res); err != nil {
12492 return nil, gensupport.WrapError(err)
12493 }
12494 ret := &OrgUnit{
12495 ServerResponse: googleapi.ServerResponse{
12496 Header: res.Header,
12497 HTTPStatusCode: res.StatusCode,
12498 },
12499 }
12500 target := &ret
12501 if err := gensupport.DecodeResponse(target, res); err != nil {
12502 return nil, err
12503 }
12504 return ret, nil
12505 }
12506
12507 type OrgunitsUpdateCall struct {
12508 s *Service
12509 customerId string
12510 orgUnitPath string
12511 orgunit *OrgUnit
12512 urlParams_ gensupport.URLParams
12513 ctx_ context.Context
12514 header_ http.Header
12515 }
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525 func (r *OrgunitsService) Update(customerId string, orgUnitPath string, orgunit *OrgUnit) *OrgunitsUpdateCall {
12526 c := &OrgunitsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12527 c.customerId = customerId
12528 c.orgUnitPath = orgUnitPath
12529 c.orgunit = orgunit
12530 return c
12531 }
12532
12533
12534
12535
12536 func (c *OrgunitsUpdateCall) Fields(s ...googleapi.Field) *OrgunitsUpdateCall {
12537 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12538 return c
12539 }
12540
12541
12542 func (c *OrgunitsUpdateCall) Context(ctx context.Context) *OrgunitsUpdateCall {
12543 c.ctx_ = ctx
12544 return c
12545 }
12546
12547
12548
12549 func (c *OrgunitsUpdateCall) Header() http.Header {
12550 if c.header_ == nil {
12551 c.header_ = make(http.Header)
12552 }
12553 return c.header_
12554 }
12555
12556 func (c *OrgunitsUpdateCall) doRequest(alt string) (*http.Response, error) {
12557 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12558 var body io.Reader = nil
12559 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orgunit)
12560 if err != nil {
12561 return nil, err
12562 }
12563 c.urlParams_.Set("alt", alt)
12564 c.urlParams_.Set("prettyPrint", "false")
12565 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}")
12566 urls += "?" + c.urlParams_.Encode()
12567 req, err := http.NewRequest("PUT", urls, body)
12568 if err != nil {
12569 return nil, err
12570 }
12571 req.Header = reqHeaders
12572 googleapi.Expand(req.URL, map[string]string{
12573 "customerId": c.customerId,
12574 "orgUnitPath": c.orgUnitPath,
12575 })
12576 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12577 }
12578
12579
12580
12581
12582
12583
12584 func (c *OrgunitsUpdateCall) Do(opts ...googleapi.CallOption) (*OrgUnit, error) {
12585 gensupport.SetOptions(c.urlParams_, opts...)
12586 res, err := c.doRequest("json")
12587 if res != nil && res.StatusCode == http.StatusNotModified {
12588 if res.Body != nil {
12589 res.Body.Close()
12590 }
12591 return nil, gensupport.WrapError(&googleapi.Error{
12592 Code: res.StatusCode,
12593 Header: res.Header,
12594 })
12595 }
12596 if err != nil {
12597 return nil, err
12598 }
12599 defer googleapi.CloseBody(res)
12600 if err := googleapi.CheckResponse(res); err != nil {
12601 return nil, gensupport.WrapError(err)
12602 }
12603 ret := &OrgUnit{
12604 ServerResponse: googleapi.ServerResponse{
12605 Header: res.Header,
12606 HTTPStatusCode: res.StatusCode,
12607 },
12608 }
12609 target := &ret
12610 if err := gensupport.DecodeResponse(target, res); err != nil {
12611 return nil, err
12612 }
12613 return ret, nil
12614 }
12615
12616 type PrivilegesListCall struct {
12617 s *Service
12618 customer string
12619 urlParams_ gensupport.URLParams
12620 ifNoneMatch_ string
12621 ctx_ context.Context
12622 header_ http.Header
12623 }
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634 func (r *PrivilegesService) List(customer string) *PrivilegesListCall {
12635 c := &PrivilegesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12636 c.customer = customer
12637 return c
12638 }
12639
12640
12641
12642
12643 func (c *PrivilegesListCall) Fields(s ...googleapi.Field) *PrivilegesListCall {
12644 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12645 return c
12646 }
12647
12648
12649
12650
12651 func (c *PrivilegesListCall) IfNoneMatch(entityTag string) *PrivilegesListCall {
12652 c.ifNoneMatch_ = entityTag
12653 return c
12654 }
12655
12656
12657 func (c *PrivilegesListCall) Context(ctx context.Context) *PrivilegesListCall {
12658 c.ctx_ = ctx
12659 return c
12660 }
12661
12662
12663
12664 func (c *PrivilegesListCall) Header() http.Header {
12665 if c.header_ == nil {
12666 c.header_ = make(http.Header)
12667 }
12668 return c.header_
12669 }
12670
12671 func (c *PrivilegesListCall) doRequest(alt string) (*http.Response, error) {
12672 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12673 if c.ifNoneMatch_ != "" {
12674 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12675 }
12676 var body io.Reader = nil
12677 c.urlParams_.Set("alt", alt)
12678 c.urlParams_.Set("prettyPrint", "false")
12679 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roles/ALL/privileges")
12680 urls += "?" + c.urlParams_.Encode()
12681 req, err := http.NewRequest("GET", urls, body)
12682 if err != nil {
12683 return nil, err
12684 }
12685 req.Header = reqHeaders
12686 googleapi.Expand(req.URL, map[string]string{
12687 "customer": c.customer,
12688 })
12689 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12690 }
12691
12692
12693
12694
12695
12696
12697 func (c *PrivilegesListCall) Do(opts ...googleapi.CallOption) (*Privileges, error) {
12698 gensupport.SetOptions(c.urlParams_, opts...)
12699 res, err := c.doRequest("json")
12700 if res != nil && res.StatusCode == http.StatusNotModified {
12701 if res.Body != nil {
12702 res.Body.Close()
12703 }
12704 return nil, gensupport.WrapError(&googleapi.Error{
12705 Code: res.StatusCode,
12706 Header: res.Header,
12707 })
12708 }
12709 if err != nil {
12710 return nil, err
12711 }
12712 defer googleapi.CloseBody(res)
12713 if err := googleapi.CheckResponse(res); err != nil {
12714 return nil, gensupport.WrapError(err)
12715 }
12716 ret := &Privileges{
12717 ServerResponse: googleapi.ServerResponse{
12718 Header: res.Header,
12719 HTTPStatusCode: res.StatusCode,
12720 },
12721 }
12722 target := &ret
12723 if err := gensupport.DecodeResponse(target, res); err != nil {
12724 return nil, err
12725 }
12726 return ret, nil
12727 }
12728
12729 type ResourcesBuildingsDeleteCall struct {
12730 s *Service
12731 customer string
12732 buildingId string
12733 urlParams_ gensupport.URLParams
12734 ctx_ context.Context
12735 header_ http.Header
12736 }
12737
12738
12739
12740
12741
12742
12743
12744 func (r *ResourcesBuildingsService) Delete(customer string, buildingId string) *ResourcesBuildingsDeleteCall {
12745 c := &ResourcesBuildingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12746 c.customer = customer
12747 c.buildingId = buildingId
12748 return c
12749 }
12750
12751
12752
12753
12754 func (c *ResourcesBuildingsDeleteCall) Fields(s ...googleapi.Field) *ResourcesBuildingsDeleteCall {
12755 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12756 return c
12757 }
12758
12759
12760 func (c *ResourcesBuildingsDeleteCall) Context(ctx context.Context) *ResourcesBuildingsDeleteCall {
12761 c.ctx_ = ctx
12762 return c
12763 }
12764
12765
12766
12767 func (c *ResourcesBuildingsDeleteCall) Header() http.Header {
12768 if c.header_ == nil {
12769 c.header_ = make(http.Header)
12770 }
12771 return c.header_
12772 }
12773
12774 func (c *ResourcesBuildingsDeleteCall) doRequest(alt string) (*http.Response, error) {
12775 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12776 var body io.Reader = nil
12777 c.urlParams_.Set("alt", alt)
12778 c.urlParams_.Set("prettyPrint", "false")
12779 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}")
12780 urls += "?" + c.urlParams_.Encode()
12781 req, err := http.NewRequest("DELETE", urls, body)
12782 if err != nil {
12783 return nil, err
12784 }
12785 req.Header = reqHeaders
12786 googleapi.Expand(req.URL, map[string]string{
12787 "customer": c.customer,
12788 "buildingId": c.buildingId,
12789 })
12790 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12791 }
12792
12793
12794 func (c *ResourcesBuildingsDeleteCall) Do(opts ...googleapi.CallOption) error {
12795 gensupport.SetOptions(c.urlParams_, opts...)
12796 res, err := c.doRequest("json")
12797 if err != nil {
12798 return err
12799 }
12800 defer googleapi.CloseBody(res)
12801 if err := googleapi.CheckResponse(res); err != nil {
12802 return gensupport.WrapError(err)
12803 }
12804 return nil
12805 }
12806
12807 type ResourcesBuildingsGetCall struct {
12808 s *Service
12809 customer string
12810 buildingId string
12811 urlParams_ gensupport.URLParams
12812 ifNoneMatch_ string
12813 ctx_ context.Context
12814 header_ http.Header
12815 }
12816
12817
12818
12819
12820
12821
12822
12823 func (r *ResourcesBuildingsService) Get(customer string, buildingId string) *ResourcesBuildingsGetCall {
12824 c := &ResourcesBuildingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12825 c.customer = customer
12826 c.buildingId = buildingId
12827 return c
12828 }
12829
12830
12831
12832
12833 func (c *ResourcesBuildingsGetCall) Fields(s ...googleapi.Field) *ResourcesBuildingsGetCall {
12834 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12835 return c
12836 }
12837
12838
12839
12840
12841 func (c *ResourcesBuildingsGetCall) IfNoneMatch(entityTag string) *ResourcesBuildingsGetCall {
12842 c.ifNoneMatch_ = entityTag
12843 return c
12844 }
12845
12846
12847 func (c *ResourcesBuildingsGetCall) Context(ctx context.Context) *ResourcesBuildingsGetCall {
12848 c.ctx_ = ctx
12849 return c
12850 }
12851
12852
12853
12854 func (c *ResourcesBuildingsGetCall) Header() http.Header {
12855 if c.header_ == nil {
12856 c.header_ = make(http.Header)
12857 }
12858 return c.header_
12859 }
12860
12861 func (c *ResourcesBuildingsGetCall) doRequest(alt string) (*http.Response, error) {
12862 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12863 if c.ifNoneMatch_ != "" {
12864 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12865 }
12866 var body io.Reader = nil
12867 c.urlParams_.Set("alt", alt)
12868 c.urlParams_.Set("prettyPrint", "false")
12869 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}")
12870 urls += "?" + c.urlParams_.Encode()
12871 req, err := http.NewRequest("GET", urls, body)
12872 if err != nil {
12873 return nil, err
12874 }
12875 req.Header = reqHeaders
12876 googleapi.Expand(req.URL, map[string]string{
12877 "customer": c.customer,
12878 "buildingId": c.buildingId,
12879 })
12880 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12881 }
12882
12883
12884
12885
12886
12887
12888 func (c *ResourcesBuildingsGetCall) Do(opts ...googleapi.CallOption) (*Building, error) {
12889 gensupport.SetOptions(c.urlParams_, opts...)
12890 res, err := c.doRequest("json")
12891 if res != nil && res.StatusCode == http.StatusNotModified {
12892 if res.Body != nil {
12893 res.Body.Close()
12894 }
12895 return nil, gensupport.WrapError(&googleapi.Error{
12896 Code: res.StatusCode,
12897 Header: res.Header,
12898 })
12899 }
12900 if err != nil {
12901 return nil, err
12902 }
12903 defer googleapi.CloseBody(res)
12904 if err := googleapi.CheckResponse(res); err != nil {
12905 return nil, gensupport.WrapError(err)
12906 }
12907 ret := &Building{
12908 ServerResponse: googleapi.ServerResponse{
12909 Header: res.Header,
12910 HTTPStatusCode: res.StatusCode,
12911 },
12912 }
12913 target := &ret
12914 if err := gensupport.DecodeResponse(target, res); err != nil {
12915 return nil, err
12916 }
12917 return ret, nil
12918 }
12919
12920 type ResourcesBuildingsInsertCall struct {
12921 s *Service
12922 customer string
12923 building *Building
12924 urlParams_ gensupport.URLParams
12925 ctx_ context.Context
12926 header_ http.Header
12927 }
12928
12929
12930
12931
12932
12933
12934 func (r *ResourcesBuildingsService) Insert(customer string, building *Building) *ResourcesBuildingsInsertCall {
12935 c := &ResourcesBuildingsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12936 c.customer = customer
12937 c.building = building
12938 return c
12939 }
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958 func (c *ResourcesBuildingsInsertCall) CoordinatesSource(coordinatesSource string) *ResourcesBuildingsInsertCall {
12959 c.urlParams_.Set("coordinatesSource", coordinatesSource)
12960 return c
12961 }
12962
12963
12964
12965
12966 func (c *ResourcesBuildingsInsertCall) Fields(s ...googleapi.Field) *ResourcesBuildingsInsertCall {
12967 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12968 return c
12969 }
12970
12971
12972 func (c *ResourcesBuildingsInsertCall) Context(ctx context.Context) *ResourcesBuildingsInsertCall {
12973 c.ctx_ = ctx
12974 return c
12975 }
12976
12977
12978
12979 func (c *ResourcesBuildingsInsertCall) Header() http.Header {
12980 if c.header_ == nil {
12981 c.header_ = make(http.Header)
12982 }
12983 return c.header_
12984 }
12985
12986 func (c *ResourcesBuildingsInsertCall) doRequest(alt string) (*http.Response, error) {
12987 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12988 var body io.Reader = nil
12989 body, err := googleapi.WithoutDataWrapper.JSONReader(c.building)
12990 if err != nil {
12991 return nil, err
12992 }
12993 c.urlParams_.Set("alt", alt)
12994 c.urlParams_.Set("prettyPrint", "false")
12995 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/buildings")
12996 urls += "?" + c.urlParams_.Encode()
12997 req, err := http.NewRequest("POST", urls, body)
12998 if err != nil {
12999 return nil, err
13000 }
13001 req.Header = reqHeaders
13002 googleapi.Expand(req.URL, map[string]string{
13003 "customer": c.customer,
13004 })
13005 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13006 }
13007
13008
13009
13010
13011
13012
13013 func (c *ResourcesBuildingsInsertCall) Do(opts ...googleapi.CallOption) (*Building, error) {
13014 gensupport.SetOptions(c.urlParams_, opts...)
13015 res, err := c.doRequest("json")
13016 if res != nil && res.StatusCode == http.StatusNotModified {
13017 if res.Body != nil {
13018 res.Body.Close()
13019 }
13020 return nil, gensupport.WrapError(&googleapi.Error{
13021 Code: res.StatusCode,
13022 Header: res.Header,
13023 })
13024 }
13025 if err != nil {
13026 return nil, err
13027 }
13028 defer googleapi.CloseBody(res)
13029 if err := googleapi.CheckResponse(res); err != nil {
13030 return nil, gensupport.WrapError(err)
13031 }
13032 ret := &Building{
13033 ServerResponse: googleapi.ServerResponse{
13034 Header: res.Header,
13035 HTTPStatusCode: res.StatusCode,
13036 },
13037 }
13038 target := &ret
13039 if err := gensupport.DecodeResponse(target, res); err != nil {
13040 return nil, err
13041 }
13042 return ret, nil
13043 }
13044
13045 type ResourcesBuildingsListCall struct {
13046 s *Service
13047 customer string
13048 urlParams_ gensupport.URLParams
13049 ifNoneMatch_ string
13050 ctx_ context.Context
13051 header_ http.Header
13052 }
13053
13054
13055
13056
13057
13058
13059 func (r *ResourcesBuildingsService) List(customer string) *ResourcesBuildingsListCall {
13060 c := &ResourcesBuildingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13061 c.customer = customer
13062 return c
13063 }
13064
13065
13066
13067 func (c *ResourcesBuildingsListCall) MaxResults(maxResults int64) *ResourcesBuildingsListCall {
13068 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
13069 return c
13070 }
13071
13072
13073
13074 func (c *ResourcesBuildingsListCall) PageToken(pageToken string) *ResourcesBuildingsListCall {
13075 c.urlParams_.Set("pageToken", pageToken)
13076 return c
13077 }
13078
13079
13080
13081
13082 func (c *ResourcesBuildingsListCall) Fields(s ...googleapi.Field) *ResourcesBuildingsListCall {
13083 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13084 return c
13085 }
13086
13087
13088
13089
13090 func (c *ResourcesBuildingsListCall) IfNoneMatch(entityTag string) *ResourcesBuildingsListCall {
13091 c.ifNoneMatch_ = entityTag
13092 return c
13093 }
13094
13095
13096 func (c *ResourcesBuildingsListCall) Context(ctx context.Context) *ResourcesBuildingsListCall {
13097 c.ctx_ = ctx
13098 return c
13099 }
13100
13101
13102
13103 func (c *ResourcesBuildingsListCall) Header() http.Header {
13104 if c.header_ == nil {
13105 c.header_ = make(http.Header)
13106 }
13107 return c.header_
13108 }
13109
13110 func (c *ResourcesBuildingsListCall) doRequest(alt string) (*http.Response, error) {
13111 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13112 if c.ifNoneMatch_ != "" {
13113 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13114 }
13115 var body io.Reader = nil
13116 c.urlParams_.Set("alt", alt)
13117 c.urlParams_.Set("prettyPrint", "false")
13118 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/buildings")
13119 urls += "?" + c.urlParams_.Encode()
13120 req, err := http.NewRequest("GET", urls, body)
13121 if err != nil {
13122 return nil, err
13123 }
13124 req.Header = reqHeaders
13125 googleapi.Expand(req.URL, map[string]string{
13126 "customer": c.customer,
13127 })
13128 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13129 }
13130
13131
13132
13133
13134
13135
13136 func (c *ResourcesBuildingsListCall) Do(opts ...googleapi.CallOption) (*Buildings, error) {
13137 gensupport.SetOptions(c.urlParams_, opts...)
13138 res, err := c.doRequest("json")
13139 if res != nil && res.StatusCode == http.StatusNotModified {
13140 if res.Body != nil {
13141 res.Body.Close()
13142 }
13143 return nil, gensupport.WrapError(&googleapi.Error{
13144 Code: res.StatusCode,
13145 Header: res.Header,
13146 })
13147 }
13148 if err != nil {
13149 return nil, err
13150 }
13151 defer googleapi.CloseBody(res)
13152 if err := googleapi.CheckResponse(res); err != nil {
13153 return nil, gensupport.WrapError(err)
13154 }
13155 ret := &Buildings{
13156 ServerResponse: googleapi.ServerResponse{
13157 Header: res.Header,
13158 HTTPStatusCode: res.StatusCode,
13159 },
13160 }
13161 target := &ret
13162 if err := gensupport.DecodeResponse(target, res); err != nil {
13163 return nil, err
13164 }
13165 return ret, nil
13166 }
13167
13168
13169
13170
13171 func (c *ResourcesBuildingsListCall) Pages(ctx context.Context, f func(*Buildings) error) error {
13172 c.ctx_ = ctx
13173 defer c.PageToken(c.urlParams_.Get("pageToken"))
13174 for {
13175 x, err := c.Do()
13176 if err != nil {
13177 return err
13178 }
13179 if err := f(x); err != nil {
13180 return err
13181 }
13182 if x.NextPageToken == "" {
13183 return nil
13184 }
13185 c.PageToken(x.NextPageToken)
13186 }
13187 }
13188
13189 type ResourcesBuildingsPatchCall struct {
13190 s *Service
13191 customer string
13192 buildingId string
13193 building *Building
13194 urlParams_ gensupport.URLParams
13195 ctx_ context.Context
13196 header_ http.Header
13197 }
13198
13199
13200
13201
13202
13203
13204
13205 func (r *ResourcesBuildingsService) Patch(customer string, buildingId string, building *Building) *ResourcesBuildingsPatchCall {
13206 c := &ResourcesBuildingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13207 c.customer = customer
13208 c.buildingId = buildingId
13209 c.building = building
13210 return c
13211 }
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230 func (c *ResourcesBuildingsPatchCall) CoordinatesSource(coordinatesSource string) *ResourcesBuildingsPatchCall {
13231 c.urlParams_.Set("coordinatesSource", coordinatesSource)
13232 return c
13233 }
13234
13235
13236
13237
13238 func (c *ResourcesBuildingsPatchCall) Fields(s ...googleapi.Field) *ResourcesBuildingsPatchCall {
13239 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13240 return c
13241 }
13242
13243
13244 func (c *ResourcesBuildingsPatchCall) Context(ctx context.Context) *ResourcesBuildingsPatchCall {
13245 c.ctx_ = ctx
13246 return c
13247 }
13248
13249
13250
13251 func (c *ResourcesBuildingsPatchCall) Header() http.Header {
13252 if c.header_ == nil {
13253 c.header_ = make(http.Header)
13254 }
13255 return c.header_
13256 }
13257
13258 func (c *ResourcesBuildingsPatchCall) doRequest(alt string) (*http.Response, error) {
13259 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13260 var body io.Reader = nil
13261 body, err := googleapi.WithoutDataWrapper.JSONReader(c.building)
13262 if err != nil {
13263 return nil, err
13264 }
13265 c.urlParams_.Set("alt", alt)
13266 c.urlParams_.Set("prettyPrint", "false")
13267 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}")
13268 urls += "?" + c.urlParams_.Encode()
13269 req, err := http.NewRequest("PATCH", urls, body)
13270 if err != nil {
13271 return nil, err
13272 }
13273 req.Header = reqHeaders
13274 googleapi.Expand(req.URL, map[string]string{
13275 "customer": c.customer,
13276 "buildingId": c.buildingId,
13277 })
13278 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13279 }
13280
13281
13282
13283
13284
13285
13286 func (c *ResourcesBuildingsPatchCall) Do(opts ...googleapi.CallOption) (*Building, error) {
13287 gensupport.SetOptions(c.urlParams_, opts...)
13288 res, err := c.doRequest("json")
13289 if res != nil && res.StatusCode == http.StatusNotModified {
13290 if res.Body != nil {
13291 res.Body.Close()
13292 }
13293 return nil, gensupport.WrapError(&googleapi.Error{
13294 Code: res.StatusCode,
13295 Header: res.Header,
13296 })
13297 }
13298 if err != nil {
13299 return nil, err
13300 }
13301 defer googleapi.CloseBody(res)
13302 if err := googleapi.CheckResponse(res); err != nil {
13303 return nil, gensupport.WrapError(err)
13304 }
13305 ret := &Building{
13306 ServerResponse: googleapi.ServerResponse{
13307 Header: res.Header,
13308 HTTPStatusCode: res.StatusCode,
13309 },
13310 }
13311 target := &ret
13312 if err := gensupport.DecodeResponse(target, res); err != nil {
13313 return nil, err
13314 }
13315 return ret, nil
13316 }
13317
13318 type ResourcesBuildingsUpdateCall struct {
13319 s *Service
13320 customer string
13321 buildingId string
13322 building *Building
13323 urlParams_ gensupport.URLParams
13324 ctx_ context.Context
13325 header_ http.Header
13326 }
13327
13328
13329
13330
13331
13332
13333
13334 func (r *ResourcesBuildingsService) Update(customer string, buildingId string, building *Building) *ResourcesBuildingsUpdateCall {
13335 c := &ResourcesBuildingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13336 c.customer = customer
13337 c.buildingId = buildingId
13338 c.building = building
13339 return c
13340 }
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359 func (c *ResourcesBuildingsUpdateCall) CoordinatesSource(coordinatesSource string) *ResourcesBuildingsUpdateCall {
13360 c.urlParams_.Set("coordinatesSource", coordinatesSource)
13361 return c
13362 }
13363
13364
13365
13366
13367 func (c *ResourcesBuildingsUpdateCall) Fields(s ...googleapi.Field) *ResourcesBuildingsUpdateCall {
13368 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13369 return c
13370 }
13371
13372
13373 func (c *ResourcesBuildingsUpdateCall) Context(ctx context.Context) *ResourcesBuildingsUpdateCall {
13374 c.ctx_ = ctx
13375 return c
13376 }
13377
13378
13379
13380 func (c *ResourcesBuildingsUpdateCall) Header() http.Header {
13381 if c.header_ == nil {
13382 c.header_ = make(http.Header)
13383 }
13384 return c.header_
13385 }
13386
13387 func (c *ResourcesBuildingsUpdateCall) doRequest(alt string) (*http.Response, error) {
13388 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13389 var body io.Reader = nil
13390 body, err := googleapi.WithoutDataWrapper.JSONReader(c.building)
13391 if err != nil {
13392 return nil, err
13393 }
13394 c.urlParams_.Set("alt", alt)
13395 c.urlParams_.Set("prettyPrint", "false")
13396 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}")
13397 urls += "?" + c.urlParams_.Encode()
13398 req, err := http.NewRequest("PUT", urls, body)
13399 if err != nil {
13400 return nil, err
13401 }
13402 req.Header = reqHeaders
13403 googleapi.Expand(req.URL, map[string]string{
13404 "customer": c.customer,
13405 "buildingId": c.buildingId,
13406 })
13407 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13408 }
13409
13410
13411
13412
13413
13414
13415 func (c *ResourcesBuildingsUpdateCall) Do(opts ...googleapi.CallOption) (*Building, error) {
13416 gensupport.SetOptions(c.urlParams_, opts...)
13417 res, err := c.doRequest("json")
13418 if res != nil && res.StatusCode == http.StatusNotModified {
13419 if res.Body != nil {
13420 res.Body.Close()
13421 }
13422 return nil, gensupport.WrapError(&googleapi.Error{
13423 Code: res.StatusCode,
13424 Header: res.Header,
13425 })
13426 }
13427 if err != nil {
13428 return nil, err
13429 }
13430 defer googleapi.CloseBody(res)
13431 if err := googleapi.CheckResponse(res); err != nil {
13432 return nil, gensupport.WrapError(err)
13433 }
13434 ret := &Building{
13435 ServerResponse: googleapi.ServerResponse{
13436 Header: res.Header,
13437 HTTPStatusCode: res.StatusCode,
13438 },
13439 }
13440 target := &ret
13441 if err := gensupport.DecodeResponse(target, res); err != nil {
13442 return nil, err
13443 }
13444 return ret, nil
13445 }
13446
13447 type ResourcesCalendarsDeleteCall struct {
13448 s *Service
13449 customer string
13450 calendarResourceId string
13451 urlParams_ gensupport.URLParams
13452 ctx_ context.Context
13453 header_ http.Header
13454 }
13455
13456
13457
13458
13459
13460
13461
13462 func (r *ResourcesCalendarsService) Delete(customer string, calendarResourceId string) *ResourcesCalendarsDeleteCall {
13463 c := &ResourcesCalendarsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13464 c.customer = customer
13465 c.calendarResourceId = calendarResourceId
13466 return c
13467 }
13468
13469
13470
13471
13472 func (c *ResourcesCalendarsDeleteCall) Fields(s ...googleapi.Field) *ResourcesCalendarsDeleteCall {
13473 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13474 return c
13475 }
13476
13477
13478 func (c *ResourcesCalendarsDeleteCall) Context(ctx context.Context) *ResourcesCalendarsDeleteCall {
13479 c.ctx_ = ctx
13480 return c
13481 }
13482
13483
13484
13485 func (c *ResourcesCalendarsDeleteCall) Header() http.Header {
13486 if c.header_ == nil {
13487 c.header_ = make(http.Header)
13488 }
13489 return c.header_
13490 }
13491
13492 func (c *ResourcesCalendarsDeleteCall) doRequest(alt string) (*http.Response, error) {
13493 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13494 var body io.Reader = nil
13495 c.urlParams_.Set("alt", alt)
13496 c.urlParams_.Set("prettyPrint", "false")
13497 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}")
13498 urls += "?" + c.urlParams_.Encode()
13499 req, err := http.NewRequest("DELETE", urls, body)
13500 if err != nil {
13501 return nil, err
13502 }
13503 req.Header = reqHeaders
13504 googleapi.Expand(req.URL, map[string]string{
13505 "customer": c.customer,
13506 "calendarResourceId": c.calendarResourceId,
13507 })
13508 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13509 }
13510
13511
13512 func (c *ResourcesCalendarsDeleteCall) Do(opts ...googleapi.CallOption) error {
13513 gensupport.SetOptions(c.urlParams_, opts...)
13514 res, err := c.doRequest("json")
13515 if err != nil {
13516 return err
13517 }
13518 defer googleapi.CloseBody(res)
13519 if err := googleapi.CheckResponse(res); err != nil {
13520 return gensupport.WrapError(err)
13521 }
13522 return nil
13523 }
13524
13525 type ResourcesCalendarsGetCall struct {
13526 s *Service
13527 customer string
13528 calendarResourceId string
13529 urlParams_ gensupport.URLParams
13530 ifNoneMatch_ string
13531 ctx_ context.Context
13532 header_ http.Header
13533 }
13534
13535
13536
13537
13538
13539
13540
13541 func (r *ResourcesCalendarsService) Get(customer string, calendarResourceId string) *ResourcesCalendarsGetCall {
13542 c := &ResourcesCalendarsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13543 c.customer = customer
13544 c.calendarResourceId = calendarResourceId
13545 return c
13546 }
13547
13548
13549
13550
13551 func (c *ResourcesCalendarsGetCall) Fields(s ...googleapi.Field) *ResourcesCalendarsGetCall {
13552 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13553 return c
13554 }
13555
13556
13557
13558
13559 func (c *ResourcesCalendarsGetCall) IfNoneMatch(entityTag string) *ResourcesCalendarsGetCall {
13560 c.ifNoneMatch_ = entityTag
13561 return c
13562 }
13563
13564
13565 func (c *ResourcesCalendarsGetCall) Context(ctx context.Context) *ResourcesCalendarsGetCall {
13566 c.ctx_ = ctx
13567 return c
13568 }
13569
13570
13571
13572 func (c *ResourcesCalendarsGetCall) Header() http.Header {
13573 if c.header_ == nil {
13574 c.header_ = make(http.Header)
13575 }
13576 return c.header_
13577 }
13578
13579 func (c *ResourcesCalendarsGetCall) doRequest(alt string) (*http.Response, error) {
13580 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13581 if c.ifNoneMatch_ != "" {
13582 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13583 }
13584 var body io.Reader = nil
13585 c.urlParams_.Set("alt", alt)
13586 c.urlParams_.Set("prettyPrint", "false")
13587 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}")
13588 urls += "?" + c.urlParams_.Encode()
13589 req, err := http.NewRequest("GET", urls, body)
13590 if err != nil {
13591 return nil, err
13592 }
13593 req.Header = reqHeaders
13594 googleapi.Expand(req.URL, map[string]string{
13595 "customer": c.customer,
13596 "calendarResourceId": c.calendarResourceId,
13597 })
13598 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13599 }
13600
13601
13602
13603
13604
13605
13606
13607 func (c *ResourcesCalendarsGetCall) Do(opts ...googleapi.CallOption) (*CalendarResource, error) {
13608 gensupport.SetOptions(c.urlParams_, opts...)
13609 res, err := c.doRequest("json")
13610 if res != nil && res.StatusCode == http.StatusNotModified {
13611 if res.Body != nil {
13612 res.Body.Close()
13613 }
13614 return nil, gensupport.WrapError(&googleapi.Error{
13615 Code: res.StatusCode,
13616 Header: res.Header,
13617 })
13618 }
13619 if err != nil {
13620 return nil, err
13621 }
13622 defer googleapi.CloseBody(res)
13623 if err := googleapi.CheckResponse(res); err != nil {
13624 return nil, gensupport.WrapError(err)
13625 }
13626 ret := &CalendarResource{
13627 ServerResponse: googleapi.ServerResponse{
13628 Header: res.Header,
13629 HTTPStatusCode: res.StatusCode,
13630 },
13631 }
13632 target := &ret
13633 if err := gensupport.DecodeResponse(target, res); err != nil {
13634 return nil, err
13635 }
13636 return ret, nil
13637 }
13638
13639 type ResourcesCalendarsInsertCall struct {
13640 s *Service
13641 customer string
13642 calendarresource *CalendarResource
13643 urlParams_ gensupport.URLParams
13644 ctx_ context.Context
13645 header_ http.Header
13646 }
13647
13648
13649
13650
13651
13652
13653 func (r *ResourcesCalendarsService) Insert(customer string, calendarresource *CalendarResource) *ResourcesCalendarsInsertCall {
13654 c := &ResourcesCalendarsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13655 c.customer = customer
13656 c.calendarresource = calendarresource
13657 return c
13658 }
13659
13660
13661
13662
13663 func (c *ResourcesCalendarsInsertCall) Fields(s ...googleapi.Field) *ResourcesCalendarsInsertCall {
13664 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13665 return c
13666 }
13667
13668
13669 func (c *ResourcesCalendarsInsertCall) Context(ctx context.Context) *ResourcesCalendarsInsertCall {
13670 c.ctx_ = ctx
13671 return c
13672 }
13673
13674
13675
13676 func (c *ResourcesCalendarsInsertCall) Header() http.Header {
13677 if c.header_ == nil {
13678 c.header_ = make(http.Header)
13679 }
13680 return c.header_
13681 }
13682
13683 func (c *ResourcesCalendarsInsertCall) doRequest(alt string) (*http.Response, error) {
13684 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13685 var body io.Reader = nil
13686 body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendarresource)
13687 if err != nil {
13688 return nil, err
13689 }
13690 c.urlParams_.Set("alt", alt)
13691 c.urlParams_.Set("prettyPrint", "false")
13692 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/calendars")
13693 urls += "?" + c.urlParams_.Encode()
13694 req, err := http.NewRequest("POST", urls, body)
13695 if err != nil {
13696 return nil, err
13697 }
13698 req.Header = reqHeaders
13699 googleapi.Expand(req.URL, map[string]string{
13700 "customer": c.customer,
13701 })
13702 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13703 }
13704
13705
13706
13707
13708
13709
13710
13711 func (c *ResourcesCalendarsInsertCall) Do(opts ...googleapi.CallOption) (*CalendarResource, error) {
13712 gensupport.SetOptions(c.urlParams_, opts...)
13713 res, err := c.doRequest("json")
13714 if res != nil && res.StatusCode == http.StatusNotModified {
13715 if res.Body != nil {
13716 res.Body.Close()
13717 }
13718 return nil, gensupport.WrapError(&googleapi.Error{
13719 Code: res.StatusCode,
13720 Header: res.Header,
13721 })
13722 }
13723 if err != nil {
13724 return nil, err
13725 }
13726 defer googleapi.CloseBody(res)
13727 if err := googleapi.CheckResponse(res); err != nil {
13728 return nil, gensupport.WrapError(err)
13729 }
13730 ret := &CalendarResource{
13731 ServerResponse: googleapi.ServerResponse{
13732 Header: res.Header,
13733 HTTPStatusCode: res.StatusCode,
13734 },
13735 }
13736 target := &ret
13737 if err := gensupport.DecodeResponse(target, res); err != nil {
13738 return nil, err
13739 }
13740 return ret, nil
13741 }
13742
13743 type ResourcesCalendarsListCall struct {
13744 s *Service
13745 customer string
13746 urlParams_ gensupport.URLParams
13747 ifNoneMatch_ string
13748 ctx_ context.Context
13749 header_ http.Header
13750 }
13751
13752
13753
13754
13755
13756
13757 func (r *ResourcesCalendarsService) List(customer string) *ResourcesCalendarsListCall {
13758 c := &ResourcesCalendarsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13759 c.customer = customer
13760 return c
13761 }
13762
13763
13764
13765 func (c *ResourcesCalendarsListCall) MaxResults(maxResults int64) *ResourcesCalendarsListCall {
13766 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
13767 return c
13768 }
13769
13770
13771
13772
13773
13774
13775
13776
13777 func (c *ResourcesCalendarsListCall) OrderBy(orderBy string) *ResourcesCalendarsListCall {
13778 c.urlParams_.Set("orderBy", orderBy)
13779 return c
13780 }
13781
13782
13783
13784 func (c *ResourcesCalendarsListCall) PageToken(pageToken string) *ResourcesCalendarsListCall {
13785 c.urlParams_.Set("pageToken", pageToken)
13786 return c
13787 }
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799 func (c *ResourcesCalendarsListCall) Query(query string) *ResourcesCalendarsListCall {
13800 c.urlParams_.Set("query", query)
13801 return c
13802 }
13803
13804
13805
13806
13807 func (c *ResourcesCalendarsListCall) Fields(s ...googleapi.Field) *ResourcesCalendarsListCall {
13808 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13809 return c
13810 }
13811
13812
13813
13814
13815 func (c *ResourcesCalendarsListCall) IfNoneMatch(entityTag string) *ResourcesCalendarsListCall {
13816 c.ifNoneMatch_ = entityTag
13817 return c
13818 }
13819
13820
13821 func (c *ResourcesCalendarsListCall) Context(ctx context.Context) *ResourcesCalendarsListCall {
13822 c.ctx_ = ctx
13823 return c
13824 }
13825
13826
13827
13828 func (c *ResourcesCalendarsListCall) Header() http.Header {
13829 if c.header_ == nil {
13830 c.header_ = make(http.Header)
13831 }
13832 return c.header_
13833 }
13834
13835 func (c *ResourcesCalendarsListCall) doRequest(alt string) (*http.Response, error) {
13836 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13837 if c.ifNoneMatch_ != "" {
13838 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13839 }
13840 var body io.Reader = nil
13841 c.urlParams_.Set("alt", alt)
13842 c.urlParams_.Set("prettyPrint", "false")
13843 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/calendars")
13844 urls += "?" + c.urlParams_.Encode()
13845 req, err := http.NewRequest("GET", urls, body)
13846 if err != nil {
13847 return nil, err
13848 }
13849 req.Header = reqHeaders
13850 googleapi.Expand(req.URL, map[string]string{
13851 "customer": c.customer,
13852 })
13853 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13854 }
13855
13856
13857
13858
13859
13860
13861
13862 func (c *ResourcesCalendarsListCall) Do(opts ...googleapi.CallOption) (*CalendarResources, error) {
13863 gensupport.SetOptions(c.urlParams_, opts...)
13864 res, err := c.doRequest("json")
13865 if res != nil && res.StatusCode == http.StatusNotModified {
13866 if res.Body != nil {
13867 res.Body.Close()
13868 }
13869 return nil, gensupport.WrapError(&googleapi.Error{
13870 Code: res.StatusCode,
13871 Header: res.Header,
13872 })
13873 }
13874 if err != nil {
13875 return nil, err
13876 }
13877 defer googleapi.CloseBody(res)
13878 if err := googleapi.CheckResponse(res); err != nil {
13879 return nil, gensupport.WrapError(err)
13880 }
13881 ret := &CalendarResources{
13882 ServerResponse: googleapi.ServerResponse{
13883 Header: res.Header,
13884 HTTPStatusCode: res.StatusCode,
13885 },
13886 }
13887 target := &ret
13888 if err := gensupport.DecodeResponse(target, res); err != nil {
13889 return nil, err
13890 }
13891 return ret, nil
13892 }
13893
13894
13895
13896
13897 func (c *ResourcesCalendarsListCall) Pages(ctx context.Context, f func(*CalendarResources) error) error {
13898 c.ctx_ = ctx
13899 defer c.PageToken(c.urlParams_.Get("pageToken"))
13900 for {
13901 x, err := c.Do()
13902 if err != nil {
13903 return err
13904 }
13905 if err := f(x); err != nil {
13906 return err
13907 }
13908 if x.NextPageToken == "" {
13909 return nil
13910 }
13911 c.PageToken(x.NextPageToken)
13912 }
13913 }
13914
13915 type ResourcesCalendarsPatchCall struct {
13916 s *Service
13917 customer string
13918 calendarResourceId string
13919 calendarresource *CalendarResource
13920 urlParams_ gensupport.URLParams
13921 ctx_ context.Context
13922 header_ http.Header
13923 }
13924
13925
13926
13927
13928
13929
13930
13931 func (r *ResourcesCalendarsService) Patch(customer string, calendarResourceId string, calendarresource *CalendarResource) *ResourcesCalendarsPatchCall {
13932 c := &ResourcesCalendarsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13933 c.customer = customer
13934 c.calendarResourceId = calendarResourceId
13935 c.calendarresource = calendarresource
13936 return c
13937 }
13938
13939
13940
13941
13942 func (c *ResourcesCalendarsPatchCall) Fields(s ...googleapi.Field) *ResourcesCalendarsPatchCall {
13943 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13944 return c
13945 }
13946
13947
13948 func (c *ResourcesCalendarsPatchCall) Context(ctx context.Context) *ResourcesCalendarsPatchCall {
13949 c.ctx_ = ctx
13950 return c
13951 }
13952
13953
13954
13955 func (c *ResourcesCalendarsPatchCall) Header() http.Header {
13956 if c.header_ == nil {
13957 c.header_ = make(http.Header)
13958 }
13959 return c.header_
13960 }
13961
13962 func (c *ResourcesCalendarsPatchCall) doRequest(alt string) (*http.Response, error) {
13963 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13964 var body io.Reader = nil
13965 body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendarresource)
13966 if err != nil {
13967 return nil, err
13968 }
13969 c.urlParams_.Set("alt", alt)
13970 c.urlParams_.Set("prettyPrint", "false")
13971 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}")
13972 urls += "?" + c.urlParams_.Encode()
13973 req, err := http.NewRequest("PATCH", urls, body)
13974 if err != nil {
13975 return nil, err
13976 }
13977 req.Header = reqHeaders
13978 googleapi.Expand(req.URL, map[string]string{
13979 "customer": c.customer,
13980 "calendarResourceId": c.calendarResourceId,
13981 })
13982 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13983 }
13984
13985
13986
13987
13988
13989
13990
13991 func (c *ResourcesCalendarsPatchCall) Do(opts ...googleapi.CallOption) (*CalendarResource, error) {
13992 gensupport.SetOptions(c.urlParams_, opts...)
13993 res, err := c.doRequest("json")
13994 if res != nil && res.StatusCode == http.StatusNotModified {
13995 if res.Body != nil {
13996 res.Body.Close()
13997 }
13998 return nil, gensupport.WrapError(&googleapi.Error{
13999 Code: res.StatusCode,
14000 Header: res.Header,
14001 })
14002 }
14003 if err != nil {
14004 return nil, err
14005 }
14006 defer googleapi.CloseBody(res)
14007 if err := googleapi.CheckResponse(res); err != nil {
14008 return nil, gensupport.WrapError(err)
14009 }
14010 ret := &CalendarResource{
14011 ServerResponse: googleapi.ServerResponse{
14012 Header: res.Header,
14013 HTTPStatusCode: res.StatusCode,
14014 },
14015 }
14016 target := &ret
14017 if err := gensupport.DecodeResponse(target, res); err != nil {
14018 return nil, err
14019 }
14020 return ret, nil
14021 }
14022
14023 type ResourcesCalendarsUpdateCall struct {
14024 s *Service
14025 customer string
14026 calendarResourceId string
14027 calendarresource *CalendarResource
14028 urlParams_ gensupport.URLParams
14029 ctx_ context.Context
14030 header_ http.Header
14031 }
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041 func (r *ResourcesCalendarsService) Update(customer string, calendarResourceId string, calendarresource *CalendarResource) *ResourcesCalendarsUpdateCall {
14042 c := &ResourcesCalendarsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14043 c.customer = customer
14044 c.calendarResourceId = calendarResourceId
14045 c.calendarresource = calendarresource
14046 return c
14047 }
14048
14049
14050
14051
14052 func (c *ResourcesCalendarsUpdateCall) Fields(s ...googleapi.Field) *ResourcesCalendarsUpdateCall {
14053 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14054 return c
14055 }
14056
14057
14058 func (c *ResourcesCalendarsUpdateCall) Context(ctx context.Context) *ResourcesCalendarsUpdateCall {
14059 c.ctx_ = ctx
14060 return c
14061 }
14062
14063
14064
14065 func (c *ResourcesCalendarsUpdateCall) Header() http.Header {
14066 if c.header_ == nil {
14067 c.header_ = make(http.Header)
14068 }
14069 return c.header_
14070 }
14071
14072 func (c *ResourcesCalendarsUpdateCall) doRequest(alt string) (*http.Response, error) {
14073 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14074 var body io.Reader = nil
14075 body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendarresource)
14076 if err != nil {
14077 return nil, err
14078 }
14079 c.urlParams_.Set("alt", alt)
14080 c.urlParams_.Set("prettyPrint", "false")
14081 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}")
14082 urls += "?" + c.urlParams_.Encode()
14083 req, err := http.NewRequest("PUT", urls, body)
14084 if err != nil {
14085 return nil, err
14086 }
14087 req.Header = reqHeaders
14088 googleapi.Expand(req.URL, map[string]string{
14089 "customer": c.customer,
14090 "calendarResourceId": c.calendarResourceId,
14091 })
14092 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14093 }
14094
14095
14096
14097
14098
14099
14100
14101 func (c *ResourcesCalendarsUpdateCall) Do(opts ...googleapi.CallOption) (*CalendarResource, error) {
14102 gensupport.SetOptions(c.urlParams_, opts...)
14103 res, err := c.doRequest("json")
14104 if res != nil && res.StatusCode == http.StatusNotModified {
14105 if res.Body != nil {
14106 res.Body.Close()
14107 }
14108 return nil, gensupport.WrapError(&googleapi.Error{
14109 Code: res.StatusCode,
14110 Header: res.Header,
14111 })
14112 }
14113 if err != nil {
14114 return nil, err
14115 }
14116 defer googleapi.CloseBody(res)
14117 if err := googleapi.CheckResponse(res); err != nil {
14118 return nil, gensupport.WrapError(err)
14119 }
14120 ret := &CalendarResource{
14121 ServerResponse: googleapi.ServerResponse{
14122 Header: res.Header,
14123 HTTPStatusCode: res.StatusCode,
14124 },
14125 }
14126 target := &ret
14127 if err := gensupport.DecodeResponse(target, res); err != nil {
14128 return nil, err
14129 }
14130 return ret, nil
14131 }
14132
14133 type ResourcesFeaturesDeleteCall struct {
14134 s *Service
14135 customer string
14136 featureKey string
14137 urlParams_ gensupport.URLParams
14138 ctx_ context.Context
14139 header_ http.Header
14140 }
14141
14142
14143
14144
14145
14146
14147
14148 func (r *ResourcesFeaturesService) Delete(customer string, featureKey string) *ResourcesFeaturesDeleteCall {
14149 c := &ResourcesFeaturesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14150 c.customer = customer
14151 c.featureKey = featureKey
14152 return c
14153 }
14154
14155
14156
14157
14158 func (c *ResourcesFeaturesDeleteCall) Fields(s ...googleapi.Field) *ResourcesFeaturesDeleteCall {
14159 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14160 return c
14161 }
14162
14163
14164 func (c *ResourcesFeaturesDeleteCall) Context(ctx context.Context) *ResourcesFeaturesDeleteCall {
14165 c.ctx_ = ctx
14166 return c
14167 }
14168
14169
14170
14171 func (c *ResourcesFeaturesDeleteCall) Header() http.Header {
14172 if c.header_ == nil {
14173 c.header_ = make(http.Header)
14174 }
14175 return c.header_
14176 }
14177
14178 func (c *ResourcesFeaturesDeleteCall) doRequest(alt string) (*http.Response, error) {
14179 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14180 var body io.Reader = nil
14181 c.urlParams_.Set("alt", alt)
14182 c.urlParams_.Set("prettyPrint", "false")
14183 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/features/{featureKey}")
14184 urls += "?" + c.urlParams_.Encode()
14185 req, err := http.NewRequest("DELETE", urls, body)
14186 if err != nil {
14187 return nil, err
14188 }
14189 req.Header = reqHeaders
14190 googleapi.Expand(req.URL, map[string]string{
14191 "customer": c.customer,
14192 "featureKey": c.featureKey,
14193 })
14194 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14195 }
14196
14197
14198 func (c *ResourcesFeaturesDeleteCall) Do(opts ...googleapi.CallOption) error {
14199 gensupport.SetOptions(c.urlParams_, opts...)
14200 res, err := c.doRequest("json")
14201 if err != nil {
14202 return err
14203 }
14204 defer googleapi.CloseBody(res)
14205 if err := googleapi.CheckResponse(res); err != nil {
14206 return gensupport.WrapError(err)
14207 }
14208 return nil
14209 }
14210
14211 type ResourcesFeaturesGetCall struct {
14212 s *Service
14213 customer string
14214 featureKey string
14215 urlParams_ gensupport.URLParams
14216 ifNoneMatch_ string
14217 ctx_ context.Context
14218 header_ http.Header
14219 }
14220
14221
14222
14223
14224
14225
14226
14227 func (r *ResourcesFeaturesService) Get(customer string, featureKey string) *ResourcesFeaturesGetCall {
14228 c := &ResourcesFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14229 c.customer = customer
14230 c.featureKey = featureKey
14231 return c
14232 }
14233
14234
14235
14236
14237 func (c *ResourcesFeaturesGetCall) Fields(s ...googleapi.Field) *ResourcesFeaturesGetCall {
14238 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14239 return c
14240 }
14241
14242
14243
14244
14245 func (c *ResourcesFeaturesGetCall) IfNoneMatch(entityTag string) *ResourcesFeaturesGetCall {
14246 c.ifNoneMatch_ = entityTag
14247 return c
14248 }
14249
14250
14251 func (c *ResourcesFeaturesGetCall) Context(ctx context.Context) *ResourcesFeaturesGetCall {
14252 c.ctx_ = ctx
14253 return c
14254 }
14255
14256
14257
14258 func (c *ResourcesFeaturesGetCall) Header() http.Header {
14259 if c.header_ == nil {
14260 c.header_ = make(http.Header)
14261 }
14262 return c.header_
14263 }
14264
14265 func (c *ResourcesFeaturesGetCall) doRequest(alt string) (*http.Response, error) {
14266 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14267 if c.ifNoneMatch_ != "" {
14268 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14269 }
14270 var body io.Reader = nil
14271 c.urlParams_.Set("alt", alt)
14272 c.urlParams_.Set("prettyPrint", "false")
14273 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/features/{featureKey}")
14274 urls += "?" + c.urlParams_.Encode()
14275 req, err := http.NewRequest("GET", urls, body)
14276 if err != nil {
14277 return nil, err
14278 }
14279 req.Header = reqHeaders
14280 googleapi.Expand(req.URL, map[string]string{
14281 "customer": c.customer,
14282 "featureKey": c.featureKey,
14283 })
14284 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14285 }
14286
14287
14288
14289
14290
14291
14292 func (c *ResourcesFeaturesGetCall) Do(opts ...googleapi.CallOption) (*Feature, error) {
14293 gensupport.SetOptions(c.urlParams_, opts...)
14294 res, err := c.doRequest("json")
14295 if res != nil && res.StatusCode == http.StatusNotModified {
14296 if res.Body != nil {
14297 res.Body.Close()
14298 }
14299 return nil, gensupport.WrapError(&googleapi.Error{
14300 Code: res.StatusCode,
14301 Header: res.Header,
14302 })
14303 }
14304 if err != nil {
14305 return nil, err
14306 }
14307 defer googleapi.CloseBody(res)
14308 if err := googleapi.CheckResponse(res); err != nil {
14309 return nil, gensupport.WrapError(err)
14310 }
14311 ret := &Feature{
14312 ServerResponse: googleapi.ServerResponse{
14313 Header: res.Header,
14314 HTTPStatusCode: res.StatusCode,
14315 },
14316 }
14317 target := &ret
14318 if err := gensupport.DecodeResponse(target, res); err != nil {
14319 return nil, err
14320 }
14321 return ret, nil
14322 }
14323
14324 type ResourcesFeaturesInsertCall struct {
14325 s *Service
14326 customer string
14327 feature *Feature
14328 urlParams_ gensupport.URLParams
14329 ctx_ context.Context
14330 header_ http.Header
14331 }
14332
14333
14334
14335
14336
14337
14338 func (r *ResourcesFeaturesService) Insert(customer string, feature *Feature) *ResourcesFeaturesInsertCall {
14339 c := &ResourcesFeaturesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14340 c.customer = customer
14341 c.feature = feature
14342 return c
14343 }
14344
14345
14346
14347
14348 func (c *ResourcesFeaturesInsertCall) Fields(s ...googleapi.Field) *ResourcesFeaturesInsertCall {
14349 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14350 return c
14351 }
14352
14353
14354 func (c *ResourcesFeaturesInsertCall) Context(ctx context.Context) *ResourcesFeaturesInsertCall {
14355 c.ctx_ = ctx
14356 return c
14357 }
14358
14359
14360
14361 func (c *ResourcesFeaturesInsertCall) Header() http.Header {
14362 if c.header_ == nil {
14363 c.header_ = make(http.Header)
14364 }
14365 return c.header_
14366 }
14367
14368 func (c *ResourcesFeaturesInsertCall) doRequest(alt string) (*http.Response, error) {
14369 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14370 var body io.Reader = nil
14371 body, err := googleapi.WithoutDataWrapper.JSONReader(c.feature)
14372 if err != nil {
14373 return nil, err
14374 }
14375 c.urlParams_.Set("alt", alt)
14376 c.urlParams_.Set("prettyPrint", "false")
14377 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/features")
14378 urls += "?" + c.urlParams_.Encode()
14379 req, err := http.NewRequest("POST", urls, body)
14380 if err != nil {
14381 return nil, err
14382 }
14383 req.Header = reqHeaders
14384 googleapi.Expand(req.URL, map[string]string{
14385 "customer": c.customer,
14386 })
14387 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14388 }
14389
14390
14391
14392
14393
14394
14395 func (c *ResourcesFeaturesInsertCall) Do(opts ...googleapi.CallOption) (*Feature, error) {
14396 gensupport.SetOptions(c.urlParams_, opts...)
14397 res, err := c.doRequest("json")
14398 if res != nil && res.StatusCode == http.StatusNotModified {
14399 if res.Body != nil {
14400 res.Body.Close()
14401 }
14402 return nil, gensupport.WrapError(&googleapi.Error{
14403 Code: res.StatusCode,
14404 Header: res.Header,
14405 })
14406 }
14407 if err != nil {
14408 return nil, err
14409 }
14410 defer googleapi.CloseBody(res)
14411 if err := googleapi.CheckResponse(res); err != nil {
14412 return nil, gensupport.WrapError(err)
14413 }
14414 ret := &Feature{
14415 ServerResponse: googleapi.ServerResponse{
14416 Header: res.Header,
14417 HTTPStatusCode: res.StatusCode,
14418 },
14419 }
14420 target := &ret
14421 if err := gensupport.DecodeResponse(target, res); err != nil {
14422 return nil, err
14423 }
14424 return ret, nil
14425 }
14426
14427 type ResourcesFeaturesListCall struct {
14428 s *Service
14429 customer string
14430 urlParams_ gensupport.URLParams
14431 ifNoneMatch_ string
14432 ctx_ context.Context
14433 header_ http.Header
14434 }
14435
14436
14437
14438
14439
14440
14441 func (r *ResourcesFeaturesService) List(customer string) *ResourcesFeaturesListCall {
14442 c := &ResourcesFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14443 c.customer = customer
14444 return c
14445 }
14446
14447
14448
14449 func (c *ResourcesFeaturesListCall) MaxResults(maxResults int64) *ResourcesFeaturesListCall {
14450 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
14451 return c
14452 }
14453
14454
14455
14456 func (c *ResourcesFeaturesListCall) PageToken(pageToken string) *ResourcesFeaturesListCall {
14457 c.urlParams_.Set("pageToken", pageToken)
14458 return c
14459 }
14460
14461
14462
14463
14464 func (c *ResourcesFeaturesListCall) Fields(s ...googleapi.Field) *ResourcesFeaturesListCall {
14465 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14466 return c
14467 }
14468
14469
14470
14471
14472 func (c *ResourcesFeaturesListCall) IfNoneMatch(entityTag string) *ResourcesFeaturesListCall {
14473 c.ifNoneMatch_ = entityTag
14474 return c
14475 }
14476
14477
14478 func (c *ResourcesFeaturesListCall) Context(ctx context.Context) *ResourcesFeaturesListCall {
14479 c.ctx_ = ctx
14480 return c
14481 }
14482
14483
14484
14485 func (c *ResourcesFeaturesListCall) Header() http.Header {
14486 if c.header_ == nil {
14487 c.header_ = make(http.Header)
14488 }
14489 return c.header_
14490 }
14491
14492 func (c *ResourcesFeaturesListCall) doRequest(alt string) (*http.Response, error) {
14493 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14494 if c.ifNoneMatch_ != "" {
14495 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14496 }
14497 var body io.Reader = nil
14498 c.urlParams_.Set("alt", alt)
14499 c.urlParams_.Set("prettyPrint", "false")
14500 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/features")
14501 urls += "?" + c.urlParams_.Encode()
14502 req, err := http.NewRequest("GET", urls, body)
14503 if err != nil {
14504 return nil, err
14505 }
14506 req.Header = reqHeaders
14507 googleapi.Expand(req.URL, map[string]string{
14508 "customer": c.customer,
14509 })
14510 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14511 }
14512
14513
14514
14515
14516
14517
14518 func (c *ResourcesFeaturesListCall) Do(opts ...googleapi.CallOption) (*Features, error) {
14519 gensupport.SetOptions(c.urlParams_, opts...)
14520 res, err := c.doRequest("json")
14521 if res != nil && res.StatusCode == http.StatusNotModified {
14522 if res.Body != nil {
14523 res.Body.Close()
14524 }
14525 return nil, gensupport.WrapError(&googleapi.Error{
14526 Code: res.StatusCode,
14527 Header: res.Header,
14528 })
14529 }
14530 if err != nil {
14531 return nil, err
14532 }
14533 defer googleapi.CloseBody(res)
14534 if err := googleapi.CheckResponse(res); err != nil {
14535 return nil, gensupport.WrapError(err)
14536 }
14537 ret := &Features{
14538 ServerResponse: googleapi.ServerResponse{
14539 Header: res.Header,
14540 HTTPStatusCode: res.StatusCode,
14541 },
14542 }
14543 target := &ret
14544 if err := gensupport.DecodeResponse(target, res); err != nil {
14545 return nil, err
14546 }
14547 return ret, nil
14548 }
14549
14550
14551
14552
14553 func (c *ResourcesFeaturesListCall) Pages(ctx context.Context, f func(*Features) error) error {
14554 c.ctx_ = ctx
14555 defer c.PageToken(c.urlParams_.Get("pageToken"))
14556 for {
14557 x, err := c.Do()
14558 if err != nil {
14559 return err
14560 }
14561 if err := f(x); err != nil {
14562 return err
14563 }
14564 if x.NextPageToken == "" {
14565 return nil
14566 }
14567 c.PageToken(x.NextPageToken)
14568 }
14569 }
14570
14571 type ResourcesFeaturesPatchCall struct {
14572 s *Service
14573 customer string
14574 featureKey string
14575 feature *Feature
14576 urlParams_ gensupport.URLParams
14577 ctx_ context.Context
14578 header_ http.Header
14579 }
14580
14581
14582
14583
14584
14585
14586
14587 func (r *ResourcesFeaturesService) Patch(customer string, featureKey string, feature *Feature) *ResourcesFeaturesPatchCall {
14588 c := &ResourcesFeaturesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14589 c.customer = customer
14590 c.featureKey = featureKey
14591 c.feature = feature
14592 return c
14593 }
14594
14595
14596
14597
14598 func (c *ResourcesFeaturesPatchCall) Fields(s ...googleapi.Field) *ResourcesFeaturesPatchCall {
14599 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14600 return c
14601 }
14602
14603
14604 func (c *ResourcesFeaturesPatchCall) Context(ctx context.Context) *ResourcesFeaturesPatchCall {
14605 c.ctx_ = ctx
14606 return c
14607 }
14608
14609
14610
14611 func (c *ResourcesFeaturesPatchCall) Header() http.Header {
14612 if c.header_ == nil {
14613 c.header_ = make(http.Header)
14614 }
14615 return c.header_
14616 }
14617
14618 func (c *ResourcesFeaturesPatchCall) doRequest(alt string) (*http.Response, error) {
14619 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14620 var body io.Reader = nil
14621 body, err := googleapi.WithoutDataWrapper.JSONReader(c.feature)
14622 if err != nil {
14623 return nil, err
14624 }
14625 c.urlParams_.Set("alt", alt)
14626 c.urlParams_.Set("prettyPrint", "false")
14627 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/features/{featureKey}")
14628 urls += "?" + c.urlParams_.Encode()
14629 req, err := http.NewRequest("PATCH", urls, body)
14630 if err != nil {
14631 return nil, err
14632 }
14633 req.Header = reqHeaders
14634 googleapi.Expand(req.URL, map[string]string{
14635 "customer": c.customer,
14636 "featureKey": c.featureKey,
14637 })
14638 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14639 }
14640
14641
14642
14643
14644
14645
14646 func (c *ResourcesFeaturesPatchCall) Do(opts ...googleapi.CallOption) (*Feature, error) {
14647 gensupport.SetOptions(c.urlParams_, opts...)
14648 res, err := c.doRequest("json")
14649 if res != nil && res.StatusCode == http.StatusNotModified {
14650 if res.Body != nil {
14651 res.Body.Close()
14652 }
14653 return nil, gensupport.WrapError(&googleapi.Error{
14654 Code: res.StatusCode,
14655 Header: res.Header,
14656 })
14657 }
14658 if err != nil {
14659 return nil, err
14660 }
14661 defer googleapi.CloseBody(res)
14662 if err := googleapi.CheckResponse(res); err != nil {
14663 return nil, gensupport.WrapError(err)
14664 }
14665 ret := &Feature{
14666 ServerResponse: googleapi.ServerResponse{
14667 Header: res.Header,
14668 HTTPStatusCode: res.StatusCode,
14669 },
14670 }
14671 target := &ret
14672 if err := gensupport.DecodeResponse(target, res); err != nil {
14673 return nil, err
14674 }
14675 return ret, nil
14676 }
14677
14678 type ResourcesFeaturesRenameCall struct {
14679 s *Service
14680 customer string
14681 oldName string
14682 featurerename *FeatureRename
14683 urlParams_ gensupport.URLParams
14684 ctx_ context.Context
14685 header_ http.Header
14686 }
14687
14688
14689
14690
14691
14692
14693
14694 func (r *ResourcesFeaturesService) Rename(customer string, oldName string, featurerename *FeatureRename) *ResourcesFeaturesRenameCall {
14695 c := &ResourcesFeaturesRenameCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14696 c.customer = customer
14697 c.oldName = oldName
14698 c.featurerename = featurerename
14699 return c
14700 }
14701
14702
14703
14704
14705 func (c *ResourcesFeaturesRenameCall) Fields(s ...googleapi.Field) *ResourcesFeaturesRenameCall {
14706 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14707 return c
14708 }
14709
14710
14711 func (c *ResourcesFeaturesRenameCall) Context(ctx context.Context) *ResourcesFeaturesRenameCall {
14712 c.ctx_ = ctx
14713 return c
14714 }
14715
14716
14717
14718 func (c *ResourcesFeaturesRenameCall) Header() http.Header {
14719 if c.header_ == nil {
14720 c.header_ = make(http.Header)
14721 }
14722 return c.header_
14723 }
14724
14725 func (c *ResourcesFeaturesRenameCall) doRequest(alt string) (*http.Response, error) {
14726 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14727 var body io.Reader = nil
14728 body, err := googleapi.WithoutDataWrapper.JSONReader(c.featurerename)
14729 if err != nil {
14730 return nil, err
14731 }
14732 c.urlParams_.Set("alt", alt)
14733 c.urlParams_.Set("prettyPrint", "false")
14734 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/features/{oldName}/rename")
14735 urls += "?" + c.urlParams_.Encode()
14736 req, err := http.NewRequest("POST", urls, body)
14737 if err != nil {
14738 return nil, err
14739 }
14740 req.Header = reqHeaders
14741 googleapi.Expand(req.URL, map[string]string{
14742 "customer": c.customer,
14743 "oldName": c.oldName,
14744 })
14745 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14746 }
14747
14748
14749 func (c *ResourcesFeaturesRenameCall) Do(opts ...googleapi.CallOption) error {
14750 gensupport.SetOptions(c.urlParams_, opts...)
14751 res, err := c.doRequest("json")
14752 if err != nil {
14753 return err
14754 }
14755 defer googleapi.CloseBody(res)
14756 if err := googleapi.CheckResponse(res); err != nil {
14757 return gensupport.WrapError(err)
14758 }
14759 return nil
14760 }
14761
14762 type ResourcesFeaturesUpdateCall struct {
14763 s *Service
14764 customer string
14765 featureKey string
14766 feature *Feature
14767 urlParams_ gensupport.URLParams
14768 ctx_ context.Context
14769 header_ http.Header
14770 }
14771
14772
14773
14774
14775
14776
14777
14778 func (r *ResourcesFeaturesService) Update(customer string, featureKey string, feature *Feature) *ResourcesFeaturesUpdateCall {
14779 c := &ResourcesFeaturesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14780 c.customer = customer
14781 c.featureKey = featureKey
14782 c.feature = feature
14783 return c
14784 }
14785
14786
14787
14788
14789 func (c *ResourcesFeaturesUpdateCall) Fields(s ...googleapi.Field) *ResourcesFeaturesUpdateCall {
14790 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14791 return c
14792 }
14793
14794
14795 func (c *ResourcesFeaturesUpdateCall) Context(ctx context.Context) *ResourcesFeaturesUpdateCall {
14796 c.ctx_ = ctx
14797 return c
14798 }
14799
14800
14801
14802 func (c *ResourcesFeaturesUpdateCall) Header() http.Header {
14803 if c.header_ == nil {
14804 c.header_ = make(http.Header)
14805 }
14806 return c.header_
14807 }
14808
14809 func (c *ResourcesFeaturesUpdateCall) doRequest(alt string) (*http.Response, error) {
14810 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14811 var body io.Reader = nil
14812 body, err := googleapi.WithoutDataWrapper.JSONReader(c.feature)
14813 if err != nil {
14814 return nil, err
14815 }
14816 c.urlParams_.Set("alt", alt)
14817 c.urlParams_.Set("prettyPrint", "false")
14818 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/features/{featureKey}")
14819 urls += "?" + c.urlParams_.Encode()
14820 req, err := http.NewRequest("PUT", urls, body)
14821 if err != nil {
14822 return nil, err
14823 }
14824 req.Header = reqHeaders
14825 googleapi.Expand(req.URL, map[string]string{
14826 "customer": c.customer,
14827 "featureKey": c.featureKey,
14828 })
14829 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14830 }
14831
14832
14833
14834
14835
14836
14837 func (c *ResourcesFeaturesUpdateCall) Do(opts ...googleapi.CallOption) (*Feature, error) {
14838 gensupport.SetOptions(c.urlParams_, opts...)
14839 res, err := c.doRequest("json")
14840 if res != nil && res.StatusCode == http.StatusNotModified {
14841 if res.Body != nil {
14842 res.Body.Close()
14843 }
14844 return nil, gensupport.WrapError(&googleapi.Error{
14845 Code: res.StatusCode,
14846 Header: res.Header,
14847 })
14848 }
14849 if err != nil {
14850 return nil, err
14851 }
14852 defer googleapi.CloseBody(res)
14853 if err := googleapi.CheckResponse(res); err != nil {
14854 return nil, gensupport.WrapError(err)
14855 }
14856 ret := &Feature{
14857 ServerResponse: googleapi.ServerResponse{
14858 Header: res.Header,
14859 HTTPStatusCode: res.StatusCode,
14860 },
14861 }
14862 target := &ret
14863 if err := gensupport.DecodeResponse(target, res); err != nil {
14864 return nil, err
14865 }
14866 return ret, nil
14867 }
14868
14869 type RoleAssignmentsDeleteCall struct {
14870 s *Service
14871 customer string
14872 roleAssignmentId string
14873 urlParams_ gensupport.URLParams
14874 ctx_ context.Context
14875 header_ http.Header
14876 }
14877
14878
14879
14880
14881
14882 func (r *RoleAssignmentsService) Delete(customer string, roleAssignmentId string) *RoleAssignmentsDeleteCall {
14883 c := &RoleAssignmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14884 c.customer = customer
14885 c.roleAssignmentId = roleAssignmentId
14886 return c
14887 }
14888
14889
14890
14891
14892 func (c *RoleAssignmentsDeleteCall) Fields(s ...googleapi.Field) *RoleAssignmentsDeleteCall {
14893 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14894 return c
14895 }
14896
14897
14898 func (c *RoleAssignmentsDeleteCall) Context(ctx context.Context) *RoleAssignmentsDeleteCall {
14899 c.ctx_ = ctx
14900 return c
14901 }
14902
14903
14904
14905 func (c *RoleAssignmentsDeleteCall) Header() http.Header {
14906 if c.header_ == nil {
14907 c.header_ = make(http.Header)
14908 }
14909 return c.header_
14910 }
14911
14912 func (c *RoleAssignmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
14913 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14914 var body io.Reader = nil
14915 c.urlParams_.Set("alt", alt)
14916 c.urlParams_.Set("prettyPrint", "false")
14917 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}")
14918 urls += "?" + c.urlParams_.Encode()
14919 req, err := http.NewRequest("DELETE", urls, body)
14920 if err != nil {
14921 return nil, err
14922 }
14923 req.Header = reqHeaders
14924 googleapi.Expand(req.URL, map[string]string{
14925 "customer": c.customer,
14926 "roleAssignmentId": c.roleAssignmentId,
14927 })
14928 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14929 }
14930
14931
14932 func (c *RoleAssignmentsDeleteCall) Do(opts ...googleapi.CallOption) error {
14933 gensupport.SetOptions(c.urlParams_, opts...)
14934 res, err := c.doRequest("json")
14935 if err != nil {
14936 return err
14937 }
14938 defer googleapi.CloseBody(res)
14939 if err := googleapi.CheckResponse(res); err != nil {
14940 return gensupport.WrapError(err)
14941 }
14942 return nil
14943 }
14944
14945 type RoleAssignmentsGetCall struct {
14946 s *Service
14947 customer string
14948 roleAssignmentId string
14949 urlParams_ gensupport.URLParams
14950 ifNoneMatch_ string
14951 ctx_ context.Context
14952 header_ http.Header
14953 }
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965 func (r *RoleAssignmentsService) Get(customer string, roleAssignmentId string) *RoleAssignmentsGetCall {
14966 c := &RoleAssignmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14967 c.customer = customer
14968 c.roleAssignmentId = roleAssignmentId
14969 return c
14970 }
14971
14972
14973
14974
14975 func (c *RoleAssignmentsGetCall) Fields(s ...googleapi.Field) *RoleAssignmentsGetCall {
14976 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14977 return c
14978 }
14979
14980
14981
14982
14983 func (c *RoleAssignmentsGetCall) IfNoneMatch(entityTag string) *RoleAssignmentsGetCall {
14984 c.ifNoneMatch_ = entityTag
14985 return c
14986 }
14987
14988
14989 func (c *RoleAssignmentsGetCall) Context(ctx context.Context) *RoleAssignmentsGetCall {
14990 c.ctx_ = ctx
14991 return c
14992 }
14993
14994
14995
14996 func (c *RoleAssignmentsGetCall) Header() http.Header {
14997 if c.header_ == nil {
14998 c.header_ = make(http.Header)
14999 }
15000 return c.header_
15001 }
15002
15003 func (c *RoleAssignmentsGetCall) doRequest(alt string) (*http.Response, error) {
15004 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15005 if c.ifNoneMatch_ != "" {
15006 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15007 }
15008 var body io.Reader = nil
15009 c.urlParams_.Set("alt", alt)
15010 c.urlParams_.Set("prettyPrint", "false")
15011 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}")
15012 urls += "?" + c.urlParams_.Encode()
15013 req, err := http.NewRequest("GET", urls, body)
15014 if err != nil {
15015 return nil, err
15016 }
15017 req.Header = reqHeaders
15018 googleapi.Expand(req.URL, map[string]string{
15019 "customer": c.customer,
15020 "roleAssignmentId": c.roleAssignmentId,
15021 })
15022 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15023 }
15024
15025
15026
15027
15028
15029
15030 func (c *RoleAssignmentsGetCall) Do(opts ...googleapi.CallOption) (*RoleAssignment, error) {
15031 gensupport.SetOptions(c.urlParams_, opts...)
15032 res, err := c.doRequest("json")
15033 if res != nil && res.StatusCode == http.StatusNotModified {
15034 if res.Body != nil {
15035 res.Body.Close()
15036 }
15037 return nil, gensupport.WrapError(&googleapi.Error{
15038 Code: res.StatusCode,
15039 Header: res.Header,
15040 })
15041 }
15042 if err != nil {
15043 return nil, err
15044 }
15045 defer googleapi.CloseBody(res)
15046 if err := googleapi.CheckResponse(res); err != nil {
15047 return nil, gensupport.WrapError(err)
15048 }
15049 ret := &RoleAssignment{
15050 ServerResponse: googleapi.ServerResponse{
15051 Header: res.Header,
15052 HTTPStatusCode: res.StatusCode,
15053 },
15054 }
15055 target := &ret
15056 if err := gensupport.DecodeResponse(target, res); err != nil {
15057 return nil, err
15058 }
15059 return ret, nil
15060 }
15061
15062 type RoleAssignmentsInsertCall struct {
15063 s *Service
15064 customer string
15065 roleassignment *RoleAssignment
15066 urlParams_ gensupport.URLParams
15067 ctx_ context.Context
15068 header_ http.Header
15069 }
15070
15071
15072
15073
15074 func (r *RoleAssignmentsService) Insert(customer string, roleassignment *RoleAssignment) *RoleAssignmentsInsertCall {
15075 c := &RoleAssignmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15076 c.customer = customer
15077 c.roleassignment = roleassignment
15078 return c
15079 }
15080
15081
15082
15083
15084 func (c *RoleAssignmentsInsertCall) Fields(s ...googleapi.Field) *RoleAssignmentsInsertCall {
15085 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15086 return c
15087 }
15088
15089
15090 func (c *RoleAssignmentsInsertCall) Context(ctx context.Context) *RoleAssignmentsInsertCall {
15091 c.ctx_ = ctx
15092 return c
15093 }
15094
15095
15096
15097 func (c *RoleAssignmentsInsertCall) Header() http.Header {
15098 if c.header_ == nil {
15099 c.header_ = make(http.Header)
15100 }
15101 return c.header_
15102 }
15103
15104 func (c *RoleAssignmentsInsertCall) doRequest(alt string) (*http.Response, error) {
15105 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15106 var body io.Reader = nil
15107 body, err := googleapi.WithoutDataWrapper.JSONReader(c.roleassignment)
15108 if err != nil {
15109 return nil, err
15110 }
15111 c.urlParams_.Set("alt", alt)
15112 c.urlParams_.Set("prettyPrint", "false")
15113 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roleassignments")
15114 urls += "?" + c.urlParams_.Encode()
15115 req, err := http.NewRequest("POST", urls, body)
15116 if err != nil {
15117 return nil, err
15118 }
15119 req.Header = reqHeaders
15120 googleapi.Expand(req.URL, map[string]string{
15121 "customer": c.customer,
15122 })
15123 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15124 }
15125
15126
15127
15128
15129
15130
15131 func (c *RoleAssignmentsInsertCall) Do(opts ...googleapi.CallOption) (*RoleAssignment, error) {
15132 gensupport.SetOptions(c.urlParams_, opts...)
15133 res, err := c.doRequest("json")
15134 if res != nil && res.StatusCode == http.StatusNotModified {
15135 if res.Body != nil {
15136 res.Body.Close()
15137 }
15138 return nil, gensupport.WrapError(&googleapi.Error{
15139 Code: res.StatusCode,
15140 Header: res.Header,
15141 })
15142 }
15143 if err != nil {
15144 return nil, err
15145 }
15146 defer googleapi.CloseBody(res)
15147 if err := googleapi.CheckResponse(res); err != nil {
15148 return nil, gensupport.WrapError(err)
15149 }
15150 ret := &RoleAssignment{
15151 ServerResponse: googleapi.ServerResponse{
15152 Header: res.Header,
15153 HTTPStatusCode: res.StatusCode,
15154 },
15155 }
15156 target := &ret
15157 if err := gensupport.DecodeResponse(target, res); err != nil {
15158 return nil, err
15159 }
15160 return ret, nil
15161 }
15162
15163 type RoleAssignmentsListCall struct {
15164 s *Service
15165 customer string
15166 urlParams_ gensupport.URLParams
15167 ifNoneMatch_ string
15168 ctx_ context.Context
15169 header_ http.Header
15170 }
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181 func (r *RoleAssignmentsService) List(customer string) *RoleAssignmentsListCall {
15182 c := &RoleAssignmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15183 c.customer = customer
15184 return c
15185 }
15186
15187
15188
15189
15190
15191
15192 func (c *RoleAssignmentsListCall) IncludeIndirectRoleAssignments(includeIndirectRoleAssignments bool) *RoleAssignmentsListCall {
15193 c.urlParams_.Set("includeIndirectRoleAssignments", fmt.Sprint(includeIndirectRoleAssignments))
15194 return c
15195 }
15196
15197
15198
15199 func (c *RoleAssignmentsListCall) MaxResults(maxResults int64) *RoleAssignmentsListCall {
15200 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15201 return c
15202 }
15203
15204
15205
15206 func (c *RoleAssignmentsListCall) PageToken(pageToken string) *RoleAssignmentsListCall {
15207 c.urlParams_.Set("pageToken", pageToken)
15208 return c
15209 }
15210
15211
15212
15213
15214 func (c *RoleAssignmentsListCall) RoleId(roleId string) *RoleAssignmentsListCall {
15215 c.urlParams_.Set("roleId", roleId)
15216 return c
15217 }
15218
15219
15220
15221
15222 func (c *RoleAssignmentsListCall) UserKey(userKey string) *RoleAssignmentsListCall {
15223 c.urlParams_.Set("userKey", userKey)
15224 return c
15225 }
15226
15227
15228
15229
15230 func (c *RoleAssignmentsListCall) Fields(s ...googleapi.Field) *RoleAssignmentsListCall {
15231 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15232 return c
15233 }
15234
15235
15236
15237
15238 func (c *RoleAssignmentsListCall) IfNoneMatch(entityTag string) *RoleAssignmentsListCall {
15239 c.ifNoneMatch_ = entityTag
15240 return c
15241 }
15242
15243
15244 func (c *RoleAssignmentsListCall) Context(ctx context.Context) *RoleAssignmentsListCall {
15245 c.ctx_ = ctx
15246 return c
15247 }
15248
15249
15250
15251 func (c *RoleAssignmentsListCall) Header() http.Header {
15252 if c.header_ == nil {
15253 c.header_ = make(http.Header)
15254 }
15255 return c.header_
15256 }
15257
15258 func (c *RoleAssignmentsListCall) doRequest(alt string) (*http.Response, error) {
15259 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15260 if c.ifNoneMatch_ != "" {
15261 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15262 }
15263 var body io.Reader = nil
15264 c.urlParams_.Set("alt", alt)
15265 c.urlParams_.Set("prettyPrint", "false")
15266 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roleassignments")
15267 urls += "?" + c.urlParams_.Encode()
15268 req, err := http.NewRequest("GET", urls, body)
15269 if err != nil {
15270 return nil, err
15271 }
15272 req.Header = reqHeaders
15273 googleapi.Expand(req.URL, map[string]string{
15274 "customer": c.customer,
15275 })
15276 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15277 }
15278
15279
15280
15281
15282
15283
15284
15285 func (c *RoleAssignmentsListCall) Do(opts ...googleapi.CallOption) (*RoleAssignments, error) {
15286 gensupport.SetOptions(c.urlParams_, opts...)
15287 res, err := c.doRequest("json")
15288 if res != nil && res.StatusCode == http.StatusNotModified {
15289 if res.Body != nil {
15290 res.Body.Close()
15291 }
15292 return nil, gensupport.WrapError(&googleapi.Error{
15293 Code: res.StatusCode,
15294 Header: res.Header,
15295 })
15296 }
15297 if err != nil {
15298 return nil, err
15299 }
15300 defer googleapi.CloseBody(res)
15301 if err := googleapi.CheckResponse(res); err != nil {
15302 return nil, gensupport.WrapError(err)
15303 }
15304 ret := &RoleAssignments{
15305 ServerResponse: googleapi.ServerResponse{
15306 Header: res.Header,
15307 HTTPStatusCode: res.StatusCode,
15308 },
15309 }
15310 target := &ret
15311 if err := gensupport.DecodeResponse(target, res); err != nil {
15312 return nil, err
15313 }
15314 return ret, nil
15315 }
15316
15317
15318
15319
15320 func (c *RoleAssignmentsListCall) Pages(ctx context.Context, f func(*RoleAssignments) error) error {
15321 c.ctx_ = ctx
15322 defer c.PageToken(c.urlParams_.Get("pageToken"))
15323 for {
15324 x, err := c.Do()
15325 if err != nil {
15326 return err
15327 }
15328 if err := f(x); err != nil {
15329 return err
15330 }
15331 if x.NextPageToken == "" {
15332 return nil
15333 }
15334 c.PageToken(x.NextPageToken)
15335 }
15336 }
15337
15338 type RolesDeleteCall struct {
15339 s *Service
15340 customer string
15341 roleId string
15342 urlParams_ gensupport.URLParams
15343 ctx_ context.Context
15344 header_ http.Header
15345 }
15346
15347
15348
15349
15350
15351 func (r *RolesService) Delete(customer string, roleId string) *RolesDeleteCall {
15352 c := &RolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15353 c.customer = customer
15354 c.roleId = roleId
15355 return c
15356 }
15357
15358
15359
15360
15361 func (c *RolesDeleteCall) Fields(s ...googleapi.Field) *RolesDeleteCall {
15362 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15363 return c
15364 }
15365
15366
15367 func (c *RolesDeleteCall) Context(ctx context.Context) *RolesDeleteCall {
15368 c.ctx_ = ctx
15369 return c
15370 }
15371
15372
15373
15374 func (c *RolesDeleteCall) Header() http.Header {
15375 if c.header_ == nil {
15376 c.header_ = make(http.Header)
15377 }
15378 return c.header_
15379 }
15380
15381 func (c *RolesDeleteCall) doRequest(alt string) (*http.Response, error) {
15382 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15383 var body io.Reader = nil
15384 c.urlParams_.Set("alt", alt)
15385 c.urlParams_.Set("prettyPrint", "false")
15386 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roles/{roleId}")
15387 urls += "?" + c.urlParams_.Encode()
15388 req, err := http.NewRequest("DELETE", urls, body)
15389 if err != nil {
15390 return nil, err
15391 }
15392 req.Header = reqHeaders
15393 googleapi.Expand(req.URL, map[string]string{
15394 "customer": c.customer,
15395 "roleId": c.roleId,
15396 })
15397 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15398 }
15399
15400
15401 func (c *RolesDeleteCall) Do(opts ...googleapi.CallOption) error {
15402 gensupport.SetOptions(c.urlParams_, opts...)
15403 res, err := c.doRequest("json")
15404 if err != nil {
15405 return err
15406 }
15407 defer googleapi.CloseBody(res)
15408 if err := googleapi.CheckResponse(res); err != nil {
15409 return gensupport.WrapError(err)
15410 }
15411 return nil
15412 }
15413
15414 type RolesGetCall struct {
15415 s *Service
15416 customer string
15417 roleId string
15418 urlParams_ gensupport.URLParams
15419 ifNoneMatch_ string
15420 ctx_ context.Context
15421 header_ http.Header
15422 }
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434 func (r *RolesService) Get(customer string, roleId string) *RolesGetCall {
15435 c := &RolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15436 c.customer = customer
15437 c.roleId = roleId
15438 return c
15439 }
15440
15441
15442
15443
15444 func (c *RolesGetCall) Fields(s ...googleapi.Field) *RolesGetCall {
15445 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15446 return c
15447 }
15448
15449
15450
15451
15452 func (c *RolesGetCall) IfNoneMatch(entityTag string) *RolesGetCall {
15453 c.ifNoneMatch_ = entityTag
15454 return c
15455 }
15456
15457
15458 func (c *RolesGetCall) Context(ctx context.Context) *RolesGetCall {
15459 c.ctx_ = ctx
15460 return c
15461 }
15462
15463
15464
15465 func (c *RolesGetCall) Header() http.Header {
15466 if c.header_ == nil {
15467 c.header_ = make(http.Header)
15468 }
15469 return c.header_
15470 }
15471
15472 func (c *RolesGetCall) doRequest(alt string) (*http.Response, error) {
15473 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15474 if c.ifNoneMatch_ != "" {
15475 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15476 }
15477 var body io.Reader = nil
15478 c.urlParams_.Set("alt", alt)
15479 c.urlParams_.Set("prettyPrint", "false")
15480 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roles/{roleId}")
15481 urls += "?" + c.urlParams_.Encode()
15482 req, err := http.NewRequest("GET", urls, body)
15483 if err != nil {
15484 return nil, err
15485 }
15486 req.Header = reqHeaders
15487 googleapi.Expand(req.URL, map[string]string{
15488 "customer": c.customer,
15489 "roleId": c.roleId,
15490 })
15491 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15492 }
15493
15494
15495
15496
15497
15498
15499 func (c *RolesGetCall) Do(opts ...googleapi.CallOption) (*Role, error) {
15500 gensupport.SetOptions(c.urlParams_, opts...)
15501 res, err := c.doRequest("json")
15502 if res != nil && res.StatusCode == http.StatusNotModified {
15503 if res.Body != nil {
15504 res.Body.Close()
15505 }
15506 return nil, gensupport.WrapError(&googleapi.Error{
15507 Code: res.StatusCode,
15508 Header: res.Header,
15509 })
15510 }
15511 if err != nil {
15512 return nil, err
15513 }
15514 defer googleapi.CloseBody(res)
15515 if err := googleapi.CheckResponse(res); err != nil {
15516 return nil, gensupport.WrapError(err)
15517 }
15518 ret := &Role{
15519 ServerResponse: googleapi.ServerResponse{
15520 Header: res.Header,
15521 HTTPStatusCode: res.StatusCode,
15522 },
15523 }
15524 target := &ret
15525 if err := gensupport.DecodeResponse(target, res); err != nil {
15526 return nil, err
15527 }
15528 return ret, nil
15529 }
15530
15531 type RolesInsertCall struct {
15532 s *Service
15533 customer string
15534 role *Role
15535 urlParams_ gensupport.URLParams
15536 ctx_ context.Context
15537 header_ http.Header
15538 }
15539
15540
15541
15542
15543 func (r *RolesService) Insert(customer string, role *Role) *RolesInsertCall {
15544 c := &RolesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15545 c.customer = customer
15546 c.role = role
15547 return c
15548 }
15549
15550
15551
15552
15553 func (c *RolesInsertCall) Fields(s ...googleapi.Field) *RolesInsertCall {
15554 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15555 return c
15556 }
15557
15558
15559 func (c *RolesInsertCall) Context(ctx context.Context) *RolesInsertCall {
15560 c.ctx_ = ctx
15561 return c
15562 }
15563
15564
15565
15566 func (c *RolesInsertCall) Header() http.Header {
15567 if c.header_ == nil {
15568 c.header_ = make(http.Header)
15569 }
15570 return c.header_
15571 }
15572
15573 func (c *RolesInsertCall) doRequest(alt string) (*http.Response, error) {
15574 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15575 var body io.Reader = nil
15576 body, err := googleapi.WithoutDataWrapper.JSONReader(c.role)
15577 if err != nil {
15578 return nil, err
15579 }
15580 c.urlParams_.Set("alt", alt)
15581 c.urlParams_.Set("prettyPrint", "false")
15582 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roles")
15583 urls += "?" + c.urlParams_.Encode()
15584 req, err := http.NewRequest("POST", urls, body)
15585 if err != nil {
15586 return nil, err
15587 }
15588 req.Header = reqHeaders
15589 googleapi.Expand(req.URL, map[string]string{
15590 "customer": c.customer,
15591 })
15592 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15593 }
15594
15595
15596
15597
15598
15599
15600 func (c *RolesInsertCall) Do(opts ...googleapi.CallOption) (*Role, error) {
15601 gensupport.SetOptions(c.urlParams_, opts...)
15602 res, err := c.doRequest("json")
15603 if res != nil && res.StatusCode == http.StatusNotModified {
15604 if res.Body != nil {
15605 res.Body.Close()
15606 }
15607 return nil, gensupport.WrapError(&googleapi.Error{
15608 Code: res.StatusCode,
15609 Header: res.Header,
15610 })
15611 }
15612 if err != nil {
15613 return nil, err
15614 }
15615 defer googleapi.CloseBody(res)
15616 if err := googleapi.CheckResponse(res); err != nil {
15617 return nil, gensupport.WrapError(err)
15618 }
15619 ret := &Role{
15620 ServerResponse: googleapi.ServerResponse{
15621 Header: res.Header,
15622 HTTPStatusCode: res.StatusCode,
15623 },
15624 }
15625 target := &ret
15626 if err := gensupport.DecodeResponse(target, res); err != nil {
15627 return nil, err
15628 }
15629 return ret, nil
15630 }
15631
15632 type RolesListCall struct {
15633 s *Service
15634 customer string
15635 urlParams_ gensupport.URLParams
15636 ifNoneMatch_ string
15637 ctx_ context.Context
15638 header_ http.Header
15639 }
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650 func (r *RolesService) List(customer string) *RolesListCall {
15651 c := &RolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15652 c.customer = customer
15653 return c
15654 }
15655
15656
15657
15658 func (c *RolesListCall) MaxResults(maxResults int64) *RolesListCall {
15659 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15660 return c
15661 }
15662
15663
15664
15665 func (c *RolesListCall) PageToken(pageToken string) *RolesListCall {
15666 c.urlParams_.Set("pageToken", pageToken)
15667 return c
15668 }
15669
15670
15671
15672
15673 func (c *RolesListCall) Fields(s ...googleapi.Field) *RolesListCall {
15674 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15675 return c
15676 }
15677
15678
15679
15680
15681 func (c *RolesListCall) IfNoneMatch(entityTag string) *RolesListCall {
15682 c.ifNoneMatch_ = entityTag
15683 return c
15684 }
15685
15686
15687 func (c *RolesListCall) Context(ctx context.Context) *RolesListCall {
15688 c.ctx_ = ctx
15689 return c
15690 }
15691
15692
15693
15694 func (c *RolesListCall) Header() http.Header {
15695 if c.header_ == nil {
15696 c.header_ = make(http.Header)
15697 }
15698 return c.header_
15699 }
15700
15701 func (c *RolesListCall) doRequest(alt string) (*http.Response, error) {
15702 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15703 if c.ifNoneMatch_ != "" {
15704 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15705 }
15706 var body io.Reader = nil
15707 c.urlParams_.Set("alt", alt)
15708 c.urlParams_.Set("prettyPrint", "false")
15709 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roles")
15710 urls += "?" + c.urlParams_.Encode()
15711 req, err := http.NewRequest("GET", urls, body)
15712 if err != nil {
15713 return nil, err
15714 }
15715 req.Header = reqHeaders
15716 googleapi.Expand(req.URL, map[string]string{
15717 "customer": c.customer,
15718 })
15719 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15720 }
15721
15722
15723
15724
15725
15726
15727 func (c *RolesListCall) Do(opts ...googleapi.CallOption) (*Roles, error) {
15728 gensupport.SetOptions(c.urlParams_, opts...)
15729 res, err := c.doRequest("json")
15730 if res != nil && res.StatusCode == http.StatusNotModified {
15731 if res.Body != nil {
15732 res.Body.Close()
15733 }
15734 return nil, gensupport.WrapError(&googleapi.Error{
15735 Code: res.StatusCode,
15736 Header: res.Header,
15737 })
15738 }
15739 if err != nil {
15740 return nil, err
15741 }
15742 defer googleapi.CloseBody(res)
15743 if err := googleapi.CheckResponse(res); err != nil {
15744 return nil, gensupport.WrapError(err)
15745 }
15746 ret := &Roles{
15747 ServerResponse: googleapi.ServerResponse{
15748 Header: res.Header,
15749 HTTPStatusCode: res.StatusCode,
15750 },
15751 }
15752 target := &ret
15753 if err := gensupport.DecodeResponse(target, res); err != nil {
15754 return nil, err
15755 }
15756 return ret, nil
15757 }
15758
15759
15760
15761
15762 func (c *RolesListCall) Pages(ctx context.Context, f func(*Roles) error) error {
15763 c.ctx_ = ctx
15764 defer c.PageToken(c.urlParams_.Get("pageToken"))
15765 for {
15766 x, err := c.Do()
15767 if err != nil {
15768 return err
15769 }
15770 if err := f(x); err != nil {
15771 return err
15772 }
15773 if x.NextPageToken == "" {
15774 return nil
15775 }
15776 c.PageToken(x.NextPageToken)
15777 }
15778 }
15779
15780 type RolesPatchCall struct {
15781 s *Service
15782 customer string
15783 roleId string
15784 role *Role
15785 urlParams_ gensupport.URLParams
15786 ctx_ context.Context
15787 header_ http.Header
15788 }
15789
15790
15791
15792
15793
15794 func (r *RolesService) Patch(customer string, roleId string, role *Role) *RolesPatchCall {
15795 c := &RolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15796 c.customer = customer
15797 c.roleId = roleId
15798 c.role = role
15799 return c
15800 }
15801
15802
15803
15804
15805 func (c *RolesPatchCall) Fields(s ...googleapi.Field) *RolesPatchCall {
15806 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15807 return c
15808 }
15809
15810
15811 func (c *RolesPatchCall) Context(ctx context.Context) *RolesPatchCall {
15812 c.ctx_ = ctx
15813 return c
15814 }
15815
15816
15817
15818 func (c *RolesPatchCall) Header() http.Header {
15819 if c.header_ == nil {
15820 c.header_ = make(http.Header)
15821 }
15822 return c.header_
15823 }
15824
15825 func (c *RolesPatchCall) doRequest(alt string) (*http.Response, error) {
15826 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15827 var body io.Reader = nil
15828 body, err := googleapi.WithoutDataWrapper.JSONReader(c.role)
15829 if err != nil {
15830 return nil, err
15831 }
15832 c.urlParams_.Set("alt", alt)
15833 c.urlParams_.Set("prettyPrint", "false")
15834 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roles/{roleId}")
15835 urls += "?" + c.urlParams_.Encode()
15836 req, err := http.NewRequest("PATCH", urls, body)
15837 if err != nil {
15838 return nil, err
15839 }
15840 req.Header = reqHeaders
15841 googleapi.Expand(req.URL, map[string]string{
15842 "customer": c.customer,
15843 "roleId": c.roleId,
15844 })
15845 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15846 }
15847
15848
15849
15850
15851
15852
15853 func (c *RolesPatchCall) Do(opts ...googleapi.CallOption) (*Role, error) {
15854 gensupport.SetOptions(c.urlParams_, opts...)
15855 res, err := c.doRequest("json")
15856 if res != nil && res.StatusCode == http.StatusNotModified {
15857 if res.Body != nil {
15858 res.Body.Close()
15859 }
15860 return nil, gensupport.WrapError(&googleapi.Error{
15861 Code: res.StatusCode,
15862 Header: res.Header,
15863 })
15864 }
15865 if err != nil {
15866 return nil, err
15867 }
15868 defer googleapi.CloseBody(res)
15869 if err := googleapi.CheckResponse(res); err != nil {
15870 return nil, gensupport.WrapError(err)
15871 }
15872 ret := &Role{
15873 ServerResponse: googleapi.ServerResponse{
15874 Header: res.Header,
15875 HTTPStatusCode: res.StatusCode,
15876 },
15877 }
15878 target := &ret
15879 if err := gensupport.DecodeResponse(target, res); err != nil {
15880 return nil, err
15881 }
15882 return ret, nil
15883 }
15884
15885 type RolesUpdateCall struct {
15886 s *Service
15887 customer string
15888 roleId string
15889 role *Role
15890 urlParams_ gensupport.URLParams
15891 ctx_ context.Context
15892 header_ http.Header
15893 }
15894
15895
15896
15897
15898
15899 func (r *RolesService) Update(customer string, roleId string, role *Role) *RolesUpdateCall {
15900 c := &RolesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15901 c.customer = customer
15902 c.roleId = roleId
15903 c.role = role
15904 return c
15905 }
15906
15907
15908
15909
15910 func (c *RolesUpdateCall) Fields(s ...googleapi.Field) *RolesUpdateCall {
15911 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15912 return c
15913 }
15914
15915
15916 func (c *RolesUpdateCall) Context(ctx context.Context) *RolesUpdateCall {
15917 c.ctx_ = ctx
15918 return c
15919 }
15920
15921
15922
15923 func (c *RolesUpdateCall) Header() http.Header {
15924 if c.header_ == nil {
15925 c.header_ = make(http.Header)
15926 }
15927 return c.header_
15928 }
15929
15930 func (c *RolesUpdateCall) doRequest(alt string) (*http.Response, error) {
15931 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15932 var body io.Reader = nil
15933 body, err := googleapi.WithoutDataWrapper.JSONReader(c.role)
15934 if err != nil {
15935 return nil, err
15936 }
15937 c.urlParams_.Set("alt", alt)
15938 c.urlParams_.Set("prettyPrint", "false")
15939 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roles/{roleId}")
15940 urls += "?" + c.urlParams_.Encode()
15941 req, err := http.NewRequest("PUT", urls, body)
15942 if err != nil {
15943 return nil, err
15944 }
15945 req.Header = reqHeaders
15946 googleapi.Expand(req.URL, map[string]string{
15947 "customer": c.customer,
15948 "roleId": c.roleId,
15949 })
15950 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15951 }
15952
15953
15954
15955
15956
15957
15958 func (c *RolesUpdateCall) Do(opts ...googleapi.CallOption) (*Role, error) {
15959 gensupport.SetOptions(c.urlParams_, opts...)
15960 res, err := c.doRequest("json")
15961 if res != nil && res.StatusCode == http.StatusNotModified {
15962 if res.Body != nil {
15963 res.Body.Close()
15964 }
15965 return nil, gensupport.WrapError(&googleapi.Error{
15966 Code: res.StatusCode,
15967 Header: res.Header,
15968 })
15969 }
15970 if err != nil {
15971 return nil, err
15972 }
15973 defer googleapi.CloseBody(res)
15974 if err := googleapi.CheckResponse(res); err != nil {
15975 return nil, gensupport.WrapError(err)
15976 }
15977 ret := &Role{
15978 ServerResponse: googleapi.ServerResponse{
15979 Header: res.Header,
15980 HTTPStatusCode: res.StatusCode,
15981 },
15982 }
15983 target := &ret
15984 if err := gensupport.DecodeResponse(target, res); err != nil {
15985 return nil, err
15986 }
15987 return ret, nil
15988 }
15989
15990 type SchemasDeleteCall struct {
15991 s *Service
15992 customerId string
15993 schemaKey string
15994 urlParams_ gensupport.URLParams
15995 ctx_ context.Context
15996 header_ http.Header
15997 }
15998
15999
16000
16001
16002
16003 func (r *SchemasService) Delete(customerId string, schemaKey string) *SchemasDeleteCall {
16004 c := &SchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16005 c.customerId = customerId
16006 c.schemaKey = schemaKey
16007 return c
16008 }
16009
16010
16011
16012
16013 func (c *SchemasDeleteCall) Fields(s ...googleapi.Field) *SchemasDeleteCall {
16014 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16015 return c
16016 }
16017
16018
16019 func (c *SchemasDeleteCall) Context(ctx context.Context) *SchemasDeleteCall {
16020 c.ctx_ = ctx
16021 return c
16022 }
16023
16024
16025
16026 func (c *SchemasDeleteCall) Header() http.Header {
16027 if c.header_ == nil {
16028 c.header_ = make(http.Header)
16029 }
16030 return c.header_
16031 }
16032
16033 func (c *SchemasDeleteCall) doRequest(alt string) (*http.Response, error) {
16034 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16035 var body io.Reader = nil
16036 c.urlParams_.Set("alt", alt)
16037 c.urlParams_.Set("prettyPrint", "false")
16038 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}")
16039 urls += "?" + c.urlParams_.Encode()
16040 req, err := http.NewRequest("DELETE", urls, body)
16041 if err != nil {
16042 return nil, err
16043 }
16044 req.Header = reqHeaders
16045 googleapi.Expand(req.URL, map[string]string{
16046 "customerId": c.customerId,
16047 "schemaKey": c.schemaKey,
16048 })
16049 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16050 }
16051
16052
16053 func (c *SchemasDeleteCall) Do(opts ...googleapi.CallOption) error {
16054 gensupport.SetOptions(c.urlParams_, opts...)
16055 res, err := c.doRequest("json")
16056 if err != nil {
16057 return err
16058 }
16059 defer googleapi.CloseBody(res)
16060 if err := googleapi.CheckResponse(res); err != nil {
16061 return gensupport.WrapError(err)
16062 }
16063 return nil
16064 }
16065
16066 type SchemasGetCall struct {
16067 s *Service
16068 customerId string
16069 schemaKey string
16070 urlParams_ gensupport.URLParams
16071 ifNoneMatch_ string
16072 ctx_ context.Context
16073 header_ http.Header
16074 }
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086 func (r *SchemasService) Get(customerId string, schemaKey string) *SchemasGetCall {
16087 c := &SchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16088 c.customerId = customerId
16089 c.schemaKey = schemaKey
16090 return c
16091 }
16092
16093
16094
16095
16096 func (c *SchemasGetCall) Fields(s ...googleapi.Field) *SchemasGetCall {
16097 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16098 return c
16099 }
16100
16101
16102
16103
16104 func (c *SchemasGetCall) IfNoneMatch(entityTag string) *SchemasGetCall {
16105 c.ifNoneMatch_ = entityTag
16106 return c
16107 }
16108
16109
16110 func (c *SchemasGetCall) Context(ctx context.Context) *SchemasGetCall {
16111 c.ctx_ = ctx
16112 return c
16113 }
16114
16115
16116
16117 func (c *SchemasGetCall) Header() http.Header {
16118 if c.header_ == nil {
16119 c.header_ = make(http.Header)
16120 }
16121 return c.header_
16122 }
16123
16124 func (c *SchemasGetCall) doRequest(alt string) (*http.Response, error) {
16125 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16126 if c.ifNoneMatch_ != "" {
16127 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16128 }
16129 var body io.Reader = nil
16130 c.urlParams_.Set("alt", alt)
16131 c.urlParams_.Set("prettyPrint", "false")
16132 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}")
16133 urls += "?" + c.urlParams_.Encode()
16134 req, err := http.NewRequest("GET", urls, body)
16135 if err != nil {
16136 return nil, err
16137 }
16138 req.Header = reqHeaders
16139 googleapi.Expand(req.URL, map[string]string{
16140 "customerId": c.customerId,
16141 "schemaKey": c.schemaKey,
16142 })
16143 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16144 }
16145
16146
16147
16148
16149
16150
16151 func (c *SchemasGetCall) Do(opts ...googleapi.CallOption) (*Schema, error) {
16152 gensupport.SetOptions(c.urlParams_, opts...)
16153 res, err := c.doRequest("json")
16154 if res != nil && res.StatusCode == http.StatusNotModified {
16155 if res.Body != nil {
16156 res.Body.Close()
16157 }
16158 return nil, gensupport.WrapError(&googleapi.Error{
16159 Code: res.StatusCode,
16160 Header: res.Header,
16161 })
16162 }
16163 if err != nil {
16164 return nil, err
16165 }
16166 defer googleapi.CloseBody(res)
16167 if err := googleapi.CheckResponse(res); err != nil {
16168 return nil, gensupport.WrapError(err)
16169 }
16170 ret := &Schema{
16171 ServerResponse: googleapi.ServerResponse{
16172 Header: res.Header,
16173 HTTPStatusCode: res.StatusCode,
16174 },
16175 }
16176 target := &ret
16177 if err := gensupport.DecodeResponse(target, res); err != nil {
16178 return nil, err
16179 }
16180 return ret, nil
16181 }
16182
16183 type SchemasInsertCall struct {
16184 s *Service
16185 customerId string
16186 schema *Schema
16187 urlParams_ gensupport.URLParams
16188 ctx_ context.Context
16189 header_ http.Header
16190 }
16191
16192
16193
16194
16195 func (r *SchemasService) Insert(customerId string, schema *Schema) *SchemasInsertCall {
16196 c := &SchemasInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16197 c.customerId = customerId
16198 c.schema = schema
16199 return c
16200 }
16201
16202
16203
16204
16205 func (c *SchemasInsertCall) Fields(s ...googleapi.Field) *SchemasInsertCall {
16206 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16207 return c
16208 }
16209
16210
16211 func (c *SchemasInsertCall) Context(ctx context.Context) *SchemasInsertCall {
16212 c.ctx_ = ctx
16213 return c
16214 }
16215
16216
16217
16218 func (c *SchemasInsertCall) Header() http.Header {
16219 if c.header_ == nil {
16220 c.header_ = make(http.Header)
16221 }
16222 return c.header_
16223 }
16224
16225 func (c *SchemasInsertCall) doRequest(alt string) (*http.Response, error) {
16226 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16227 var body io.Reader = nil
16228 body, err := googleapi.WithoutDataWrapper.JSONReader(c.schema)
16229 if err != nil {
16230 return nil, err
16231 }
16232 c.urlParams_.Set("alt", alt)
16233 c.urlParams_.Set("prettyPrint", "false")
16234 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/schemas")
16235 urls += "?" + c.urlParams_.Encode()
16236 req, err := http.NewRequest("POST", urls, body)
16237 if err != nil {
16238 return nil, err
16239 }
16240 req.Header = reqHeaders
16241 googleapi.Expand(req.URL, map[string]string{
16242 "customerId": c.customerId,
16243 })
16244 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16245 }
16246
16247
16248
16249
16250
16251
16252 func (c *SchemasInsertCall) Do(opts ...googleapi.CallOption) (*Schema, error) {
16253 gensupport.SetOptions(c.urlParams_, opts...)
16254 res, err := c.doRequest("json")
16255 if res != nil && res.StatusCode == http.StatusNotModified {
16256 if res.Body != nil {
16257 res.Body.Close()
16258 }
16259 return nil, gensupport.WrapError(&googleapi.Error{
16260 Code: res.StatusCode,
16261 Header: res.Header,
16262 })
16263 }
16264 if err != nil {
16265 return nil, err
16266 }
16267 defer googleapi.CloseBody(res)
16268 if err := googleapi.CheckResponse(res); err != nil {
16269 return nil, gensupport.WrapError(err)
16270 }
16271 ret := &Schema{
16272 ServerResponse: googleapi.ServerResponse{
16273 Header: res.Header,
16274 HTTPStatusCode: res.StatusCode,
16275 },
16276 }
16277 target := &ret
16278 if err := gensupport.DecodeResponse(target, res); err != nil {
16279 return nil, err
16280 }
16281 return ret, nil
16282 }
16283
16284 type SchemasListCall struct {
16285 s *Service
16286 customerId string
16287 urlParams_ gensupport.URLParams
16288 ifNoneMatch_ string
16289 ctx_ context.Context
16290 header_ http.Header
16291 }
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302 func (r *SchemasService) List(customerId string) *SchemasListCall {
16303 c := &SchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16304 c.customerId = customerId
16305 return c
16306 }
16307
16308
16309
16310
16311 func (c *SchemasListCall) Fields(s ...googleapi.Field) *SchemasListCall {
16312 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16313 return c
16314 }
16315
16316
16317
16318
16319 func (c *SchemasListCall) IfNoneMatch(entityTag string) *SchemasListCall {
16320 c.ifNoneMatch_ = entityTag
16321 return c
16322 }
16323
16324
16325 func (c *SchemasListCall) Context(ctx context.Context) *SchemasListCall {
16326 c.ctx_ = ctx
16327 return c
16328 }
16329
16330
16331
16332 func (c *SchemasListCall) Header() http.Header {
16333 if c.header_ == nil {
16334 c.header_ = make(http.Header)
16335 }
16336 return c.header_
16337 }
16338
16339 func (c *SchemasListCall) doRequest(alt string) (*http.Response, error) {
16340 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16341 if c.ifNoneMatch_ != "" {
16342 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16343 }
16344 var body io.Reader = nil
16345 c.urlParams_.Set("alt", alt)
16346 c.urlParams_.Set("prettyPrint", "false")
16347 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/schemas")
16348 urls += "?" + c.urlParams_.Encode()
16349 req, err := http.NewRequest("GET", urls, body)
16350 if err != nil {
16351 return nil, err
16352 }
16353 req.Header = reqHeaders
16354 googleapi.Expand(req.URL, map[string]string{
16355 "customerId": c.customerId,
16356 })
16357 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16358 }
16359
16360
16361
16362
16363
16364
16365 func (c *SchemasListCall) Do(opts ...googleapi.CallOption) (*Schemas, error) {
16366 gensupport.SetOptions(c.urlParams_, opts...)
16367 res, err := c.doRequest("json")
16368 if res != nil && res.StatusCode == http.StatusNotModified {
16369 if res.Body != nil {
16370 res.Body.Close()
16371 }
16372 return nil, gensupport.WrapError(&googleapi.Error{
16373 Code: res.StatusCode,
16374 Header: res.Header,
16375 })
16376 }
16377 if err != nil {
16378 return nil, err
16379 }
16380 defer googleapi.CloseBody(res)
16381 if err := googleapi.CheckResponse(res); err != nil {
16382 return nil, gensupport.WrapError(err)
16383 }
16384 ret := &Schemas{
16385 ServerResponse: googleapi.ServerResponse{
16386 Header: res.Header,
16387 HTTPStatusCode: res.StatusCode,
16388 },
16389 }
16390 target := &ret
16391 if err := gensupport.DecodeResponse(target, res); err != nil {
16392 return nil, err
16393 }
16394 return ret, nil
16395 }
16396
16397 type SchemasPatchCall struct {
16398 s *Service
16399 customerId string
16400 schemaKey string
16401 schema *Schema
16402 urlParams_ gensupport.URLParams
16403 ctx_ context.Context
16404 header_ http.Header
16405 }
16406
16407
16408
16409
16410
16411 func (r *SchemasService) Patch(customerId string, schemaKey string, schema *Schema) *SchemasPatchCall {
16412 c := &SchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16413 c.customerId = customerId
16414 c.schemaKey = schemaKey
16415 c.schema = schema
16416 return c
16417 }
16418
16419
16420
16421
16422 func (c *SchemasPatchCall) Fields(s ...googleapi.Field) *SchemasPatchCall {
16423 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16424 return c
16425 }
16426
16427
16428 func (c *SchemasPatchCall) Context(ctx context.Context) *SchemasPatchCall {
16429 c.ctx_ = ctx
16430 return c
16431 }
16432
16433
16434
16435 func (c *SchemasPatchCall) Header() http.Header {
16436 if c.header_ == nil {
16437 c.header_ = make(http.Header)
16438 }
16439 return c.header_
16440 }
16441
16442 func (c *SchemasPatchCall) doRequest(alt string) (*http.Response, error) {
16443 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16444 var body io.Reader = nil
16445 body, err := googleapi.WithoutDataWrapper.JSONReader(c.schema)
16446 if err != nil {
16447 return nil, err
16448 }
16449 c.urlParams_.Set("alt", alt)
16450 c.urlParams_.Set("prettyPrint", "false")
16451 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}")
16452 urls += "?" + c.urlParams_.Encode()
16453 req, err := http.NewRequest("PATCH", urls, body)
16454 if err != nil {
16455 return nil, err
16456 }
16457 req.Header = reqHeaders
16458 googleapi.Expand(req.URL, map[string]string{
16459 "customerId": c.customerId,
16460 "schemaKey": c.schemaKey,
16461 })
16462 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16463 }
16464
16465
16466
16467
16468
16469
16470 func (c *SchemasPatchCall) Do(opts ...googleapi.CallOption) (*Schema, error) {
16471 gensupport.SetOptions(c.urlParams_, opts...)
16472 res, err := c.doRequest("json")
16473 if res != nil && res.StatusCode == http.StatusNotModified {
16474 if res.Body != nil {
16475 res.Body.Close()
16476 }
16477 return nil, gensupport.WrapError(&googleapi.Error{
16478 Code: res.StatusCode,
16479 Header: res.Header,
16480 })
16481 }
16482 if err != nil {
16483 return nil, err
16484 }
16485 defer googleapi.CloseBody(res)
16486 if err := googleapi.CheckResponse(res); err != nil {
16487 return nil, gensupport.WrapError(err)
16488 }
16489 ret := &Schema{
16490 ServerResponse: googleapi.ServerResponse{
16491 Header: res.Header,
16492 HTTPStatusCode: res.StatusCode,
16493 },
16494 }
16495 target := &ret
16496 if err := gensupport.DecodeResponse(target, res); err != nil {
16497 return nil, err
16498 }
16499 return ret, nil
16500 }
16501
16502 type SchemasUpdateCall struct {
16503 s *Service
16504 customerId string
16505 schemaKey string
16506 schema *Schema
16507 urlParams_ gensupport.URLParams
16508 ctx_ context.Context
16509 header_ http.Header
16510 }
16511
16512
16513
16514
16515
16516 func (r *SchemasService) Update(customerId string, schemaKey string, schema *Schema) *SchemasUpdateCall {
16517 c := &SchemasUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16518 c.customerId = customerId
16519 c.schemaKey = schemaKey
16520 c.schema = schema
16521 return c
16522 }
16523
16524
16525
16526
16527 func (c *SchemasUpdateCall) Fields(s ...googleapi.Field) *SchemasUpdateCall {
16528 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16529 return c
16530 }
16531
16532
16533 func (c *SchemasUpdateCall) Context(ctx context.Context) *SchemasUpdateCall {
16534 c.ctx_ = ctx
16535 return c
16536 }
16537
16538
16539
16540 func (c *SchemasUpdateCall) Header() http.Header {
16541 if c.header_ == nil {
16542 c.header_ = make(http.Header)
16543 }
16544 return c.header_
16545 }
16546
16547 func (c *SchemasUpdateCall) doRequest(alt string) (*http.Response, error) {
16548 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16549 var body io.Reader = nil
16550 body, err := googleapi.WithoutDataWrapper.JSONReader(c.schema)
16551 if err != nil {
16552 return nil, err
16553 }
16554 c.urlParams_.Set("alt", alt)
16555 c.urlParams_.Set("prettyPrint", "false")
16556 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}")
16557 urls += "?" + c.urlParams_.Encode()
16558 req, err := http.NewRequest("PUT", urls, body)
16559 if err != nil {
16560 return nil, err
16561 }
16562 req.Header = reqHeaders
16563 googleapi.Expand(req.URL, map[string]string{
16564 "customerId": c.customerId,
16565 "schemaKey": c.schemaKey,
16566 })
16567 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16568 }
16569
16570
16571
16572
16573
16574
16575 func (c *SchemasUpdateCall) Do(opts ...googleapi.CallOption) (*Schema, error) {
16576 gensupport.SetOptions(c.urlParams_, opts...)
16577 res, err := c.doRequest("json")
16578 if res != nil && res.StatusCode == http.StatusNotModified {
16579 if res.Body != nil {
16580 res.Body.Close()
16581 }
16582 return nil, gensupport.WrapError(&googleapi.Error{
16583 Code: res.StatusCode,
16584 Header: res.Header,
16585 })
16586 }
16587 if err != nil {
16588 return nil, err
16589 }
16590 defer googleapi.CloseBody(res)
16591 if err := googleapi.CheckResponse(res); err != nil {
16592 return nil, gensupport.WrapError(err)
16593 }
16594 ret := &Schema{
16595 ServerResponse: googleapi.ServerResponse{
16596 Header: res.Header,
16597 HTTPStatusCode: res.StatusCode,
16598 },
16599 }
16600 target := &ret
16601 if err := gensupport.DecodeResponse(target, res); err != nil {
16602 return nil, err
16603 }
16604 return ret, nil
16605 }
16606
16607 type TokensDeleteCall struct {
16608 s *Service
16609 userKey string
16610 clientId string
16611 urlParams_ gensupport.URLParams
16612 ctx_ context.Context
16613 header_ http.Header
16614 }
16615
16616
16617
16618
16619
16620
16621 func (r *TokensService) Delete(userKey string, clientId string) *TokensDeleteCall {
16622 c := &TokensDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16623 c.userKey = userKey
16624 c.clientId = clientId
16625 return c
16626 }
16627
16628
16629
16630
16631 func (c *TokensDeleteCall) Fields(s ...googleapi.Field) *TokensDeleteCall {
16632 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16633 return c
16634 }
16635
16636
16637 func (c *TokensDeleteCall) Context(ctx context.Context) *TokensDeleteCall {
16638 c.ctx_ = ctx
16639 return c
16640 }
16641
16642
16643
16644 func (c *TokensDeleteCall) Header() http.Header {
16645 if c.header_ == nil {
16646 c.header_ = make(http.Header)
16647 }
16648 return c.header_
16649 }
16650
16651 func (c *TokensDeleteCall) doRequest(alt string) (*http.Response, error) {
16652 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16653 var body io.Reader = nil
16654 c.urlParams_.Set("alt", alt)
16655 c.urlParams_.Set("prettyPrint", "false")
16656 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/tokens/{clientId}")
16657 urls += "?" + c.urlParams_.Encode()
16658 req, err := http.NewRequest("DELETE", urls, body)
16659 if err != nil {
16660 return nil, err
16661 }
16662 req.Header = reqHeaders
16663 googleapi.Expand(req.URL, map[string]string{
16664 "userKey": c.userKey,
16665 "clientId": c.clientId,
16666 })
16667 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16668 }
16669
16670
16671 func (c *TokensDeleteCall) Do(opts ...googleapi.CallOption) error {
16672 gensupport.SetOptions(c.urlParams_, opts...)
16673 res, err := c.doRequest("json")
16674 if err != nil {
16675 return err
16676 }
16677 defer googleapi.CloseBody(res)
16678 if err := googleapi.CheckResponse(res); err != nil {
16679 return gensupport.WrapError(err)
16680 }
16681 return nil
16682 }
16683
16684 type TokensGetCall struct {
16685 s *Service
16686 userKey string
16687 clientId string
16688 urlParams_ gensupport.URLParams
16689 ifNoneMatch_ string
16690 ctx_ context.Context
16691 header_ http.Header
16692 }
16693
16694
16695
16696
16697
16698
16699 func (r *TokensService) Get(userKey string, clientId string) *TokensGetCall {
16700 c := &TokensGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16701 c.userKey = userKey
16702 c.clientId = clientId
16703 return c
16704 }
16705
16706
16707
16708
16709 func (c *TokensGetCall) Fields(s ...googleapi.Field) *TokensGetCall {
16710 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16711 return c
16712 }
16713
16714
16715
16716
16717 func (c *TokensGetCall) IfNoneMatch(entityTag string) *TokensGetCall {
16718 c.ifNoneMatch_ = entityTag
16719 return c
16720 }
16721
16722
16723 func (c *TokensGetCall) Context(ctx context.Context) *TokensGetCall {
16724 c.ctx_ = ctx
16725 return c
16726 }
16727
16728
16729
16730 func (c *TokensGetCall) Header() http.Header {
16731 if c.header_ == nil {
16732 c.header_ = make(http.Header)
16733 }
16734 return c.header_
16735 }
16736
16737 func (c *TokensGetCall) doRequest(alt string) (*http.Response, error) {
16738 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16739 if c.ifNoneMatch_ != "" {
16740 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16741 }
16742 var body io.Reader = nil
16743 c.urlParams_.Set("alt", alt)
16744 c.urlParams_.Set("prettyPrint", "false")
16745 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/tokens/{clientId}")
16746 urls += "?" + c.urlParams_.Encode()
16747 req, err := http.NewRequest("GET", urls, body)
16748 if err != nil {
16749 return nil, err
16750 }
16751 req.Header = reqHeaders
16752 googleapi.Expand(req.URL, map[string]string{
16753 "userKey": c.userKey,
16754 "clientId": c.clientId,
16755 })
16756 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16757 }
16758
16759
16760
16761
16762
16763
16764 func (c *TokensGetCall) Do(opts ...googleapi.CallOption) (*Token, error) {
16765 gensupport.SetOptions(c.urlParams_, opts...)
16766 res, err := c.doRequest("json")
16767 if res != nil && res.StatusCode == http.StatusNotModified {
16768 if res.Body != nil {
16769 res.Body.Close()
16770 }
16771 return nil, gensupport.WrapError(&googleapi.Error{
16772 Code: res.StatusCode,
16773 Header: res.Header,
16774 })
16775 }
16776 if err != nil {
16777 return nil, err
16778 }
16779 defer googleapi.CloseBody(res)
16780 if err := googleapi.CheckResponse(res); err != nil {
16781 return nil, gensupport.WrapError(err)
16782 }
16783 ret := &Token{
16784 ServerResponse: googleapi.ServerResponse{
16785 Header: res.Header,
16786 HTTPStatusCode: res.StatusCode,
16787 },
16788 }
16789 target := &ret
16790 if err := gensupport.DecodeResponse(target, res); err != nil {
16791 return nil, err
16792 }
16793 return ret, nil
16794 }
16795
16796 type TokensListCall struct {
16797 s *Service
16798 userKey string
16799 urlParams_ gensupport.URLParams
16800 ifNoneMatch_ string
16801 ctx_ context.Context
16802 header_ http.Header
16803 }
16804
16805
16806
16807
16808
16809
16810 func (r *TokensService) List(userKey string) *TokensListCall {
16811 c := &TokensListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16812 c.userKey = userKey
16813 return c
16814 }
16815
16816
16817
16818
16819 func (c *TokensListCall) Fields(s ...googleapi.Field) *TokensListCall {
16820 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16821 return c
16822 }
16823
16824
16825
16826
16827 func (c *TokensListCall) IfNoneMatch(entityTag string) *TokensListCall {
16828 c.ifNoneMatch_ = entityTag
16829 return c
16830 }
16831
16832
16833 func (c *TokensListCall) Context(ctx context.Context) *TokensListCall {
16834 c.ctx_ = ctx
16835 return c
16836 }
16837
16838
16839
16840 func (c *TokensListCall) Header() http.Header {
16841 if c.header_ == nil {
16842 c.header_ = make(http.Header)
16843 }
16844 return c.header_
16845 }
16846
16847 func (c *TokensListCall) doRequest(alt string) (*http.Response, error) {
16848 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16849 if c.ifNoneMatch_ != "" {
16850 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16851 }
16852 var body io.Reader = nil
16853 c.urlParams_.Set("alt", alt)
16854 c.urlParams_.Set("prettyPrint", "false")
16855 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/tokens")
16856 urls += "?" + c.urlParams_.Encode()
16857 req, err := http.NewRequest("GET", urls, body)
16858 if err != nil {
16859 return nil, err
16860 }
16861 req.Header = reqHeaders
16862 googleapi.Expand(req.URL, map[string]string{
16863 "userKey": c.userKey,
16864 })
16865 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16866 }
16867
16868
16869
16870
16871
16872
16873 func (c *TokensListCall) Do(opts ...googleapi.CallOption) (*Tokens, error) {
16874 gensupport.SetOptions(c.urlParams_, opts...)
16875 res, err := c.doRequest("json")
16876 if res != nil && res.StatusCode == http.StatusNotModified {
16877 if res.Body != nil {
16878 res.Body.Close()
16879 }
16880 return nil, gensupport.WrapError(&googleapi.Error{
16881 Code: res.StatusCode,
16882 Header: res.Header,
16883 })
16884 }
16885 if err != nil {
16886 return nil, err
16887 }
16888 defer googleapi.CloseBody(res)
16889 if err := googleapi.CheckResponse(res); err != nil {
16890 return nil, gensupport.WrapError(err)
16891 }
16892 ret := &Tokens{
16893 ServerResponse: googleapi.ServerResponse{
16894 Header: res.Header,
16895 HTTPStatusCode: res.StatusCode,
16896 },
16897 }
16898 target := &ret
16899 if err := gensupport.DecodeResponse(target, res); err != nil {
16900 return nil, err
16901 }
16902 return ret, nil
16903 }
16904
16905 type TwoStepVerificationTurnOffCall struct {
16906 s *Service
16907 userKey string
16908 urlParams_ gensupport.URLParams
16909 ctx_ context.Context
16910 header_ http.Header
16911 }
16912
16913
16914
16915
16916
16917 func (r *TwoStepVerificationService) TurnOff(userKey string) *TwoStepVerificationTurnOffCall {
16918 c := &TwoStepVerificationTurnOffCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16919 c.userKey = userKey
16920 return c
16921 }
16922
16923
16924
16925
16926 func (c *TwoStepVerificationTurnOffCall) Fields(s ...googleapi.Field) *TwoStepVerificationTurnOffCall {
16927 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16928 return c
16929 }
16930
16931
16932 func (c *TwoStepVerificationTurnOffCall) Context(ctx context.Context) *TwoStepVerificationTurnOffCall {
16933 c.ctx_ = ctx
16934 return c
16935 }
16936
16937
16938
16939 func (c *TwoStepVerificationTurnOffCall) Header() http.Header {
16940 if c.header_ == nil {
16941 c.header_ = make(http.Header)
16942 }
16943 return c.header_
16944 }
16945
16946 func (c *TwoStepVerificationTurnOffCall) doRequest(alt string) (*http.Response, error) {
16947 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16948 var body io.Reader = nil
16949 c.urlParams_.Set("alt", alt)
16950 c.urlParams_.Set("prettyPrint", "false")
16951 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/twoStepVerification/turnOff")
16952 urls += "?" + c.urlParams_.Encode()
16953 req, err := http.NewRequest("POST", urls, body)
16954 if err != nil {
16955 return nil, err
16956 }
16957 req.Header = reqHeaders
16958 googleapi.Expand(req.URL, map[string]string{
16959 "userKey": c.userKey,
16960 })
16961 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16962 }
16963
16964
16965 func (c *TwoStepVerificationTurnOffCall) Do(opts ...googleapi.CallOption) error {
16966 gensupport.SetOptions(c.urlParams_, opts...)
16967 res, err := c.doRequest("json")
16968 if err != nil {
16969 return err
16970 }
16971 defer googleapi.CloseBody(res)
16972 if err := googleapi.CheckResponse(res); err != nil {
16973 return gensupport.WrapError(err)
16974 }
16975 return nil
16976 }
16977
16978 type UsersDeleteCall struct {
16979 s *Service
16980 userKey string
16981 urlParams_ gensupport.URLParams
16982 ctx_ context.Context
16983 header_ http.Header
16984 }
16985
16986
16987
16988
16989
16990 func (r *UsersService) Delete(userKey string) *UsersDeleteCall {
16991 c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16992 c.userKey = userKey
16993 return c
16994 }
16995
16996
16997
16998
16999 func (c *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall {
17000 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17001 return c
17002 }
17003
17004
17005 func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
17006 c.ctx_ = ctx
17007 return c
17008 }
17009
17010
17011
17012 func (c *UsersDeleteCall) Header() http.Header {
17013 if c.header_ == nil {
17014 c.header_ = make(http.Header)
17015 }
17016 return c.header_
17017 }
17018
17019 func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
17020 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17021 var body io.Reader = nil
17022 c.urlParams_.Set("alt", alt)
17023 c.urlParams_.Set("prettyPrint", "false")
17024 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}")
17025 urls += "?" + c.urlParams_.Encode()
17026 req, err := http.NewRequest("DELETE", urls, body)
17027 if err != nil {
17028 return nil, err
17029 }
17030 req.Header = reqHeaders
17031 googleapi.Expand(req.URL, map[string]string{
17032 "userKey": c.userKey,
17033 })
17034 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17035 }
17036
17037
17038 func (c *UsersDeleteCall) Do(opts ...googleapi.CallOption) error {
17039 gensupport.SetOptions(c.urlParams_, opts...)
17040 res, err := c.doRequest("json")
17041 if err != nil {
17042 return err
17043 }
17044 defer googleapi.CloseBody(res)
17045 if err := googleapi.CheckResponse(res); err != nil {
17046 return gensupport.WrapError(err)
17047 }
17048 return nil
17049 }
17050
17051 type UsersGetCall struct {
17052 s *Service
17053 userKey string
17054 urlParams_ gensupport.URLParams
17055 ifNoneMatch_ string
17056 ctx_ context.Context
17057 header_ http.Header
17058 }
17059
17060
17061
17062
17063
17064 func (r *UsersService) Get(userKey string) *UsersGetCall {
17065 c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17066 c.userKey = userKey
17067 return c
17068 }
17069
17070
17071
17072
17073 func (c *UsersGetCall) CustomFieldMask(customFieldMask string) *UsersGetCall {
17074 c.urlParams_.Set("customFieldMask", customFieldMask)
17075 return c
17076 }
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089 func (c *UsersGetCall) Projection(projection string) *UsersGetCall {
17090 c.urlParams_.Set("projection", projection)
17091 return c
17092 }
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108 func (c *UsersGetCall) ViewType(viewType string) *UsersGetCall {
17109 c.urlParams_.Set("viewType", viewType)
17110 return c
17111 }
17112
17113
17114
17115
17116 func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall {
17117 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17118 return c
17119 }
17120
17121
17122
17123
17124 func (c *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall {
17125 c.ifNoneMatch_ = entityTag
17126 return c
17127 }
17128
17129
17130 func (c *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
17131 c.ctx_ = ctx
17132 return c
17133 }
17134
17135
17136
17137 func (c *UsersGetCall) Header() http.Header {
17138 if c.header_ == nil {
17139 c.header_ = make(http.Header)
17140 }
17141 return c.header_
17142 }
17143
17144 func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
17145 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17146 if c.ifNoneMatch_ != "" {
17147 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17148 }
17149 var body io.Reader = nil
17150 c.urlParams_.Set("alt", alt)
17151 c.urlParams_.Set("prettyPrint", "false")
17152 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}")
17153 urls += "?" + c.urlParams_.Encode()
17154 req, err := http.NewRequest("GET", urls, body)
17155 if err != nil {
17156 return nil, err
17157 }
17158 req.Header = reqHeaders
17159 googleapi.Expand(req.URL, map[string]string{
17160 "userKey": c.userKey,
17161 })
17162 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17163 }
17164
17165
17166
17167
17168
17169
17170 func (c *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) {
17171 gensupport.SetOptions(c.urlParams_, opts...)
17172 res, err := c.doRequest("json")
17173 if res != nil && res.StatusCode == http.StatusNotModified {
17174 if res.Body != nil {
17175 res.Body.Close()
17176 }
17177 return nil, gensupport.WrapError(&googleapi.Error{
17178 Code: res.StatusCode,
17179 Header: res.Header,
17180 })
17181 }
17182 if err != nil {
17183 return nil, err
17184 }
17185 defer googleapi.CloseBody(res)
17186 if err := googleapi.CheckResponse(res); err != nil {
17187 return nil, gensupport.WrapError(err)
17188 }
17189 ret := &User{
17190 ServerResponse: googleapi.ServerResponse{
17191 Header: res.Header,
17192 HTTPStatusCode: res.StatusCode,
17193 },
17194 }
17195 target := &ret
17196 if err := gensupport.DecodeResponse(target, res); err != nil {
17197 return nil, err
17198 }
17199 return ret, nil
17200 }
17201
17202 type UsersInsertCall struct {
17203 s *Service
17204 user *User
17205 urlParams_ gensupport.URLParams
17206 ctx_ context.Context
17207 header_ http.Header
17208 }
17209
17210
17211
17212
17213
17214
17215 func (r *UsersService) Insert(user *User) *UsersInsertCall {
17216 c := &UsersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17217 c.user = user
17218 return c
17219 }
17220
17221
17222
17223
17224 func (c *UsersInsertCall) ResolveConflictAccount(resolveConflictAccount bool) *UsersInsertCall {
17225 c.urlParams_.Set("resolveConflictAccount", fmt.Sprint(resolveConflictAccount))
17226 return c
17227 }
17228
17229
17230
17231
17232 func (c *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall {
17233 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17234 return c
17235 }
17236
17237
17238 func (c *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall {
17239 c.ctx_ = ctx
17240 return c
17241 }
17242
17243
17244
17245 func (c *UsersInsertCall) Header() http.Header {
17246 if c.header_ == nil {
17247 c.header_ = make(http.Header)
17248 }
17249 return c.header_
17250 }
17251
17252 func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) {
17253 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17254 var body io.Reader = nil
17255 body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
17256 if err != nil {
17257 return nil, err
17258 }
17259 c.urlParams_.Set("alt", alt)
17260 c.urlParams_.Set("prettyPrint", "false")
17261 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users")
17262 urls += "?" + c.urlParams_.Encode()
17263 req, err := http.NewRequest("POST", urls, body)
17264 if err != nil {
17265 return nil, err
17266 }
17267 req.Header = reqHeaders
17268 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17269 }
17270
17271
17272
17273
17274
17275
17276 func (c *UsersInsertCall) Do(opts ...googleapi.CallOption) (*User, error) {
17277 gensupport.SetOptions(c.urlParams_, opts...)
17278 res, err := c.doRequest("json")
17279 if res != nil && res.StatusCode == http.StatusNotModified {
17280 if res.Body != nil {
17281 res.Body.Close()
17282 }
17283 return nil, gensupport.WrapError(&googleapi.Error{
17284 Code: res.StatusCode,
17285 Header: res.Header,
17286 })
17287 }
17288 if err != nil {
17289 return nil, err
17290 }
17291 defer googleapi.CloseBody(res)
17292 if err := googleapi.CheckResponse(res); err != nil {
17293 return nil, gensupport.WrapError(err)
17294 }
17295 ret := &User{
17296 ServerResponse: googleapi.ServerResponse{
17297 Header: res.Header,
17298 HTTPStatusCode: res.StatusCode,
17299 },
17300 }
17301 target := &ret
17302 if err := gensupport.DecodeResponse(target, res); err != nil {
17303 return nil, err
17304 }
17305 return ret, nil
17306 }
17307
17308 type UsersListCall struct {
17309 s *Service
17310 urlParams_ gensupport.URLParams
17311 ifNoneMatch_ string
17312 ctx_ context.Context
17313 header_ http.Header
17314 }
17315
17316
17317
17318 func (r *UsersService) List() *UsersListCall {
17319 c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17320 return c
17321 }
17322
17323
17324
17325
17326 func (c *UsersListCall) CustomFieldMask(customFieldMask string) *UsersListCall {
17327 c.urlParams_.Set("customFieldMask", customFieldMask)
17328 return c
17329 }
17330
17331
17332
17333
17334
17335
17336
17337
17338 func (c *UsersListCall) Customer(customer string) *UsersListCall {
17339 c.urlParams_.Set("customer", customer)
17340 return c
17341 }
17342
17343
17344
17345
17346
17347 func (c *UsersListCall) Domain(domain string) *UsersListCall {
17348 c.urlParams_.Set("domain", domain)
17349 return c
17350 }
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362 func (c *UsersListCall) Event(event string) *UsersListCall {
17363 c.urlParams_.Set("event", event)
17364 return c
17365 }
17366
17367
17368
17369 func (c *UsersListCall) MaxResults(maxResults int64) *UsersListCall {
17370 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17371 return c
17372 }
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382 func (c *UsersListCall) OrderBy(orderBy string) *UsersListCall {
17383 c.urlParams_.Set("orderBy", orderBy)
17384 return c
17385 }
17386
17387
17388
17389 func (c *UsersListCall) PageToken(pageToken string) *UsersListCall {
17390 c.urlParams_.Set("pageToken", pageToken)
17391 return c
17392 }
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405 func (c *UsersListCall) Projection(projection string) *UsersListCall {
17406 c.urlParams_.Set("projection", projection)
17407 return c
17408 }
17409
17410
17411
17412
17413 func (c *UsersListCall) Query(query string) *UsersListCall {
17414 c.urlParams_.Set("query", query)
17415 return c
17416 }
17417
17418
17419
17420 func (c *UsersListCall) ShowDeleted(showDeleted string) *UsersListCall {
17421 c.urlParams_.Set("showDeleted", showDeleted)
17422 return c
17423 }
17424
17425
17426
17427
17428
17429
17430
17431
17432 func (c *UsersListCall) SortOrder(sortOrder string) *UsersListCall {
17433 c.urlParams_.Set("sortOrder", sortOrder)
17434 return c
17435 }
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451 func (c *UsersListCall) ViewType(viewType string) *UsersListCall {
17452 c.urlParams_.Set("viewType", viewType)
17453 return c
17454 }
17455
17456
17457
17458
17459 func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall {
17460 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17461 return c
17462 }
17463
17464
17465
17466
17467 func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall {
17468 c.ifNoneMatch_ = entityTag
17469 return c
17470 }
17471
17472
17473 func (c *UsersListCall) Context(ctx context.Context) *UsersListCall {
17474 c.ctx_ = ctx
17475 return c
17476 }
17477
17478
17479
17480 func (c *UsersListCall) Header() http.Header {
17481 if c.header_ == nil {
17482 c.header_ = make(http.Header)
17483 }
17484 return c.header_
17485 }
17486
17487 func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
17488 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17489 if c.ifNoneMatch_ != "" {
17490 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17491 }
17492 var body io.Reader = nil
17493 c.urlParams_.Set("alt", alt)
17494 c.urlParams_.Set("prettyPrint", "false")
17495 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users")
17496 urls += "?" + c.urlParams_.Encode()
17497 req, err := http.NewRequest("GET", urls, body)
17498 if err != nil {
17499 return nil, err
17500 }
17501 req.Header = reqHeaders
17502 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17503 }
17504
17505
17506
17507
17508
17509
17510 func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*Users, error) {
17511 gensupport.SetOptions(c.urlParams_, opts...)
17512 res, err := c.doRequest("json")
17513 if res != nil && res.StatusCode == http.StatusNotModified {
17514 if res.Body != nil {
17515 res.Body.Close()
17516 }
17517 return nil, gensupport.WrapError(&googleapi.Error{
17518 Code: res.StatusCode,
17519 Header: res.Header,
17520 })
17521 }
17522 if err != nil {
17523 return nil, err
17524 }
17525 defer googleapi.CloseBody(res)
17526 if err := googleapi.CheckResponse(res); err != nil {
17527 return nil, gensupport.WrapError(err)
17528 }
17529 ret := &Users{
17530 ServerResponse: googleapi.ServerResponse{
17531 Header: res.Header,
17532 HTTPStatusCode: res.StatusCode,
17533 },
17534 }
17535 target := &ret
17536 if err := gensupport.DecodeResponse(target, res); err != nil {
17537 return nil, err
17538 }
17539 return ret, nil
17540 }
17541
17542
17543
17544
17545 func (c *UsersListCall) Pages(ctx context.Context, f func(*Users) error) error {
17546 c.ctx_ = ctx
17547 defer c.PageToken(c.urlParams_.Get("pageToken"))
17548 for {
17549 x, err := c.Do()
17550 if err != nil {
17551 return err
17552 }
17553 if err := f(x); err != nil {
17554 return err
17555 }
17556 if x.NextPageToken == "" {
17557 return nil
17558 }
17559 c.PageToken(x.NextPageToken)
17560 }
17561 }
17562
17563 type UsersMakeAdminCall struct {
17564 s *Service
17565 userKey string
17566 usermakeadmin *UserMakeAdmin
17567 urlParams_ gensupport.URLParams
17568 ctx_ context.Context
17569 header_ http.Header
17570 }
17571
17572
17573
17574
17575
17576 func (r *UsersService) MakeAdmin(userKey string, usermakeadmin *UserMakeAdmin) *UsersMakeAdminCall {
17577 c := &UsersMakeAdminCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17578 c.userKey = userKey
17579 c.usermakeadmin = usermakeadmin
17580 return c
17581 }
17582
17583
17584
17585
17586 func (c *UsersMakeAdminCall) Fields(s ...googleapi.Field) *UsersMakeAdminCall {
17587 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17588 return c
17589 }
17590
17591
17592 func (c *UsersMakeAdminCall) Context(ctx context.Context) *UsersMakeAdminCall {
17593 c.ctx_ = ctx
17594 return c
17595 }
17596
17597
17598
17599 func (c *UsersMakeAdminCall) Header() http.Header {
17600 if c.header_ == nil {
17601 c.header_ = make(http.Header)
17602 }
17603 return c.header_
17604 }
17605
17606 func (c *UsersMakeAdminCall) doRequest(alt string) (*http.Response, error) {
17607 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17608 var body io.Reader = nil
17609 body, err := googleapi.WithoutDataWrapper.JSONReader(c.usermakeadmin)
17610 if err != nil {
17611 return nil, err
17612 }
17613 c.urlParams_.Set("alt", alt)
17614 c.urlParams_.Set("prettyPrint", "false")
17615 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/makeAdmin")
17616 urls += "?" + c.urlParams_.Encode()
17617 req, err := http.NewRequest("POST", urls, body)
17618 if err != nil {
17619 return nil, err
17620 }
17621 req.Header = reqHeaders
17622 googleapi.Expand(req.URL, map[string]string{
17623 "userKey": c.userKey,
17624 })
17625 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17626 }
17627
17628
17629 func (c *UsersMakeAdminCall) Do(opts ...googleapi.CallOption) error {
17630 gensupport.SetOptions(c.urlParams_, opts...)
17631 res, err := c.doRequest("json")
17632 if err != nil {
17633 return err
17634 }
17635 defer googleapi.CloseBody(res)
17636 if err := googleapi.CheckResponse(res); err != nil {
17637 return gensupport.WrapError(err)
17638 }
17639 return nil
17640 }
17641
17642 type UsersPatchCall struct {
17643 s *Service
17644 userKey string
17645 user *User
17646 urlParams_ gensupport.URLParams
17647 ctx_ context.Context
17648 header_ http.Header
17649 }
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662 func (r *UsersService) Patch(userKey string, user *User) *UsersPatchCall {
17663 c := &UsersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17664 c.userKey = userKey
17665 c.user = user
17666 return c
17667 }
17668
17669
17670
17671
17672 func (c *UsersPatchCall) Fields(s ...googleapi.Field) *UsersPatchCall {
17673 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17674 return c
17675 }
17676
17677
17678 func (c *UsersPatchCall) Context(ctx context.Context) *UsersPatchCall {
17679 c.ctx_ = ctx
17680 return c
17681 }
17682
17683
17684
17685 func (c *UsersPatchCall) Header() http.Header {
17686 if c.header_ == nil {
17687 c.header_ = make(http.Header)
17688 }
17689 return c.header_
17690 }
17691
17692 func (c *UsersPatchCall) doRequest(alt string) (*http.Response, error) {
17693 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17694 var body io.Reader = nil
17695 body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
17696 if err != nil {
17697 return nil, err
17698 }
17699 c.urlParams_.Set("alt", alt)
17700 c.urlParams_.Set("prettyPrint", "false")
17701 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}")
17702 urls += "?" + c.urlParams_.Encode()
17703 req, err := http.NewRequest("PATCH", urls, body)
17704 if err != nil {
17705 return nil, err
17706 }
17707 req.Header = reqHeaders
17708 googleapi.Expand(req.URL, map[string]string{
17709 "userKey": c.userKey,
17710 })
17711 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17712 }
17713
17714
17715
17716
17717
17718
17719 func (c *UsersPatchCall) Do(opts ...googleapi.CallOption) (*User, error) {
17720 gensupport.SetOptions(c.urlParams_, opts...)
17721 res, err := c.doRequest("json")
17722 if res != nil && res.StatusCode == http.StatusNotModified {
17723 if res.Body != nil {
17724 res.Body.Close()
17725 }
17726 return nil, gensupport.WrapError(&googleapi.Error{
17727 Code: res.StatusCode,
17728 Header: res.Header,
17729 })
17730 }
17731 if err != nil {
17732 return nil, err
17733 }
17734 defer googleapi.CloseBody(res)
17735 if err := googleapi.CheckResponse(res); err != nil {
17736 return nil, gensupport.WrapError(err)
17737 }
17738 ret := &User{
17739 ServerResponse: googleapi.ServerResponse{
17740 Header: res.Header,
17741 HTTPStatusCode: res.StatusCode,
17742 },
17743 }
17744 target := &ret
17745 if err := gensupport.DecodeResponse(target, res); err != nil {
17746 return nil, err
17747 }
17748 return ret, nil
17749 }
17750
17751 type UsersSignOutCall struct {
17752 s *Service
17753 userKey string
17754 urlParams_ gensupport.URLParams
17755 ctx_ context.Context
17756 header_ http.Header
17757 }
17758
17759
17760
17761
17762
17763
17764 func (r *UsersService) SignOut(userKey string) *UsersSignOutCall {
17765 c := &UsersSignOutCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17766 c.userKey = userKey
17767 return c
17768 }
17769
17770
17771
17772
17773 func (c *UsersSignOutCall) Fields(s ...googleapi.Field) *UsersSignOutCall {
17774 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17775 return c
17776 }
17777
17778
17779 func (c *UsersSignOutCall) Context(ctx context.Context) *UsersSignOutCall {
17780 c.ctx_ = ctx
17781 return c
17782 }
17783
17784
17785
17786 func (c *UsersSignOutCall) Header() http.Header {
17787 if c.header_ == nil {
17788 c.header_ = make(http.Header)
17789 }
17790 return c.header_
17791 }
17792
17793 func (c *UsersSignOutCall) doRequest(alt string) (*http.Response, error) {
17794 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17795 var body io.Reader = nil
17796 c.urlParams_.Set("alt", alt)
17797 c.urlParams_.Set("prettyPrint", "false")
17798 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/signOut")
17799 urls += "?" + c.urlParams_.Encode()
17800 req, err := http.NewRequest("POST", urls, body)
17801 if err != nil {
17802 return nil, err
17803 }
17804 req.Header = reqHeaders
17805 googleapi.Expand(req.URL, map[string]string{
17806 "userKey": c.userKey,
17807 })
17808 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17809 }
17810
17811
17812 func (c *UsersSignOutCall) Do(opts ...googleapi.CallOption) error {
17813 gensupport.SetOptions(c.urlParams_, opts...)
17814 res, err := c.doRequest("json")
17815 if err != nil {
17816 return err
17817 }
17818 defer googleapi.CloseBody(res)
17819 if err := googleapi.CheckResponse(res); err != nil {
17820 return gensupport.WrapError(err)
17821 }
17822 return nil
17823 }
17824
17825 type UsersUndeleteCall struct {
17826 s *Service
17827 userKey string
17828 userundelete *UserUndelete
17829 urlParams_ gensupport.URLParams
17830 ctx_ context.Context
17831 header_ http.Header
17832 }
17833
17834
17835
17836
17837 func (r *UsersService) Undelete(userKey string, userundelete *UserUndelete) *UsersUndeleteCall {
17838 c := &UsersUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17839 c.userKey = userKey
17840 c.userundelete = userundelete
17841 return c
17842 }
17843
17844
17845
17846
17847 func (c *UsersUndeleteCall) Fields(s ...googleapi.Field) *UsersUndeleteCall {
17848 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17849 return c
17850 }
17851
17852
17853 func (c *UsersUndeleteCall) Context(ctx context.Context) *UsersUndeleteCall {
17854 c.ctx_ = ctx
17855 return c
17856 }
17857
17858
17859
17860 func (c *UsersUndeleteCall) Header() http.Header {
17861 if c.header_ == nil {
17862 c.header_ = make(http.Header)
17863 }
17864 return c.header_
17865 }
17866
17867 func (c *UsersUndeleteCall) doRequest(alt string) (*http.Response, error) {
17868 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17869 var body io.Reader = nil
17870 body, err := googleapi.WithoutDataWrapper.JSONReader(c.userundelete)
17871 if err != nil {
17872 return nil, err
17873 }
17874 c.urlParams_.Set("alt", alt)
17875 c.urlParams_.Set("prettyPrint", "false")
17876 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/undelete")
17877 urls += "?" + c.urlParams_.Encode()
17878 req, err := http.NewRequest("POST", urls, body)
17879 if err != nil {
17880 return nil, err
17881 }
17882 req.Header = reqHeaders
17883 googleapi.Expand(req.URL, map[string]string{
17884 "userKey": c.userKey,
17885 })
17886 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17887 }
17888
17889
17890 func (c *UsersUndeleteCall) Do(opts ...googleapi.CallOption) error {
17891 gensupport.SetOptions(c.urlParams_, opts...)
17892 res, err := c.doRequest("json")
17893 if err != nil {
17894 return err
17895 }
17896 defer googleapi.CloseBody(res)
17897 if err := googleapi.CheckResponse(res); err != nil {
17898 return gensupport.WrapError(err)
17899 }
17900 return nil
17901 }
17902
17903 type UsersUpdateCall struct {
17904 s *Service
17905 userKey string
17906 user *User
17907 urlParams_ gensupport.URLParams
17908 ctx_ context.Context
17909 header_ http.Header
17910 }
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923 func (r *UsersService) Update(userKey string, user *User) *UsersUpdateCall {
17924 c := &UsersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17925 c.userKey = userKey
17926 c.user = user
17927 return c
17928 }
17929
17930
17931
17932
17933 func (c *UsersUpdateCall) Fields(s ...googleapi.Field) *UsersUpdateCall {
17934 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17935 return c
17936 }
17937
17938
17939 func (c *UsersUpdateCall) Context(ctx context.Context) *UsersUpdateCall {
17940 c.ctx_ = ctx
17941 return c
17942 }
17943
17944
17945
17946 func (c *UsersUpdateCall) Header() http.Header {
17947 if c.header_ == nil {
17948 c.header_ = make(http.Header)
17949 }
17950 return c.header_
17951 }
17952
17953 func (c *UsersUpdateCall) doRequest(alt string) (*http.Response, error) {
17954 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17955 var body io.Reader = nil
17956 body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
17957 if err != nil {
17958 return nil, err
17959 }
17960 c.urlParams_.Set("alt", alt)
17961 c.urlParams_.Set("prettyPrint", "false")
17962 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}")
17963 urls += "?" + c.urlParams_.Encode()
17964 req, err := http.NewRequest("PUT", urls, body)
17965 if err != nil {
17966 return nil, err
17967 }
17968 req.Header = reqHeaders
17969 googleapi.Expand(req.URL, map[string]string{
17970 "userKey": c.userKey,
17971 })
17972 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17973 }
17974
17975
17976
17977
17978
17979
17980 func (c *UsersUpdateCall) Do(opts ...googleapi.CallOption) (*User, error) {
17981 gensupport.SetOptions(c.urlParams_, opts...)
17982 res, err := c.doRequest("json")
17983 if res != nil && res.StatusCode == http.StatusNotModified {
17984 if res.Body != nil {
17985 res.Body.Close()
17986 }
17987 return nil, gensupport.WrapError(&googleapi.Error{
17988 Code: res.StatusCode,
17989 Header: res.Header,
17990 })
17991 }
17992 if err != nil {
17993 return nil, err
17994 }
17995 defer googleapi.CloseBody(res)
17996 if err := googleapi.CheckResponse(res); err != nil {
17997 return nil, gensupport.WrapError(err)
17998 }
17999 ret := &User{
18000 ServerResponse: googleapi.ServerResponse{
18001 Header: res.Header,
18002 HTTPStatusCode: res.StatusCode,
18003 },
18004 }
18005 target := &ret
18006 if err := gensupport.DecodeResponse(target, res); err != nil {
18007 return nil, err
18008 }
18009 return ret, nil
18010 }
18011
18012 type UsersWatchCall struct {
18013 s *Service
18014 channel *Channel
18015 urlParams_ gensupport.URLParams
18016 ctx_ context.Context
18017 header_ http.Header
18018 }
18019
18020
18021 func (r *UsersService) Watch(channel *Channel) *UsersWatchCall {
18022 c := &UsersWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18023 c.channel = channel
18024 return c
18025 }
18026
18027
18028
18029
18030 func (c *UsersWatchCall) CustomFieldMask(customFieldMask string) *UsersWatchCall {
18031 c.urlParams_.Set("customFieldMask", customFieldMask)
18032 return c
18033 }
18034
18035
18036
18037
18038 func (c *UsersWatchCall) Customer(customer string) *UsersWatchCall {
18039 c.urlParams_.Set("customer", customer)
18040 return c
18041 }
18042
18043
18044
18045
18046 func (c *UsersWatchCall) Domain(domain string) *UsersWatchCall {
18047 c.urlParams_.Set("domain", domain)
18048 return c
18049 }
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060 func (c *UsersWatchCall) Event(event string) *UsersWatchCall {
18061 c.urlParams_.Set("event", event)
18062 return c
18063 }
18064
18065
18066
18067 func (c *UsersWatchCall) MaxResults(maxResults int64) *UsersWatchCall {
18068 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18069 return c
18070 }
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080 func (c *UsersWatchCall) OrderBy(orderBy string) *UsersWatchCall {
18081 c.urlParams_.Set("orderBy", orderBy)
18082 return c
18083 }
18084
18085
18086
18087 func (c *UsersWatchCall) PageToken(pageToken string) *UsersWatchCall {
18088 c.urlParams_.Set("pageToken", pageToken)
18089 return c
18090 }
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103 func (c *UsersWatchCall) Projection(projection string) *UsersWatchCall {
18104 c.urlParams_.Set("projection", projection)
18105 return c
18106 }
18107
18108
18109
18110
18111 func (c *UsersWatchCall) Query(query string) *UsersWatchCall {
18112 c.urlParams_.Set("query", query)
18113 return c
18114 }
18115
18116
18117
18118 func (c *UsersWatchCall) ShowDeleted(showDeleted string) *UsersWatchCall {
18119 c.urlParams_.Set("showDeleted", showDeleted)
18120 return c
18121 }
18122
18123
18124
18125
18126
18127
18128
18129
18130 func (c *UsersWatchCall) SortOrder(sortOrder string) *UsersWatchCall {
18131 c.urlParams_.Set("sortOrder", sortOrder)
18132 return c
18133 }
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149 func (c *UsersWatchCall) ViewType(viewType string) *UsersWatchCall {
18150 c.urlParams_.Set("viewType", viewType)
18151 return c
18152 }
18153
18154
18155
18156
18157 func (c *UsersWatchCall) Fields(s ...googleapi.Field) *UsersWatchCall {
18158 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18159 return c
18160 }
18161
18162
18163 func (c *UsersWatchCall) Context(ctx context.Context) *UsersWatchCall {
18164 c.ctx_ = ctx
18165 return c
18166 }
18167
18168
18169
18170 func (c *UsersWatchCall) Header() http.Header {
18171 if c.header_ == nil {
18172 c.header_ = make(http.Header)
18173 }
18174 return c.header_
18175 }
18176
18177 func (c *UsersWatchCall) doRequest(alt string) (*http.Response, error) {
18178 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18179 var body io.Reader = nil
18180 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
18181 if err != nil {
18182 return nil, err
18183 }
18184 c.urlParams_.Set("alt", alt)
18185 c.urlParams_.Set("prettyPrint", "false")
18186 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/watch")
18187 urls += "?" + c.urlParams_.Encode()
18188 req, err := http.NewRequest("POST", urls, body)
18189 if err != nil {
18190 return nil, err
18191 }
18192 req.Header = reqHeaders
18193 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18194 }
18195
18196
18197
18198
18199
18200
18201 func (c *UsersWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
18202 gensupport.SetOptions(c.urlParams_, opts...)
18203 res, err := c.doRequest("json")
18204 if res != nil && res.StatusCode == http.StatusNotModified {
18205 if res.Body != nil {
18206 res.Body.Close()
18207 }
18208 return nil, gensupport.WrapError(&googleapi.Error{
18209 Code: res.StatusCode,
18210 Header: res.Header,
18211 })
18212 }
18213 if err != nil {
18214 return nil, err
18215 }
18216 defer googleapi.CloseBody(res)
18217 if err := googleapi.CheckResponse(res); err != nil {
18218 return nil, gensupport.WrapError(err)
18219 }
18220 ret := &Channel{
18221 ServerResponse: googleapi.ServerResponse{
18222 Header: res.Header,
18223 HTTPStatusCode: res.StatusCode,
18224 },
18225 }
18226 target := &ret
18227 if err := gensupport.DecodeResponse(target, res); err != nil {
18228 return nil, err
18229 }
18230 return ret, nil
18231 }
18232
18233 type UsersAliasesDeleteCall struct {
18234 s *Service
18235 userKey string
18236 alias string
18237 urlParams_ gensupport.URLParams
18238 ctx_ context.Context
18239 header_ http.Header
18240 }
18241
18242
18243
18244
18245
18246
18247 func (r *UsersAliasesService) Delete(userKey string, alias string) *UsersAliasesDeleteCall {
18248 c := &UsersAliasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18249 c.userKey = userKey
18250 c.alias = alias
18251 return c
18252 }
18253
18254
18255
18256
18257 func (c *UsersAliasesDeleteCall) Fields(s ...googleapi.Field) *UsersAliasesDeleteCall {
18258 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18259 return c
18260 }
18261
18262
18263 func (c *UsersAliasesDeleteCall) Context(ctx context.Context) *UsersAliasesDeleteCall {
18264 c.ctx_ = ctx
18265 return c
18266 }
18267
18268
18269
18270 func (c *UsersAliasesDeleteCall) Header() http.Header {
18271 if c.header_ == nil {
18272 c.header_ = make(http.Header)
18273 }
18274 return c.header_
18275 }
18276
18277 func (c *UsersAliasesDeleteCall) doRequest(alt string) (*http.Response, error) {
18278 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18279 var body io.Reader = nil
18280 c.urlParams_.Set("alt", alt)
18281 c.urlParams_.Set("prettyPrint", "false")
18282 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/aliases/{alias}")
18283 urls += "?" + c.urlParams_.Encode()
18284 req, err := http.NewRequest("DELETE", urls, body)
18285 if err != nil {
18286 return nil, err
18287 }
18288 req.Header = reqHeaders
18289 googleapi.Expand(req.URL, map[string]string{
18290 "userKey": c.userKey,
18291 "alias": c.alias,
18292 })
18293 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18294 }
18295
18296
18297 func (c *UsersAliasesDeleteCall) Do(opts ...googleapi.CallOption) error {
18298 gensupport.SetOptions(c.urlParams_, opts...)
18299 res, err := c.doRequest("json")
18300 if err != nil {
18301 return err
18302 }
18303 defer googleapi.CloseBody(res)
18304 if err := googleapi.CheckResponse(res); err != nil {
18305 return gensupport.WrapError(err)
18306 }
18307 return nil
18308 }
18309
18310 type UsersAliasesInsertCall struct {
18311 s *Service
18312 userKey string
18313 alias *Alias
18314 urlParams_ gensupport.URLParams
18315 ctx_ context.Context
18316 header_ http.Header
18317 }
18318
18319
18320
18321
18322
18323 func (r *UsersAliasesService) Insert(userKey string, alias *Alias) *UsersAliasesInsertCall {
18324 c := &UsersAliasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18325 c.userKey = userKey
18326 c.alias = alias
18327 return c
18328 }
18329
18330
18331
18332
18333 func (c *UsersAliasesInsertCall) Fields(s ...googleapi.Field) *UsersAliasesInsertCall {
18334 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18335 return c
18336 }
18337
18338
18339 func (c *UsersAliasesInsertCall) Context(ctx context.Context) *UsersAliasesInsertCall {
18340 c.ctx_ = ctx
18341 return c
18342 }
18343
18344
18345
18346 func (c *UsersAliasesInsertCall) Header() http.Header {
18347 if c.header_ == nil {
18348 c.header_ = make(http.Header)
18349 }
18350 return c.header_
18351 }
18352
18353 func (c *UsersAliasesInsertCall) doRequest(alt string) (*http.Response, error) {
18354 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18355 var body io.Reader = nil
18356 body, err := googleapi.WithoutDataWrapper.JSONReader(c.alias)
18357 if err != nil {
18358 return nil, err
18359 }
18360 c.urlParams_.Set("alt", alt)
18361 c.urlParams_.Set("prettyPrint", "false")
18362 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/aliases")
18363 urls += "?" + c.urlParams_.Encode()
18364 req, err := http.NewRequest("POST", urls, body)
18365 if err != nil {
18366 return nil, err
18367 }
18368 req.Header = reqHeaders
18369 googleapi.Expand(req.URL, map[string]string{
18370 "userKey": c.userKey,
18371 })
18372 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18373 }
18374
18375
18376
18377
18378
18379
18380 func (c *UsersAliasesInsertCall) Do(opts ...googleapi.CallOption) (*Alias, error) {
18381 gensupport.SetOptions(c.urlParams_, opts...)
18382 res, err := c.doRequest("json")
18383 if res != nil && res.StatusCode == http.StatusNotModified {
18384 if res.Body != nil {
18385 res.Body.Close()
18386 }
18387 return nil, gensupport.WrapError(&googleapi.Error{
18388 Code: res.StatusCode,
18389 Header: res.Header,
18390 })
18391 }
18392 if err != nil {
18393 return nil, err
18394 }
18395 defer googleapi.CloseBody(res)
18396 if err := googleapi.CheckResponse(res); err != nil {
18397 return nil, gensupport.WrapError(err)
18398 }
18399 ret := &Alias{
18400 ServerResponse: googleapi.ServerResponse{
18401 Header: res.Header,
18402 HTTPStatusCode: res.StatusCode,
18403 },
18404 }
18405 target := &ret
18406 if err := gensupport.DecodeResponse(target, res); err != nil {
18407 return nil, err
18408 }
18409 return ret, nil
18410 }
18411
18412 type UsersAliasesListCall struct {
18413 s *Service
18414 userKey string
18415 urlParams_ gensupport.URLParams
18416 ifNoneMatch_ string
18417 ctx_ context.Context
18418 header_ http.Header
18419 }
18420
18421
18422
18423
18424
18425 func (r *UsersAliasesService) List(userKey string) *UsersAliasesListCall {
18426 c := &UsersAliasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18427 c.userKey = userKey
18428 return c
18429 }
18430
18431
18432
18433
18434
18435
18436
18437 func (c *UsersAliasesListCall) Event(event string) *UsersAliasesListCall {
18438 c.urlParams_.Set("event", event)
18439 return c
18440 }
18441
18442
18443
18444
18445 func (c *UsersAliasesListCall) Fields(s ...googleapi.Field) *UsersAliasesListCall {
18446 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18447 return c
18448 }
18449
18450
18451
18452
18453 func (c *UsersAliasesListCall) IfNoneMatch(entityTag string) *UsersAliasesListCall {
18454 c.ifNoneMatch_ = entityTag
18455 return c
18456 }
18457
18458
18459 func (c *UsersAliasesListCall) Context(ctx context.Context) *UsersAliasesListCall {
18460 c.ctx_ = ctx
18461 return c
18462 }
18463
18464
18465
18466 func (c *UsersAliasesListCall) Header() http.Header {
18467 if c.header_ == nil {
18468 c.header_ = make(http.Header)
18469 }
18470 return c.header_
18471 }
18472
18473 func (c *UsersAliasesListCall) doRequest(alt string) (*http.Response, error) {
18474 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18475 if c.ifNoneMatch_ != "" {
18476 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18477 }
18478 var body io.Reader = nil
18479 c.urlParams_.Set("alt", alt)
18480 c.urlParams_.Set("prettyPrint", "false")
18481 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/aliases")
18482 urls += "?" + c.urlParams_.Encode()
18483 req, err := http.NewRequest("GET", urls, body)
18484 if err != nil {
18485 return nil, err
18486 }
18487 req.Header = reqHeaders
18488 googleapi.Expand(req.URL, map[string]string{
18489 "userKey": c.userKey,
18490 })
18491 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18492 }
18493
18494
18495
18496
18497
18498
18499 func (c *UsersAliasesListCall) Do(opts ...googleapi.CallOption) (*Aliases, error) {
18500 gensupport.SetOptions(c.urlParams_, opts...)
18501 res, err := c.doRequest("json")
18502 if res != nil && res.StatusCode == http.StatusNotModified {
18503 if res.Body != nil {
18504 res.Body.Close()
18505 }
18506 return nil, gensupport.WrapError(&googleapi.Error{
18507 Code: res.StatusCode,
18508 Header: res.Header,
18509 })
18510 }
18511 if err != nil {
18512 return nil, err
18513 }
18514 defer googleapi.CloseBody(res)
18515 if err := googleapi.CheckResponse(res); err != nil {
18516 return nil, gensupport.WrapError(err)
18517 }
18518 ret := &Aliases{
18519 ServerResponse: googleapi.ServerResponse{
18520 Header: res.Header,
18521 HTTPStatusCode: res.StatusCode,
18522 },
18523 }
18524 target := &ret
18525 if err := gensupport.DecodeResponse(target, res); err != nil {
18526 return nil, err
18527 }
18528 return ret, nil
18529 }
18530
18531 type UsersAliasesWatchCall struct {
18532 s *Service
18533 userKey string
18534 channel *Channel
18535 urlParams_ gensupport.URLParams
18536 ctx_ context.Context
18537 header_ http.Header
18538 }
18539
18540
18541
18542
18543 func (r *UsersAliasesService) Watch(userKey string, channel *Channel) *UsersAliasesWatchCall {
18544 c := &UsersAliasesWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18545 c.userKey = userKey
18546 c.channel = channel
18547 return c
18548 }
18549
18550
18551
18552
18553
18554
18555
18556 func (c *UsersAliasesWatchCall) Event(event string) *UsersAliasesWatchCall {
18557 c.urlParams_.Set("event", event)
18558 return c
18559 }
18560
18561
18562
18563
18564 func (c *UsersAliasesWatchCall) Fields(s ...googleapi.Field) *UsersAliasesWatchCall {
18565 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18566 return c
18567 }
18568
18569
18570 func (c *UsersAliasesWatchCall) Context(ctx context.Context) *UsersAliasesWatchCall {
18571 c.ctx_ = ctx
18572 return c
18573 }
18574
18575
18576
18577 func (c *UsersAliasesWatchCall) Header() http.Header {
18578 if c.header_ == nil {
18579 c.header_ = make(http.Header)
18580 }
18581 return c.header_
18582 }
18583
18584 func (c *UsersAliasesWatchCall) doRequest(alt string) (*http.Response, error) {
18585 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18586 var body io.Reader = nil
18587 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
18588 if err != nil {
18589 return nil, err
18590 }
18591 c.urlParams_.Set("alt", alt)
18592 c.urlParams_.Set("prettyPrint", "false")
18593 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/aliases/watch")
18594 urls += "?" + c.urlParams_.Encode()
18595 req, err := http.NewRequest("POST", urls, body)
18596 if err != nil {
18597 return nil, err
18598 }
18599 req.Header = reqHeaders
18600 googleapi.Expand(req.URL, map[string]string{
18601 "userKey": c.userKey,
18602 })
18603 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18604 }
18605
18606
18607
18608
18609
18610
18611 func (c *UsersAliasesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
18612 gensupport.SetOptions(c.urlParams_, opts...)
18613 res, err := c.doRequest("json")
18614 if res != nil && res.StatusCode == http.StatusNotModified {
18615 if res.Body != nil {
18616 res.Body.Close()
18617 }
18618 return nil, gensupport.WrapError(&googleapi.Error{
18619 Code: res.StatusCode,
18620 Header: res.Header,
18621 })
18622 }
18623 if err != nil {
18624 return nil, err
18625 }
18626 defer googleapi.CloseBody(res)
18627 if err := googleapi.CheckResponse(res); err != nil {
18628 return nil, gensupport.WrapError(err)
18629 }
18630 ret := &Channel{
18631 ServerResponse: googleapi.ServerResponse{
18632 Header: res.Header,
18633 HTTPStatusCode: res.StatusCode,
18634 },
18635 }
18636 target := &ret
18637 if err := gensupport.DecodeResponse(target, res); err != nil {
18638 return nil, err
18639 }
18640 return ret, nil
18641 }
18642
18643 type UsersPhotosDeleteCall struct {
18644 s *Service
18645 userKey string
18646 urlParams_ gensupport.URLParams
18647 ctx_ context.Context
18648 header_ http.Header
18649 }
18650
18651
18652
18653
18654
18655 func (r *UsersPhotosService) Delete(userKey string) *UsersPhotosDeleteCall {
18656 c := &UsersPhotosDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18657 c.userKey = userKey
18658 return c
18659 }
18660
18661
18662
18663
18664 func (c *UsersPhotosDeleteCall) Fields(s ...googleapi.Field) *UsersPhotosDeleteCall {
18665 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18666 return c
18667 }
18668
18669
18670 func (c *UsersPhotosDeleteCall) Context(ctx context.Context) *UsersPhotosDeleteCall {
18671 c.ctx_ = ctx
18672 return c
18673 }
18674
18675
18676
18677 func (c *UsersPhotosDeleteCall) Header() http.Header {
18678 if c.header_ == nil {
18679 c.header_ = make(http.Header)
18680 }
18681 return c.header_
18682 }
18683
18684 func (c *UsersPhotosDeleteCall) doRequest(alt string) (*http.Response, error) {
18685 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18686 var body io.Reader = nil
18687 c.urlParams_.Set("alt", alt)
18688 c.urlParams_.Set("prettyPrint", "false")
18689 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/photos/thumbnail")
18690 urls += "?" + c.urlParams_.Encode()
18691 req, err := http.NewRequest("DELETE", urls, body)
18692 if err != nil {
18693 return nil, err
18694 }
18695 req.Header = reqHeaders
18696 googleapi.Expand(req.URL, map[string]string{
18697 "userKey": c.userKey,
18698 })
18699 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18700 }
18701
18702
18703 func (c *UsersPhotosDeleteCall) Do(opts ...googleapi.CallOption) error {
18704 gensupport.SetOptions(c.urlParams_, opts...)
18705 res, err := c.doRequest("json")
18706 if err != nil {
18707 return err
18708 }
18709 defer googleapi.CloseBody(res)
18710 if err := googleapi.CheckResponse(res); err != nil {
18711 return gensupport.WrapError(err)
18712 }
18713 return nil
18714 }
18715
18716 type UsersPhotosGetCall struct {
18717 s *Service
18718 userKey string
18719 urlParams_ gensupport.URLParams
18720 ifNoneMatch_ string
18721 ctx_ context.Context
18722 header_ http.Header
18723 }
18724
18725
18726
18727
18728
18729 func (r *UsersPhotosService) Get(userKey string) *UsersPhotosGetCall {
18730 c := &UsersPhotosGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18731 c.userKey = userKey
18732 return c
18733 }
18734
18735
18736
18737
18738 func (c *UsersPhotosGetCall) Fields(s ...googleapi.Field) *UsersPhotosGetCall {
18739 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18740 return c
18741 }
18742
18743
18744
18745
18746 func (c *UsersPhotosGetCall) IfNoneMatch(entityTag string) *UsersPhotosGetCall {
18747 c.ifNoneMatch_ = entityTag
18748 return c
18749 }
18750
18751
18752 func (c *UsersPhotosGetCall) Context(ctx context.Context) *UsersPhotosGetCall {
18753 c.ctx_ = ctx
18754 return c
18755 }
18756
18757
18758
18759 func (c *UsersPhotosGetCall) Header() http.Header {
18760 if c.header_ == nil {
18761 c.header_ = make(http.Header)
18762 }
18763 return c.header_
18764 }
18765
18766 func (c *UsersPhotosGetCall) doRequest(alt string) (*http.Response, error) {
18767 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18768 if c.ifNoneMatch_ != "" {
18769 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18770 }
18771 var body io.Reader = nil
18772 c.urlParams_.Set("alt", alt)
18773 c.urlParams_.Set("prettyPrint", "false")
18774 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/photos/thumbnail")
18775 urls += "?" + c.urlParams_.Encode()
18776 req, err := http.NewRequest("GET", urls, body)
18777 if err != nil {
18778 return nil, err
18779 }
18780 req.Header = reqHeaders
18781 googleapi.Expand(req.URL, map[string]string{
18782 "userKey": c.userKey,
18783 })
18784 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18785 }
18786
18787
18788
18789
18790
18791
18792 func (c *UsersPhotosGetCall) Do(opts ...googleapi.CallOption) (*UserPhoto, error) {
18793 gensupport.SetOptions(c.urlParams_, opts...)
18794 res, err := c.doRequest("json")
18795 if res != nil && res.StatusCode == http.StatusNotModified {
18796 if res.Body != nil {
18797 res.Body.Close()
18798 }
18799 return nil, gensupport.WrapError(&googleapi.Error{
18800 Code: res.StatusCode,
18801 Header: res.Header,
18802 })
18803 }
18804 if err != nil {
18805 return nil, err
18806 }
18807 defer googleapi.CloseBody(res)
18808 if err := googleapi.CheckResponse(res); err != nil {
18809 return nil, gensupport.WrapError(err)
18810 }
18811 ret := &UserPhoto{
18812 ServerResponse: googleapi.ServerResponse{
18813 Header: res.Header,
18814 HTTPStatusCode: res.StatusCode,
18815 },
18816 }
18817 target := &ret
18818 if err := gensupport.DecodeResponse(target, res); err != nil {
18819 return nil, err
18820 }
18821 return ret, nil
18822 }
18823
18824 type UsersPhotosPatchCall struct {
18825 s *Service
18826 userKey string
18827 userphoto *UserPhoto
18828 urlParams_ gensupport.URLParams
18829 ctx_ context.Context
18830 header_ http.Header
18831 }
18832
18833
18834
18835
18836
18837
18838 func (r *UsersPhotosService) Patch(userKey string, userphoto *UserPhoto) *UsersPhotosPatchCall {
18839 c := &UsersPhotosPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18840 c.userKey = userKey
18841 c.userphoto = userphoto
18842 return c
18843 }
18844
18845
18846
18847
18848 func (c *UsersPhotosPatchCall) Fields(s ...googleapi.Field) *UsersPhotosPatchCall {
18849 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18850 return c
18851 }
18852
18853
18854 func (c *UsersPhotosPatchCall) Context(ctx context.Context) *UsersPhotosPatchCall {
18855 c.ctx_ = ctx
18856 return c
18857 }
18858
18859
18860
18861 func (c *UsersPhotosPatchCall) Header() http.Header {
18862 if c.header_ == nil {
18863 c.header_ = make(http.Header)
18864 }
18865 return c.header_
18866 }
18867
18868 func (c *UsersPhotosPatchCall) doRequest(alt string) (*http.Response, error) {
18869 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18870 var body io.Reader = nil
18871 body, err := googleapi.WithoutDataWrapper.JSONReader(c.userphoto)
18872 if err != nil {
18873 return nil, err
18874 }
18875 c.urlParams_.Set("alt", alt)
18876 c.urlParams_.Set("prettyPrint", "false")
18877 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/photos/thumbnail")
18878 urls += "?" + c.urlParams_.Encode()
18879 req, err := http.NewRequest("PATCH", urls, body)
18880 if err != nil {
18881 return nil, err
18882 }
18883 req.Header = reqHeaders
18884 googleapi.Expand(req.URL, map[string]string{
18885 "userKey": c.userKey,
18886 })
18887 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18888 }
18889
18890
18891
18892
18893
18894
18895 func (c *UsersPhotosPatchCall) Do(opts ...googleapi.CallOption) (*UserPhoto, error) {
18896 gensupport.SetOptions(c.urlParams_, opts...)
18897 res, err := c.doRequest("json")
18898 if res != nil && res.StatusCode == http.StatusNotModified {
18899 if res.Body != nil {
18900 res.Body.Close()
18901 }
18902 return nil, gensupport.WrapError(&googleapi.Error{
18903 Code: res.StatusCode,
18904 Header: res.Header,
18905 })
18906 }
18907 if err != nil {
18908 return nil, err
18909 }
18910 defer googleapi.CloseBody(res)
18911 if err := googleapi.CheckResponse(res); err != nil {
18912 return nil, gensupport.WrapError(err)
18913 }
18914 ret := &UserPhoto{
18915 ServerResponse: googleapi.ServerResponse{
18916 Header: res.Header,
18917 HTTPStatusCode: res.StatusCode,
18918 },
18919 }
18920 target := &ret
18921 if err := gensupport.DecodeResponse(target, res); err != nil {
18922 return nil, err
18923 }
18924 return ret, nil
18925 }
18926
18927 type UsersPhotosUpdateCall struct {
18928 s *Service
18929 userKey string
18930 userphoto *UserPhoto
18931 urlParams_ gensupport.URLParams
18932 ctx_ context.Context
18933 header_ http.Header
18934 }
18935
18936
18937
18938
18939
18940 func (r *UsersPhotosService) Update(userKey string, userphoto *UserPhoto) *UsersPhotosUpdateCall {
18941 c := &UsersPhotosUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18942 c.userKey = userKey
18943 c.userphoto = userphoto
18944 return c
18945 }
18946
18947
18948
18949
18950 func (c *UsersPhotosUpdateCall) Fields(s ...googleapi.Field) *UsersPhotosUpdateCall {
18951 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18952 return c
18953 }
18954
18955
18956 func (c *UsersPhotosUpdateCall) Context(ctx context.Context) *UsersPhotosUpdateCall {
18957 c.ctx_ = ctx
18958 return c
18959 }
18960
18961
18962
18963 func (c *UsersPhotosUpdateCall) Header() http.Header {
18964 if c.header_ == nil {
18965 c.header_ = make(http.Header)
18966 }
18967 return c.header_
18968 }
18969
18970 func (c *UsersPhotosUpdateCall) doRequest(alt string) (*http.Response, error) {
18971 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18972 var body io.Reader = nil
18973 body, err := googleapi.WithoutDataWrapper.JSONReader(c.userphoto)
18974 if err != nil {
18975 return nil, err
18976 }
18977 c.urlParams_.Set("alt", alt)
18978 c.urlParams_.Set("prettyPrint", "false")
18979 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/photos/thumbnail")
18980 urls += "?" + c.urlParams_.Encode()
18981 req, err := http.NewRequest("PUT", urls, body)
18982 if err != nil {
18983 return nil, err
18984 }
18985 req.Header = reqHeaders
18986 googleapi.Expand(req.URL, map[string]string{
18987 "userKey": c.userKey,
18988 })
18989 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18990 }
18991
18992
18993
18994
18995
18996
18997 func (c *UsersPhotosUpdateCall) Do(opts ...googleapi.CallOption) (*UserPhoto, error) {
18998 gensupport.SetOptions(c.urlParams_, opts...)
18999 res, err := c.doRequest("json")
19000 if res != nil && res.StatusCode == http.StatusNotModified {
19001 if res.Body != nil {
19002 res.Body.Close()
19003 }
19004 return nil, gensupport.WrapError(&googleapi.Error{
19005 Code: res.StatusCode,
19006 Header: res.Header,
19007 })
19008 }
19009 if err != nil {
19010 return nil, err
19011 }
19012 defer googleapi.CloseBody(res)
19013 if err := googleapi.CheckResponse(res); err != nil {
19014 return nil, gensupport.WrapError(err)
19015 }
19016 ret := &UserPhoto{
19017 ServerResponse: googleapi.ServerResponse{
19018 Header: res.Header,
19019 HTTPStatusCode: res.StatusCode,
19020 },
19021 }
19022 target := &ret
19023 if err := gensupport.DecodeResponse(target, res); err != nil {
19024 return nil, err
19025 }
19026 return ret, nil
19027 }
19028
19029 type VerificationCodesGenerateCall struct {
19030 s *Service
19031 userKey string
19032 urlParams_ gensupport.URLParams
19033 ctx_ context.Context
19034 header_ http.Header
19035 }
19036
19037
19038
19039
19040 func (r *VerificationCodesService) Generate(userKey string) *VerificationCodesGenerateCall {
19041 c := &VerificationCodesGenerateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19042 c.userKey = userKey
19043 return c
19044 }
19045
19046
19047
19048
19049 func (c *VerificationCodesGenerateCall) Fields(s ...googleapi.Field) *VerificationCodesGenerateCall {
19050 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19051 return c
19052 }
19053
19054
19055 func (c *VerificationCodesGenerateCall) Context(ctx context.Context) *VerificationCodesGenerateCall {
19056 c.ctx_ = ctx
19057 return c
19058 }
19059
19060
19061
19062 func (c *VerificationCodesGenerateCall) Header() http.Header {
19063 if c.header_ == nil {
19064 c.header_ = make(http.Header)
19065 }
19066 return c.header_
19067 }
19068
19069 func (c *VerificationCodesGenerateCall) doRequest(alt string) (*http.Response, error) {
19070 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19071 var body io.Reader = nil
19072 c.urlParams_.Set("alt", alt)
19073 c.urlParams_.Set("prettyPrint", "false")
19074 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/verificationCodes/generate")
19075 urls += "?" + c.urlParams_.Encode()
19076 req, err := http.NewRequest("POST", urls, body)
19077 if err != nil {
19078 return nil, err
19079 }
19080 req.Header = reqHeaders
19081 googleapi.Expand(req.URL, map[string]string{
19082 "userKey": c.userKey,
19083 })
19084 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19085 }
19086
19087
19088 func (c *VerificationCodesGenerateCall) Do(opts ...googleapi.CallOption) error {
19089 gensupport.SetOptions(c.urlParams_, opts...)
19090 res, err := c.doRequest("json")
19091 if err != nil {
19092 return err
19093 }
19094 defer googleapi.CloseBody(res)
19095 if err := googleapi.CheckResponse(res); err != nil {
19096 return gensupport.WrapError(err)
19097 }
19098 return nil
19099 }
19100
19101 type VerificationCodesInvalidateCall struct {
19102 s *Service
19103 userKey string
19104 urlParams_ gensupport.URLParams
19105 ctx_ context.Context
19106 header_ http.Header
19107 }
19108
19109
19110
19111
19112 func (r *VerificationCodesService) Invalidate(userKey string) *VerificationCodesInvalidateCall {
19113 c := &VerificationCodesInvalidateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19114 c.userKey = userKey
19115 return c
19116 }
19117
19118
19119
19120
19121 func (c *VerificationCodesInvalidateCall) Fields(s ...googleapi.Field) *VerificationCodesInvalidateCall {
19122 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19123 return c
19124 }
19125
19126
19127 func (c *VerificationCodesInvalidateCall) Context(ctx context.Context) *VerificationCodesInvalidateCall {
19128 c.ctx_ = ctx
19129 return c
19130 }
19131
19132
19133
19134 func (c *VerificationCodesInvalidateCall) Header() http.Header {
19135 if c.header_ == nil {
19136 c.header_ = make(http.Header)
19137 }
19138 return c.header_
19139 }
19140
19141 func (c *VerificationCodesInvalidateCall) doRequest(alt string) (*http.Response, error) {
19142 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19143 var body io.Reader = nil
19144 c.urlParams_.Set("alt", alt)
19145 c.urlParams_.Set("prettyPrint", "false")
19146 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/verificationCodes/invalidate")
19147 urls += "?" + c.urlParams_.Encode()
19148 req, err := http.NewRequest("POST", urls, body)
19149 if err != nil {
19150 return nil, err
19151 }
19152 req.Header = reqHeaders
19153 googleapi.Expand(req.URL, map[string]string{
19154 "userKey": c.userKey,
19155 })
19156 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19157 }
19158
19159
19160 func (c *VerificationCodesInvalidateCall) Do(opts ...googleapi.CallOption) error {
19161 gensupport.SetOptions(c.urlParams_, opts...)
19162 res, err := c.doRequest("json")
19163 if err != nil {
19164 return err
19165 }
19166 defer googleapi.CloseBody(res)
19167 if err := googleapi.CheckResponse(res); err != nil {
19168 return gensupport.WrapError(err)
19169 }
19170 return nil
19171 }
19172
19173 type VerificationCodesListCall struct {
19174 s *Service
19175 userKey string
19176 urlParams_ gensupport.URLParams
19177 ifNoneMatch_ string
19178 ctx_ context.Context
19179 header_ http.Header
19180 }
19181
19182
19183
19184
19185
19186
19187 func (r *VerificationCodesService) List(userKey string) *VerificationCodesListCall {
19188 c := &VerificationCodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19189 c.userKey = userKey
19190 return c
19191 }
19192
19193
19194
19195
19196 func (c *VerificationCodesListCall) Fields(s ...googleapi.Field) *VerificationCodesListCall {
19197 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19198 return c
19199 }
19200
19201
19202
19203
19204 func (c *VerificationCodesListCall) IfNoneMatch(entityTag string) *VerificationCodesListCall {
19205 c.ifNoneMatch_ = entityTag
19206 return c
19207 }
19208
19209
19210 func (c *VerificationCodesListCall) Context(ctx context.Context) *VerificationCodesListCall {
19211 c.ctx_ = ctx
19212 return c
19213 }
19214
19215
19216
19217 func (c *VerificationCodesListCall) Header() http.Header {
19218 if c.header_ == nil {
19219 c.header_ = make(http.Header)
19220 }
19221 return c.header_
19222 }
19223
19224 func (c *VerificationCodesListCall) doRequest(alt string) (*http.Response, error) {
19225 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19226 if c.ifNoneMatch_ != "" {
19227 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19228 }
19229 var body io.Reader = nil
19230 c.urlParams_.Set("alt", alt)
19231 c.urlParams_.Set("prettyPrint", "false")
19232 urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/verificationCodes")
19233 urls += "?" + c.urlParams_.Encode()
19234 req, err := http.NewRequest("GET", urls, body)
19235 if err != nil {
19236 return nil, err
19237 }
19238 req.Header = reqHeaders
19239 googleapi.Expand(req.URL, map[string]string{
19240 "userKey": c.userKey,
19241 })
19242 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19243 }
19244
19245
19246
19247
19248
19249
19250
19251 func (c *VerificationCodesListCall) Do(opts ...googleapi.CallOption) (*VerificationCodes, error) {
19252 gensupport.SetOptions(c.urlParams_, opts...)
19253 res, err := c.doRequest("json")
19254 if res != nil && res.StatusCode == http.StatusNotModified {
19255 if res.Body != nil {
19256 res.Body.Close()
19257 }
19258 return nil, gensupport.WrapError(&googleapi.Error{
19259 Code: res.StatusCode,
19260 Header: res.Header,
19261 })
19262 }
19263 if err != nil {
19264 return nil, err
19265 }
19266 defer googleapi.CloseBody(res)
19267 if err := googleapi.CheckResponse(res); err != nil {
19268 return nil, gensupport.WrapError(err)
19269 }
19270 ret := &VerificationCodes{
19271 ServerResponse: googleapi.ServerResponse{
19272 Header: res.Header,
19273 HTTPStatusCode: res.StatusCode,
19274 },
19275 }
19276 target := &ret
19277 if err := gensupport.DecodeResponse(target, res); err != nil {
19278 return nil, err
19279 }
19280 return ret, nil
19281 }
19282
View as plain text