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 package androidenterprise
52
53 import (
54 "bytes"
55 "context"
56 "encoding/json"
57 "errors"
58 "fmt"
59 "io"
60 "net/http"
61 "net/url"
62 "strconv"
63 "strings"
64
65 googleapi "google.golang.org/api/googleapi"
66 internal "google.golang.org/api/internal"
67 gensupport "google.golang.org/api/internal/gensupport"
68 option "google.golang.org/api/option"
69 internaloption "google.golang.org/api/option/internaloption"
70 htransport "google.golang.org/api/transport/http"
71 )
72
73
74
75 var _ = bytes.NewBuffer
76 var _ = strconv.Itoa
77 var _ = fmt.Sprintf
78 var _ = json.NewDecoder
79 var _ = io.Copy
80 var _ = url.Parse
81 var _ = gensupport.MarshalJSON
82 var _ = googleapi.Version
83 var _ = errors.New
84 var _ = strings.Replace
85 var _ = context.Canceled
86 var _ = internaloption.WithDefaultEndpoint
87 var _ = internal.Version
88
89 const apiId = "androidenterprise:v1"
90 const apiName = "androidenterprise"
91 const apiVersion = "v1"
92 const basePath = "https://androidenterprise.googleapis.com/"
93 const basePathTemplate = "https://androidenterprise.UNIVERSE_DOMAIN/"
94 const mtlsBasePath = "https://androidenterprise.mtls.googleapis.com/"
95
96
97 const (
98
99 AndroidenterpriseScope = "https://www.googleapis.com/auth/androidenterprise"
100 )
101
102
103 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
104 scopesOption := internaloption.WithDefaultScopes(
105 "https://www.googleapis.com/auth/androidenterprise",
106 )
107
108 opts = append([]option.ClientOption{scopesOption}, opts...)
109 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
110 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
111 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
112 opts = append(opts, internaloption.EnableNewAuthLibrary())
113 client, endpoint, err := htransport.NewClient(ctx, opts...)
114 if err != nil {
115 return nil, err
116 }
117 s, err := New(client)
118 if err != nil {
119 return nil, err
120 }
121 if endpoint != "" {
122 s.BasePath = endpoint
123 }
124 return s, nil
125 }
126
127
128
129
130
131
132 func New(client *http.Client) (*Service, error) {
133 if client == nil {
134 return nil, errors.New("client is nil")
135 }
136 s := &Service{client: client, BasePath: basePath}
137 s.Devices = NewDevicesService(s)
138 s.Enterprises = NewEnterprisesService(s)
139 s.Entitlements = NewEntitlementsService(s)
140 s.Grouplicenses = NewGrouplicensesService(s)
141 s.Grouplicenseusers = NewGrouplicenseusersService(s)
142 s.Installs = NewInstallsService(s)
143 s.Managedconfigurationsfordevice = NewManagedconfigurationsfordeviceService(s)
144 s.Managedconfigurationsforuser = NewManagedconfigurationsforuserService(s)
145 s.Managedconfigurationssettings = NewManagedconfigurationssettingsService(s)
146 s.Permissions = NewPermissionsService(s)
147 s.Products = NewProductsService(s)
148 s.Serviceaccountkeys = NewServiceaccountkeysService(s)
149 s.Storelayoutclusters = NewStorelayoutclustersService(s)
150 s.Storelayoutpages = NewStorelayoutpagesService(s)
151 s.Users = NewUsersService(s)
152 s.Webapps = NewWebappsService(s)
153 return s, nil
154 }
155
156 type Service struct {
157 client *http.Client
158 BasePath string
159 UserAgent string
160
161 Devices *DevicesService
162
163 Enterprises *EnterprisesService
164
165 Entitlements *EntitlementsService
166
167 Grouplicenses *GrouplicensesService
168
169 Grouplicenseusers *GrouplicenseusersService
170
171 Installs *InstallsService
172
173 Managedconfigurationsfordevice *ManagedconfigurationsfordeviceService
174
175 Managedconfigurationsforuser *ManagedconfigurationsforuserService
176
177 Managedconfigurationssettings *ManagedconfigurationssettingsService
178
179 Permissions *PermissionsService
180
181 Products *ProductsService
182
183 Serviceaccountkeys *ServiceaccountkeysService
184
185 Storelayoutclusters *StorelayoutclustersService
186
187 Storelayoutpages *StorelayoutpagesService
188
189 Users *UsersService
190
191 Webapps *WebappsService
192 }
193
194 func (s *Service) userAgent() string {
195 if s.UserAgent == "" {
196 return googleapi.UserAgent
197 }
198 return googleapi.UserAgent + " " + s.UserAgent
199 }
200
201 func NewDevicesService(s *Service) *DevicesService {
202 rs := &DevicesService{s: s}
203 return rs
204 }
205
206 type DevicesService struct {
207 s *Service
208 }
209
210 func NewEnterprisesService(s *Service) *EnterprisesService {
211 rs := &EnterprisesService{s: s}
212 return rs
213 }
214
215 type EnterprisesService struct {
216 s *Service
217 }
218
219 func NewEntitlementsService(s *Service) *EntitlementsService {
220 rs := &EntitlementsService{s: s}
221 return rs
222 }
223
224 type EntitlementsService struct {
225 s *Service
226 }
227
228 func NewGrouplicensesService(s *Service) *GrouplicensesService {
229 rs := &GrouplicensesService{s: s}
230 return rs
231 }
232
233 type GrouplicensesService struct {
234 s *Service
235 }
236
237 func NewGrouplicenseusersService(s *Service) *GrouplicenseusersService {
238 rs := &GrouplicenseusersService{s: s}
239 return rs
240 }
241
242 type GrouplicenseusersService struct {
243 s *Service
244 }
245
246 func NewInstallsService(s *Service) *InstallsService {
247 rs := &InstallsService{s: s}
248 return rs
249 }
250
251 type InstallsService struct {
252 s *Service
253 }
254
255 func NewManagedconfigurationsfordeviceService(s *Service) *ManagedconfigurationsfordeviceService {
256 rs := &ManagedconfigurationsfordeviceService{s: s}
257 return rs
258 }
259
260 type ManagedconfigurationsfordeviceService struct {
261 s *Service
262 }
263
264 func NewManagedconfigurationsforuserService(s *Service) *ManagedconfigurationsforuserService {
265 rs := &ManagedconfigurationsforuserService{s: s}
266 return rs
267 }
268
269 type ManagedconfigurationsforuserService struct {
270 s *Service
271 }
272
273 func NewManagedconfigurationssettingsService(s *Service) *ManagedconfigurationssettingsService {
274 rs := &ManagedconfigurationssettingsService{s: s}
275 return rs
276 }
277
278 type ManagedconfigurationssettingsService struct {
279 s *Service
280 }
281
282 func NewPermissionsService(s *Service) *PermissionsService {
283 rs := &PermissionsService{s: s}
284 return rs
285 }
286
287 type PermissionsService struct {
288 s *Service
289 }
290
291 func NewProductsService(s *Service) *ProductsService {
292 rs := &ProductsService{s: s}
293 return rs
294 }
295
296 type ProductsService struct {
297 s *Service
298 }
299
300 func NewServiceaccountkeysService(s *Service) *ServiceaccountkeysService {
301 rs := &ServiceaccountkeysService{s: s}
302 return rs
303 }
304
305 type ServiceaccountkeysService struct {
306 s *Service
307 }
308
309 func NewStorelayoutclustersService(s *Service) *StorelayoutclustersService {
310 rs := &StorelayoutclustersService{s: s}
311 return rs
312 }
313
314 type StorelayoutclustersService struct {
315 s *Service
316 }
317
318 func NewStorelayoutpagesService(s *Service) *StorelayoutpagesService {
319 rs := &StorelayoutpagesService{s: s}
320 return rs
321 }
322
323 type StorelayoutpagesService struct {
324 s *Service
325 }
326
327 func NewUsersService(s *Service) *UsersService {
328 rs := &UsersService{s: s}
329 return rs
330 }
331
332 type UsersService struct {
333 s *Service
334 }
335
336 func NewWebappsService(s *Service) *WebappsService {
337 rs := &WebappsService{s: s}
338 return rs
339 }
340
341 type WebappsService struct {
342 s *Service
343 }
344
345
346
347 type Administrator struct {
348
349 Email string `json:"email,omitempty"`
350
351
352
353
354
355 ForceSendFields []string `json:"-"`
356
357
358
359
360 NullFields []string `json:"-"`
361 }
362
363 func (s *Administrator) MarshalJSON() ([]byte, error) {
364 type NoMethod Administrator
365 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
366 }
367
368
369 type AdministratorWebToken struct {
370
371
372 Token string `json:"token,omitempty"`
373
374
375 googleapi.ServerResponse `json:"-"`
376
377
378
379
380
381 ForceSendFields []string `json:"-"`
382
383
384
385
386 NullFields []string `json:"-"`
387 }
388
389 func (s *AdministratorWebToken) MarshalJSON() ([]byte, error) {
390 type NoMethod AdministratorWebToken
391 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
392 }
393
394
395
396
397 type AdministratorWebTokenSpec struct {
398
399
400 ManagedConfigurations *AdministratorWebTokenSpecManagedConfigurations `json:"managedConfigurations,omitempty"`
401
402
403
404 Parent string `json:"parent,omitempty"`
405
406
407
408
409
410
411 Permission []string `json:"permission,omitempty"`
412
413 PlaySearch *AdministratorWebTokenSpecPlaySearch `json:"playSearch,omitempty"`
414
415 PrivateApps *AdministratorWebTokenSpecPrivateApps `json:"privateApps,omitempty"`
416
417 StoreBuilder *AdministratorWebTokenSpecStoreBuilder `json:"storeBuilder,omitempty"`
418
419 WebApps *AdministratorWebTokenSpecWebApps `json:"webApps,omitempty"`
420
421 ZeroTouch *AdministratorWebTokenSpecZeroTouch `json:"zeroTouch,omitempty"`
422
423
424
425
426
427 ForceSendFields []string `json:"-"`
428
429
430
431
432 NullFields []string `json:"-"`
433 }
434
435 func (s *AdministratorWebTokenSpec) MarshalJSON() ([]byte, error) {
436 type NoMethod AdministratorWebTokenSpec
437 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
438 }
439
440 type AdministratorWebTokenSpecManagedConfigurations struct {
441
442
443 Enabled bool `json:"enabled,omitempty"`
444
445
446
447
448
449 ForceSendFields []string `json:"-"`
450
451
452
453
454 NullFields []string `json:"-"`
455 }
456
457 func (s *AdministratorWebTokenSpecManagedConfigurations) MarshalJSON() ([]byte, error) {
458 type NoMethod AdministratorWebTokenSpecManagedConfigurations
459 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
460 }
461
462 type AdministratorWebTokenSpecPlaySearch struct {
463
464 ApproveApps bool `json:"approveApps,omitempty"`
465
466
467 Enabled bool `json:"enabled,omitempty"`
468
469
470
471
472
473 ForceSendFields []string `json:"-"`
474
475
476
477
478 NullFields []string `json:"-"`
479 }
480
481 func (s *AdministratorWebTokenSpecPlaySearch) MarshalJSON() ([]byte, error) {
482 type NoMethod AdministratorWebTokenSpecPlaySearch
483 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
484 }
485
486 type AdministratorWebTokenSpecPrivateApps struct {
487
488 Enabled bool `json:"enabled,omitempty"`
489
490
491
492
493
494 ForceSendFields []string `json:"-"`
495
496
497
498
499 NullFields []string `json:"-"`
500 }
501
502 func (s *AdministratorWebTokenSpecPrivateApps) MarshalJSON() ([]byte, error) {
503 type NoMethod AdministratorWebTokenSpecPrivateApps
504 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
505 }
506
507 type AdministratorWebTokenSpecStoreBuilder struct {
508
509 Enabled bool `json:"enabled,omitempty"`
510
511
512
513
514
515 ForceSendFields []string `json:"-"`
516
517
518
519
520 NullFields []string `json:"-"`
521 }
522
523 func (s *AdministratorWebTokenSpecStoreBuilder) MarshalJSON() ([]byte, error) {
524 type NoMethod AdministratorWebTokenSpecStoreBuilder
525 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
526 }
527
528 type AdministratorWebTokenSpecWebApps struct {
529
530 Enabled bool `json:"enabled,omitempty"`
531
532
533
534
535
536 ForceSendFields []string `json:"-"`
537
538
539
540
541 NullFields []string `json:"-"`
542 }
543
544 func (s *AdministratorWebTokenSpecWebApps) MarshalJSON() ([]byte, error) {
545 type NoMethod AdministratorWebTokenSpecWebApps
546 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
547 }
548
549 type AdministratorWebTokenSpecZeroTouch struct {
550
551
552 Enabled bool `json:"enabled,omitempty"`
553
554
555
556
557
558 ForceSendFields []string `json:"-"`
559
560
561
562
563 NullFields []string `json:"-"`
564 }
565
566 func (s *AdministratorWebTokenSpecZeroTouch) MarshalJSON() ([]byte, error) {
567 type NoMethod AdministratorWebTokenSpecZeroTouch
568 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
569 }
570
571
572
573 type AppRestrictionsSchema struct {
574
575 Kind string `json:"kind,omitempty"`
576
577 Restrictions []*AppRestrictionsSchemaRestriction `json:"restrictions,omitempty"`
578
579
580 googleapi.ServerResponse `json:"-"`
581
582
583
584
585
586 ForceSendFields []string `json:"-"`
587
588
589
590
591 NullFields []string `json:"-"`
592 }
593
594 func (s *AppRestrictionsSchema) MarshalJSON() ([]byte, error) {
595 type NoMethod AppRestrictionsSchema
596 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
597 }
598
599
600
601
602
603 type AppRestrictionsSchemaChangeEvent struct {
604
605
606 ProductId string `json:"productId,omitempty"`
607
608
609
610
611
612 ForceSendFields []string `json:"-"`
613
614
615
616
617 NullFields []string `json:"-"`
618 }
619
620 func (s *AppRestrictionsSchemaChangeEvent) MarshalJSON() ([]byte, error) {
621 type NoMethod AppRestrictionsSchemaChangeEvent
622 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
623 }
624
625
626
627 type AppRestrictionsSchemaRestriction struct {
628
629
630 DefaultValue *AppRestrictionsSchemaRestrictionRestrictionValue `json:"defaultValue,omitempty"`
631
632
633 Description string `json:"description,omitempty"`
634
635
636 Entry []string `json:"entry,omitempty"`
637
638
639
640
641 EntryValue []string `json:"entryValue,omitempty"`
642
643
644 Key string `json:"key,omitempty"`
645
646
647
648
649 NestedRestriction []*AppRestrictionsSchemaRestriction `json:"nestedRestriction,omitempty"`
650
651
652
653
654
655
656
657
658
659
660
661
662
663 RestrictionType string `json:"restrictionType,omitempty"`
664
665 Title string `json:"title,omitempty"`
666
667
668
669
670
671 ForceSendFields []string `json:"-"`
672
673
674
675
676 NullFields []string `json:"-"`
677 }
678
679 func (s *AppRestrictionsSchemaRestriction) MarshalJSON() ([]byte, error) {
680 type NoMethod AppRestrictionsSchemaRestriction
681 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
682 }
683
684
685
686 type AppRestrictionsSchemaRestrictionRestrictionValue struct {
687
688
689
690
691
692
693
694
695
696
697
698
699
700 Type string `json:"type,omitempty"`
701
702 ValueBool bool `json:"valueBool,omitempty"`
703
704
705 ValueInteger int64 `json:"valueInteger,omitempty"`
706
707
708 ValueMultiselect []string `json:"valueMultiselect,omitempty"`
709
710
711 ValueString string `json:"valueString,omitempty"`
712
713
714
715
716
717 ForceSendFields []string `json:"-"`
718
719
720
721
722 NullFields []string `json:"-"`
723 }
724
725 func (s *AppRestrictionsSchemaRestrictionRestrictionValue) MarshalJSON() ([]byte, error) {
726 type NoMethod AppRestrictionsSchemaRestrictionRestrictionValue
727 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
728 }
729
730
731 type AppState struct {
732
733 KeyedAppState []*KeyedAppState `json:"keyedAppState,omitempty"`
734
735 PackageName string `json:"packageName,omitempty"`
736
737
738
739
740
741 ForceSendFields []string `json:"-"`
742
743
744
745
746 NullFields []string `json:"-"`
747 }
748
749 func (s *AppState) MarshalJSON() ([]byte, error) {
750 type NoMethod AppState
751 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
752 }
753
754
755
756
757
758 type AppUpdateEvent struct {
759
760
761 ProductId string `json:"productId,omitempty"`
762
763
764
765
766
767 ForceSendFields []string `json:"-"`
768
769
770
771
772 NullFields []string `json:"-"`
773 }
774
775 func (s *AppUpdateEvent) MarshalJSON() ([]byte, error) {
776 type NoMethod AppUpdateEvent
777 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
778 }
779
780
781 type AppVersion struct {
782
783 IsProduction bool `json:"isProduction,omitempty"`
784
785
786
787 TargetSdkVersion int64 `json:"targetSdkVersion,omitempty"`
788
789
790
791
792
793
794
795 Track string `json:"track,omitempty"`
796
797
798
799 TrackId []string `json:"trackId,omitempty"`
800
801 VersionCode int64 `json:"versionCode,omitempty"`
802
803
804
805 VersionString string `json:"versionString,omitempty"`
806
807
808
809
810
811 ForceSendFields []string `json:"-"`
812
813
814
815
816 NullFields []string `json:"-"`
817 }
818
819 func (s *AppVersion) MarshalJSON() ([]byte, error) {
820 type NoMethod AppVersion
821 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
822 }
823
824
825 type ApprovalUrlInfo struct {
826
827
828 ApprovalUrl string `json:"approvalUrl,omitempty"`
829
830
831
832
833
834 ForceSendFields []string `json:"-"`
835
836
837
838
839 NullFields []string `json:"-"`
840 }
841
842 func (s *ApprovalUrlInfo) MarshalJSON() ([]byte, error) {
843 type NoMethod ApprovalUrlInfo
844 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
845 }
846
847
848
849
850 type AuthenticationToken struct {
851
852
853
854 Token string `json:"token,omitempty"`
855
856
857 googleapi.ServerResponse `json:"-"`
858
859
860
861
862
863 ForceSendFields []string `json:"-"`
864
865
866
867
868 NullFields []string `json:"-"`
869 }
870
871 func (s *AuthenticationToken) MarshalJSON() ([]byte, error) {
872 type NoMethod AuthenticationToken
873 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
874 }
875
876
877
878 type AutoInstallConstraint struct {
879
880
881
882
883
884
885 ChargingStateConstraint string `json:"chargingStateConstraint,omitempty"`
886
887
888
889
890
891
892
893 DeviceIdleStateConstraint string `json:"deviceIdleStateConstraint,omitempty"`
894
895
896
897
898
899
900 NetworkTypeConstraint string `json:"networkTypeConstraint,omitempty"`
901
902
903
904
905
906 ForceSendFields []string `json:"-"`
907
908
909
910
911 NullFields []string `json:"-"`
912 }
913
914 func (s *AutoInstallConstraint) MarshalJSON() ([]byte, error) {
915 type NoMethod AutoInstallConstraint
916 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
917 }
918
919 type AutoInstallPolicy struct {
920
921
922 AutoInstallConstraint []*AutoInstallConstraint `json:"autoInstallConstraint,omitempty"`
923
924
925
926
927
928
929
930
931
932
933
934
935
936 AutoInstallMode string `json:"autoInstallMode,omitempty"`
937
938
939 AutoInstallPriority int64 `json:"autoInstallPriority,omitempty"`
940
941
942
943
944 MinimumVersionCode int64 `json:"minimumVersionCode,omitempty"`
945
946
947
948
949
950 ForceSendFields []string `json:"-"`
951
952
953
954
955 NullFields []string `json:"-"`
956 }
957
958 func (s *AutoInstallPolicy) MarshalJSON() ([]byte, error) {
959 type NoMethod AutoInstallPolicy
960 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
961 }
962
963
964
965
966
967 type ConfigurationVariables struct {
968
969 McmId string `json:"mcmId,omitempty"`
970
971 VariableSet []*VariableSet `json:"variableSet,omitempty"`
972
973
974
975
976
977 ForceSendFields []string `json:"-"`
978
979
980
981
982 NullFields []string `json:"-"`
983 }
984
985 func (s *ConfigurationVariables) MarshalJSON() ([]byte, error) {
986 type NoMethod ConfigurationVariables
987 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
988 }
989
990
991 type CreateEnrollmentTokenResponse struct {
992
993 EnrollmentToken string `json:"enrollmentToken,omitempty"`
994
995
996 googleapi.ServerResponse `json:"-"`
997
998
999
1000
1001
1002 ForceSendFields []string `json:"-"`
1003
1004
1005
1006
1007 NullFields []string `json:"-"`
1008 }
1009
1010 func (s *CreateEnrollmentTokenResponse) MarshalJSON() ([]byte, error) {
1011 type NoMethod CreateEnrollmentTokenResponse
1012 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1013 }
1014
1015
1016
1017 type Device struct {
1018
1019
1020 AndroidId string `json:"androidId,omitempty"`
1021
1022
1023
1024 Device string `json:"device,omitempty"`
1025
1026 LatestBuildFingerprint string `json:"latestBuildFingerprint,omitempty"`
1027
1028
1029 Maker string `json:"maker,omitempty"`
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046 ManagementType string `json:"managementType,omitempty"`
1047
1048 Model string `json:"model,omitempty"`
1049
1050 Policy *Policy `json:"policy,omitempty"`
1051
1052
1053 Product string `json:"product,omitempty"`
1054
1055 Report *DeviceReport `json:"report,omitempty"`
1056
1057 RetailBrand string `json:"retailBrand,omitempty"`
1058
1059 SdkVersion int64 `json:"sdkVersion,omitempty"`
1060
1061
1062 googleapi.ServerResponse `json:"-"`
1063
1064
1065
1066
1067
1068 ForceSendFields []string `json:"-"`
1069
1070
1071
1072
1073 NullFields []string `json:"-"`
1074 }
1075
1076 func (s *Device) MarshalJSON() ([]byte, error) {
1077 type NoMethod Device
1078 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1079 }
1080
1081
1082
1083 type DeviceReport struct {
1084
1085
1086 AppState []*AppState `json:"appState,omitempty"`
1087
1088
1089 LastUpdatedTimestampMillis int64 `json:"lastUpdatedTimestampMillis,omitempty,string"`
1090
1091
1092
1093
1094
1095 ForceSendFields []string `json:"-"`
1096
1097
1098
1099
1100 NullFields []string `json:"-"`
1101 }
1102
1103 func (s *DeviceReport) MarshalJSON() ([]byte, error) {
1104 type NoMethod DeviceReport
1105 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1106 }
1107
1108
1109
1110 type DeviceReportUpdateEvent struct {
1111
1112 DeviceId string `json:"deviceId,omitempty"`
1113
1114
1115 Report *DeviceReport `json:"report,omitempty"`
1116
1117 UserId string `json:"userId,omitempty"`
1118
1119
1120
1121
1122
1123 ForceSendFields []string `json:"-"`
1124
1125
1126
1127
1128 NullFields []string `json:"-"`
1129 }
1130
1131 func (s *DeviceReportUpdateEvent) MarshalJSON() ([]byte, error) {
1132 type NoMethod DeviceReportUpdateEvent
1133 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1134 }
1135
1136
1137
1138 type DeviceState struct {
1139
1140
1141
1142
1143
1144
1145
1146
1147 AccountState string `json:"accountState,omitempty"`
1148
1149
1150 googleapi.ServerResponse `json:"-"`
1151
1152
1153
1154
1155
1156 ForceSendFields []string `json:"-"`
1157
1158
1159
1160
1161 NullFields []string `json:"-"`
1162 }
1163
1164 func (s *DeviceState) MarshalJSON() ([]byte, error) {
1165 type NoMethod DeviceState
1166 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1167 }
1168
1169 type DevicesListResponse struct {
1170
1171 Device []*Device `json:"device,omitempty"`
1172
1173
1174 googleapi.ServerResponse `json:"-"`
1175
1176
1177
1178
1179
1180 ForceSendFields []string `json:"-"`
1181
1182
1183
1184
1185 NullFields []string `json:"-"`
1186 }
1187
1188 func (s *DevicesListResponse) MarshalJSON() ([]byte, error) {
1189 type NoMethod DevicesListResponse
1190 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1191 }
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205 type Enterprise struct {
1206
1207
1208 Administrator []*Administrator `json:"administrator,omitempty"`
1209
1210
1211 GoogleAuthenticationSettings *GoogleAuthenticationSettings `json:"googleAuthenticationSettings,omitempty"`
1212
1213 Id string `json:"id,omitempty"`
1214
1215 Name string `json:"name,omitempty"`
1216
1217 PrimaryDomain string `json:"primaryDomain,omitempty"`
1218
1219
1220 googleapi.ServerResponse `json:"-"`
1221
1222
1223
1224
1225
1226 ForceSendFields []string `json:"-"`
1227
1228
1229
1230
1231 NullFields []string `json:"-"`
1232 }
1233
1234 func (s *Enterprise) MarshalJSON() ([]byte, error) {
1235 type NoMethod Enterprise
1236 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1237 }
1238
1239
1240
1241 type EnterpriseAccount struct {
1242
1243 AccountEmail string `json:"accountEmail,omitempty"`
1244
1245
1246 googleapi.ServerResponse `json:"-"`
1247
1248
1249
1250
1251
1252 ForceSendFields []string `json:"-"`
1253
1254
1255
1256
1257 NullFields []string `json:"-"`
1258 }
1259
1260 func (s *EnterpriseAccount) MarshalJSON() ([]byte, error) {
1261 type NoMethod EnterpriseAccount
1262 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1263 }
1264
1265
1266
1267 type EnterpriseAuthenticationAppLinkConfig struct {
1268
1269 Uri string `json:"uri,omitempty"`
1270
1271
1272
1273
1274
1275 ForceSendFields []string `json:"-"`
1276
1277
1278
1279
1280 NullFields []string `json:"-"`
1281 }
1282
1283 func (s *EnterpriseAuthenticationAppLinkConfig) MarshalJSON() ([]byte, error) {
1284 type NoMethod EnterpriseAuthenticationAppLinkConfig
1285 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1286 }
1287
1288 type EnterprisesListResponse struct {
1289
1290 Enterprise []*Enterprise `json:"enterprise,omitempty"`
1291
1292
1293 googleapi.ServerResponse `json:"-"`
1294
1295
1296
1297
1298
1299 ForceSendFields []string `json:"-"`
1300
1301
1302
1303
1304 NullFields []string `json:"-"`
1305 }
1306
1307 func (s *EnterprisesListResponse) MarshalJSON() ([]byte, error) {
1308 type NoMethod EnterprisesListResponse
1309 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1310 }
1311
1312 type EnterprisesSendTestPushNotificationResponse struct {
1313
1314 MessageId string `json:"messageId,omitempty"`
1315
1316
1317 TopicName string `json:"topicName,omitempty"`
1318
1319
1320 googleapi.ServerResponse `json:"-"`
1321
1322
1323
1324
1325
1326 ForceSendFields []string `json:"-"`
1327
1328
1329
1330
1331 NullFields []string `json:"-"`
1332 }
1333
1334 func (s *EnterprisesSendTestPushNotificationResponse) MarshalJSON() ([]byte, error) {
1335 type NoMethod EnterprisesSendTestPushNotificationResponse
1336 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1337 }
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358 type Entitlement struct {
1359
1360
1361 ProductId string `json:"productId,omitempty"`
1362
1363
1364
1365
1366
1367
1368
1369
1370 Reason string `json:"reason,omitempty"`
1371
1372
1373 googleapi.ServerResponse `json:"-"`
1374
1375
1376
1377
1378
1379 ForceSendFields []string `json:"-"`
1380
1381
1382
1383
1384 NullFields []string `json:"-"`
1385 }
1386
1387 func (s *Entitlement) MarshalJSON() ([]byte, error) {
1388 type NoMethod Entitlement
1389 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1390 }
1391
1392 type EntitlementsListResponse struct {
1393
1394
1395
1396 Entitlement []*Entitlement `json:"entitlement,omitempty"`
1397
1398
1399 googleapi.ServerResponse `json:"-"`
1400
1401
1402
1403
1404
1405 ForceSendFields []string `json:"-"`
1406
1407
1408
1409
1410 NullFields []string `json:"-"`
1411 }
1412
1413 func (s *EntitlementsListResponse) MarshalJSON() ([]byte, error) {
1414 type NoMethod EntitlementsListResponse
1415 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1416 }
1417
1418
1419
1420 type GoogleAuthenticationSettings struct {
1421
1422
1423
1424
1425
1426
1427 DedicatedDevicesAllowed string `json:"dedicatedDevicesAllowed,omitempty"`
1428
1429
1430
1431
1432
1433
1434 GoogleAuthenticationRequired string `json:"googleAuthenticationRequired,omitempty"`
1435
1436
1437
1438
1439
1440 ForceSendFields []string `json:"-"`
1441
1442
1443
1444
1445 NullFields []string `json:"-"`
1446 }
1447
1448 func (s *GoogleAuthenticationSettings) MarshalJSON() ([]byte, error) {
1449 type NoMethod GoogleAuthenticationSettings
1450 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1451 }
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466 type GroupLicense struct {
1467
1468
1469
1470
1471
1472
1473
1474
1475 AcquisitionKind string `json:"acquisitionKind,omitempty"`
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485 Approval string `json:"approval,omitempty"`
1486
1487
1488 NumProvisioned int64 `json:"numProvisioned,omitempty"`
1489
1490
1491
1492
1493 NumPurchased int64 `json:"numPurchased,omitempty"`
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510 Permissions string `json:"permissions,omitempty"`
1511
1512
1513 ProductId string `json:"productId,omitempty"`
1514
1515
1516 googleapi.ServerResponse `json:"-"`
1517
1518
1519
1520
1521
1522 ForceSendFields []string `json:"-"`
1523
1524
1525
1526
1527 NullFields []string `json:"-"`
1528 }
1529
1530 func (s *GroupLicense) MarshalJSON() ([]byte, error) {
1531 type NoMethod GroupLicense
1532 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1533 }
1534
1535 type GroupLicenseUsersListResponse struct {
1536
1537 User []*User `json:"user,omitempty"`
1538
1539
1540 googleapi.ServerResponse `json:"-"`
1541
1542
1543
1544
1545
1546 ForceSendFields []string `json:"-"`
1547
1548
1549
1550
1551 NullFields []string `json:"-"`
1552 }
1553
1554 func (s *GroupLicenseUsersListResponse) MarshalJSON() ([]byte, error) {
1555 type NoMethod GroupLicenseUsersListResponse
1556 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1557 }
1558
1559 type GroupLicensesListResponse struct {
1560
1561
1562 GroupLicense []*GroupLicense `json:"groupLicense,omitempty"`
1563
1564
1565 googleapi.ServerResponse `json:"-"`
1566
1567
1568
1569
1570
1571 ForceSendFields []string `json:"-"`
1572
1573
1574
1575
1576 NullFields []string `json:"-"`
1577 }
1578
1579 func (s *GroupLicensesListResponse) MarshalJSON() ([]byte, error) {
1580 type NoMethod GroupLicensesListResponse
1581 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1582 }
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602 type Install struct {
1603
1604
1605
1606
1607
1608
1609
1610
1611 InstallState string `json:"installState,omitempty"`
1612
1613
1614 ProductId string `json:"productId,omitempty"`
1615
1616
1617 VersionCode int64 `json:"versionCode,omitempty"`
1618
1619
1620 googleapi.ServerResponse `json:"-"`
1621
1622
1623
1624
1625
1626 ForceSendFields []string `json:"-"`
1627
1628
1629
1630
1631 NullFields []string `json:"-"`
1632 }
1633
1634 func (s *Install) MarshalJSON() ([]byte, error) {
1635 type NoMethod Install
1636 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1637 }
1638
1639
1640
1641 type InstallFailureEvent struct {
1642
1643 DeviceId string `json:"deviceId,omitempty"`
1644
1645 FailureDetails string `json:"failureDetails,omitempty"`
1646
1647
1648
1649
1650
1651
1652
1653
1654 FailureReason string `json:"failureReason,omitempty"`
1655
1656
1657 ProductId string `json:"productId,omitempty"`
1658
1659 UserId string `json:"userId,omitempty"`
1660
1661
1662
1663
1664
1665 ForceSendFields []string `json:"-"`
1666
1667
1668
1669
1670 NullFields []string `json:"-"`
1671 }
1672
1673 func (s *InstallFailureEvent) MarshalJSON() ([]byte, error) {
1674 type NoMethod InstallFailureEvent
1675 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1676 }
1677
1678 type InstallsListResponse struct {
1679
1680
1681
1682 Install []*Install `json:"install,omitempty"`
1683
1684
1685 googleapi.ServerResponse `json:"-"`
1686
1687
1688
1689
1690
1691 ForceSendFields []string `json:"-"`
1692
1693
1694
1695
1696 NullFields []string `json:"-"`
1697 }
1698
1699 func (s *InstallsListResponse) MarshalJSON() ([]byte, error) {
1700 type NoMethod InstallsListResponse
1701 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1702 }
1703
1704
1705
1706 type KeyedAppState struct {
1707
1708
1709
1710 Data string `json:"data,omitempty"`
1711
1712
1713
1714
1715 Key string `json:"key,omitempty"`
1716
1717
1718
1719 Message string `json:"message,omitempty"`
1720
1721
1722
1723
1724
1725
1726 Severity string `json:"severity,omitempty"`
1727
1728
1729 StateTimestampMillis int64 `json:"stateTimestampMillis,omitempty,string"`
1730
1731
1732
1733
1734
1735 ForceSendFields []string `json:"-"`
1736
1737
1738
1739
1740 NullFields []string `json:"-"`
1741 }
1742
1743 func (s *KeyedAppState) MarshalJSON() ([]byte, error) {
1744 type NoMethod KeyedAppState
1745 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1746 }
1747
1748
1749 type LocalizedText struct {
1750
1751 Locale string `json:"locale,omitempty"`
1752
1753 Text string `json:"text,omitempty"`
1754
1755
1756
1757
1758
1759 ForceSendFields []string `json:"-"`
1760
1761
1762
1763
1764 NullFields []string `json:"-"`
1765 }
1766
1767 func (s *LocalizedText) MarshalJSON() ([]byte, error) {
1768 type NoMethod LocalizedText
1769 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1770 }
1771
1772
1773
1774
1775 type MaintenanceWindow struct {
1776
1777
1778 DurationMs int64 `json:"durationMs,omitempty,string"`
1779
1780
1781 StartTimeAfterMidnightMs int64 `json:"startTimeAfterMidnightMs,omitempty,string"`
1782
1783
1784
1785
1786
1787 ForceSendFields []string `json:"-"`
1788
1789
1790
1791
1792 NullFields []string `json:"-"`
1793 }
1794
1795 func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) {
1796 type NoMethod MaintenanceWindow
1797 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1798 }
1799
1800
1801
1802
1803
1804 type ManagedConfiguration struct {
1805
1806
1807 ConfigurationVariables *ConfigurationVariables `json:"configurationVariables,omitempty"`
1808
1809 Kind string `json:"kind,omitempty"`
1810
1811 ManagedProperty []*ManagedProperty `json:"managedProperty,omitempty"`
1812
1813
1814 ProductId string `json:"productId,omitempty"`
1815
1816
1817 googleapi.ServerResponse `json:"-"`
1818
1819
1820
1821
1822
1823 ForceSendFields []string `json:"-"`
1824
1825
1826
1827
1828 NullFields []string `json:"-"`
1829 }
1830
1831 func (s *ManagedConfiguration) MarshalJSON() ([]byte, error) {
1832 type NoMethod ManagedConfiguration
1833 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1834 }
1835
1836 type ManagedConfigurationsForDeviceListResponse struct {
1837
1838
1839 ManagedConfigurationForDevice []*ManagedConfiguration `json:"managedConfigurationForDevice,omitempty"`
1840
1841
1842 googleapi.ServerResponse `json:"-"`
1843
1844
1845
1846
1847
1848 ForceSendFields []string `json:"-"`
1849
1850
1851
1852
1853 NullFields []string `json:"-"`
1854 }
1855
1856 func (s *ManagedConfigurationsForDeviceListResponse) MarshalJSON() ([]byte, error) {
1857 type NoMethod ManagedConfigurationsForDeviceListResponse
1858 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1859 }
1860
1861 type ManagedConfigurationsForUserListResponse struct {
1862
1863
1864 ManagedConfigurationForUser []*ManagedConfiguration `json:"managedConfigurationForUser,omitempty"`
1865
1866
1867 googleapi.ServerResponse `json:"-"`
1868
1869
1870
1871
1872
1873 ForceSendFields []string `json:"-"`
1874
1875
1876
1877
1878 NullFields []string `json:"-"`
1879 }
1880
1881 func (s *ManagedConfigurationsForUserListResponse) MarshalJSON() ([]byte, error) {
1882 type NoMethod ManagedConfigurationsForUserListResponse
1883 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1884 }
1885
1886
1887
1888
1889
1890 type ManagedConfigurationsSettings struct {
1891
1892
1893 LastUpdatedTimestampMillis int64 `json:"lastUpdatedTimestampMillis,omitempty,string"`
1894
1895 McmId string `json:"mcmId,omitempty"`
1896
1897 Name string `json:"name,omitempty"`
1898
1899
1900
1901
1902
1903 ForceSendFields []string `json:"-"`
1904
1905
1906
1907
1908 NullFields []string `json:"-"`
1909 }
1910
1911 func (s *ManagedConfigurationsSettings) MarshalJSON() ([]byte, error) {
1912 type NoMethod ManagedConfigurationsSettings
1913 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1914 }
1915
1916 type ManagedConfigurationsSettingsListResponse struct {
1917
1918
1919 ManagedConfigurationsSettings []*ManagedConfigurationsSettings `json:"managedConfigurationsSettings,omitempty"`
1920
1921
1922 googleapi.ServerResponse `json:"-"`
1923
1924
1925
1926
1927
1928 ForceSendFields []string `json:"-"`
1929
1930
1931
1932
1933 NullFields []string `json:"-"`
1934 }
1935
1936 func (s *ManagedConfigurationsSettingsListResponse) MarshalJSON() ([]byte, error) {
1937 type NoMethod ManagedConfigurationsSettingsListResponse
1938 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1939 }
1940
1941
1942
1943
1944
1945 type ManagedProperty struct {
1946
1947 Key string `json:"key,omitempty"`
1948
1949
1950 ValueBool bool `json:"valueBool,omitempty"`
1951
1952
1953 ValueBundle *ManagedPropertyBundle `json:"valueBundle,omitempty"`
1954
1955
1956 ValueBundleArray []*ManagedPropertyBundle `json:"valueBundleArray,omitempty"`
1957
1958
1959 ValueInteger int64 `json:"valueInteger,omitempty"`
1960
1961
1962 ValueString string `json:"valueString,omitempty"`
1963
1964
1965 ValueStringArray []string `json:"valueStringArray,omitempty"`
1966
1967
1968
1969
1970
1971 ForceSendFields []string `json:"-"`
1972
1973
1974
1975
1976 NullFields []string `json:"-"`
1977 }
1978
1979 func (s *ManagedProperty) MarshalJSON() ([]byte, error) {
1980 type NoMethod ManagedProperty
1981 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1982 }
1983
1984
1985 type ManagedPropertyBundle struct {
1986
1987 ManagedProperty []*ManagedProperty `json:"managedProperty,omitempty"`
1988
1989
1990
1991
1992
1993 ForceSendFields []string `json:"-"`
1994
1995
1996
1997
1998 NullFields []string `json:"-"`
1999 }
2000
2001 func (s *ManagedPropertyBundle) MarshalJSON() ([]byte, error) {
2002 type NoMethod ManagedPropertyBundle
2003 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2004 }
2005
2006
2007 type NewDeviceEvent struct {
2008
2009 DeviceId string `json:"deviceId,omitempty"`
2010
2011 DpcPackageName string `json:"dpcPackageName,omitempty"`
2012
2013
2014
2015
2016
2017
2018
2019
2020 ManagementType string `json:"managementType,omitempty"`
2021
2022 UserId string `json:"userId,omitempty"`
2023
2024
2025
2026
2027
2028 ForceSendFields []string `json:"-"`
2029
2030
2031
2032
2033 NullFields []string `json:"-"`
2034 }
2035
2036 func (s *NewDeviceEvent) MarshalJSON() ([]byte, error) {
2037 type NoMethod NewDeviceEvent
2038 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2039 }
2040
2041
2042
2043 type NewPermissionsEvent struct {
2044
2045
2046
2047 ApprovedPermissions []string `json:"approvedPermissions,omitempty"`
2048
2049
2050 ProductId string `json:"productId,omitempty"`
2051
2052
2053
2054 RequestedPermissions []string `json:"requestedPermissions,omitempty"`
2055
2056
2057
2058
2059
2060 ForceSendFields []string `json:"-"`
2061
2062
2063
2064
2065 NullFields []string `json:"-"`
2066 }
2067
2068 func (s *NewPermissionsEvent) MarshalJSON() ([]byte, error) {
2069 type NoMethod NewPermissionsEvent
2070 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2071 }
2072
2073
2074 type Notification struct {
2075
2076
2077 AppRestrictionsSchemaChangeEvent *AppRestrictionsSchemaChangeEvent `json:"appRestrictionsSchemaChangeEvent,omitempty"`
2078
2079 AppUpdateEvent *AppUpdateEvent `json:"appUpdateEvent,omitempty"`
2080
2081 DeviceReportUpdateEvent *DeviceReportUpdateEvent `json:"deviceReportUpdateEvent,omitempty"`
2082
2083
2084 EnterpriseId string `json:"enterpriseId,omitempty"`
2085
2086 InstallFailureEvent *InstallFailureEvent `json:"installFailureEvent,omitempty"`
2087
2088 NewDeviceEvent *NewDeviceEvent `json:"newDeviceEvent,omitempty"`
2089
2090 NewPermissionsEvent *NewPermissionsEvent `json:"newPermissionsEvent,omitempty"`
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107 NotificationType string `json:"notificationType,omitempty"`
2108
2109
2110 ProductApprovalEvent *ProductApprovalEvent `json:"productApprovalEvent,omitempty"`
2111
2112
2113 ProductAvailabilityChangeEvent *ProductAvailabilityChangeEvent `json:"productAvailabilityChangeEvent,omitempty"`
2114
2115
2116 TimestampMillis int64 `json:"timestampMillis,omitempty,string"`
2117
2118
2119
2120
2121
2122
2123 ForceSendFields []string `json:"-"`
2124
2125
2126
2127
2128
2129 NullFields []string `json:"-"`
2130 }
2131
2132 func (s *Notification) MarshalJSON() ([]byte, error) {
2133 type NoMethod Notification
2134 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2135 }
2136
2137
2138
2139
2140 type NotificationSet struct {
2141
2142
2143 Notification []*Notification `json:"notification,omitempty"`
2144
2145
2146
2147 NotificationSetId string `json:"notificationSetId,omitempty"`
2148
2149
2150 googleapi.ServerResponse `json:"-"`
2151
2152
2153
2154
2155
2156 ForceSendFields []string `json:"-"`
2157
2158
2159
2160
2161 NullFields []string `json:"-"`
2162 }
2163
2164 func (s *NotificationSet) MarshalJSON() ([]byte, error) {
2165 type NoMethod NotificationSet
2166 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2167 }
2168
2169
2170
2171
2172 type PageInfo struct {
2173
2174
2175 ResultPerPage int64 `json:"resultPerPage,omitempty"`
2176
2177 StartIndex int64 `json:"startIndex,omitempty"`
2178
2179
2180 TotalResults int64 `json:"totalResults,omitempty"`
2181
2182
2183
2184
2185
2186 ForceSendFields []string `json:"-"`
2187
2188
2189
2190
2191 NullFields []string `json:"-"`
2192 }
2193
2194 func (s *PageInfo) MarshalJSON() ([]byte, error) {
2195 type NoMethod PageInfo
2196 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2197 }
2198
2199
2200
2201
2202
2203
2204
2205
2206 type Permission struct {
2207
2208
2209 Description string `json:"description,omitempty"`
2210
2211 Name string `json:"name,omitempty"`
2212
2213 PermissionId string `json:"permissionId,omitempty"`
2214
2215
2216 googleapi.ServerResponse `json:"-"`
2217
2218
2219
2220
2221
2222 ForceSendFields []string `json:"-"`
2223
2224
2225
2226
2227 NullFields []string `json:"-"`
2228 }
2229
2230 func (s *Permission) MarshalJSON() ([]byte, error) {
2231 type NoMethod Permission
2232 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2233 }
2234
2235
2236 type Policy struct {
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252 AutoUpdatePolicy string `json:"autoUpdatePolicy,omitempty"`
2253
2254
2255
2256
2257
2258
2259
2260 DeviceReportPolicy string `json:"deviceReportPolicy,omitempty"`
2261
2262
2263 MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"`
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280 ProductAvailabilityPolicy string `json:"productAvailabilityPolicy,omitempty"`
2281
2282
2283 ProductPolicy []*ProductPolicy `json:"productPolicy,omitempty"`
2284
2285
2286
2287
2288
2289 ForceSendFields []string `json:"-"`
2290
2291
2292
2293
2294 NullFields []string `json:"-"`
2295 }
2296
2297 func (s *Policy) MarshalJSON() ([]byte, error) {
2298 type NoMethod Policy
2299 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2300 }
2301
2302
2303
2304
2305
2306
2307
2308
2309 type Product struct {
2310
2311 AppRestrictionsSchema *AppRestrictionsSchema `json:"appRestrictionsSchema,omitempty"`
2312
2313 AppTracks []*TrackInfo `json:"appTracks,omitempty"`
2314
2315 AppVersion []*AppVersion `json:"appVersion,omitempty"`
2316
2317
2318 AuthorName string `json:"authorName,omitempty"`
2319
2320 AvailableCountries []string `json:"availableCountries,omitempty"`
2321
2322
2323
2324
2325
2326
2327
2328 AvailableTracks []string `json:"availableTracks,omitempty"`
2329
2330 Category string `json:"category,omitempty"`
2331
2332
2333
2334
2335
2336
2337
2338
2339 ContentRating string `json:"contentRating,omitempty"`
2340
2341 Description string `json:"description,omitempty"`
2342
2343
2344 DetailsUrl string `json:"detailsUrl,omitempty"`
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357 DistributionChannel string `json:"distributionChannel,omitempty"`
2358
2359
2360
2361
2362
2363 Features []string `json:"features,omitempty"`
2364
2365 FullDescription string `json:"fullDescription,omitempty"`
2366
2367
2368 IconUrl string `json:"iconUrl,omitempty"`
2369
2370
2371 LastUpdatedTimestampMillis int64 `json:"lastUpdatedTimestampMillis,omitempty,string"`
2372
2373 MinAndroidSdkVersion int64 `json:"minAndroidSdkVersion,omitempty"`
2374
2375 Permissions []*ProductPermission `json:"permissions,omitempty"`
2376
2377
2378 ProductId string `json:"productId,omitempty"`
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391 ProductPricing string `json:"productPricing,omitempty"`
2392
2393 RecentChanges string `json:"recentChanges,omitempty"`
2394
2395 RequiresContainerApp bool `json:"requiresContainerApp,omitempty"`
2396
2397 ScreenshotUrls []string `json:"screenshotUrls,omitempty"`
2398
2399 SigningCertificate *ProductSigningCertificate `json:"signingCertificate,omitempty"`
2400
2401
2402 SmallIconUrl string `json:"smallIconUrl,omitempty"`
2403
2404 Title string `json:"title,omitempty"`
2405
2406
2407 WorkDetailsUrl string `json:"workDetailsUrl,omitempty"`
2408
2409
2410 googleapi.ServerResponse `json:"-"`
2411
2412
2413
2414
2415
2416 ForceSendFields []string `json:"-"`
2417
2418
2419
2420
2421 NullFields []string `json:"-"`
2422 }
2423
2424 func (s *Product) MarshalJSON() ([]byte, error) {
2425 type NoMethod Product
2426 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2427 }
2428
2429
2430
2431 type ProductApprovalEvent struct {
2432
2433
2434
2435
2436
2437
2438
2439 Approved string `json:"approved,omitempty"`
2440
2441
2442 ProductId string `json:"productId,omitempty"`
2443
2444
2445
2446
2447
2448 ForceSendFields []string `json:"-"`
2449
2450
2451
2452
2453 NullFields []string `json:"-"`
2454 }
2455
2456 func (s *ProductApprovalEvent) MarshalJSON() ([]byte, error) {
2457 type NoMethod ProductApprovalEvent
2458 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2459 }
2460
2461
2462
2463 type ProductAvailabilityChangeEvent struct {
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473 AvailabilityStatus string `json:"availabilityStatus,omitempty"`
2474
2475
2476 ProductId string `json:"productId,omitempty"`
2477
2478
2479
2480
2481
2482 ForceSendFields []string `json:"-"`
2483
2484
2485
2486
2487 NullFields []string `json:"-"`
2488 }
2489
2490 func (s *ProductAvailabilityChangeEvent) MarshalJSON() ([]byte, error) {
2491 type NoMethod ProductAvailabilityChangeEvent
2492 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2493 }
2494
2495
2496
2497
2498
2499
2500 type ProductPermission struct {
2501
2502 PermissionId string `json:"permissionId,omitempty"`
2503
2504
2505
2506
2507
2508
2509 State string `json:"state,omitempty"`
2510
2511
2512
2513
2514
2515 ForceSendFields []string `json:"-"`
2516
2517
2518
2519
2520 NullFields []string `json:"-"`
2521 }
2522
2523 func (s *ProductPermission) MarshalJSON() ([]byte, error) {
2524 type NoMethod ProductPermission
2525 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2526 }
2527
2528
2529
2530 type ProductPermissions struct {
2531
2532 Permission []*ProductPermission `json:"permission,omitempty"`
2533
2534
2535 ProductId string `json:"productId,omitempty"`
2536
2537
2538 googleapi.ServerResponse `json:"-"`
2539
2540
2541
2542
2543
2544 ForceSendFields []string `json:"-"`
2545
2546
2547
2548
2549 NullFields []string `json:"-"`
2550 }
2551
2552 func (s *ProductPermissions) MarshalJSON() ([]byte, error) {
2553 type NoMethod ProductPermissions
2554 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2555 }
2556
2557
2558 type ProductPolicy struct {
2559
2560 AutoInstallPolicy *AutoInstallPolicy `json:"autoInstallPolicy,omitempty"`
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585 AutoUpdateMode string `json:"autoUpdateMode,omitempty"`
2586
2587
2588
2589
2590
2591 EnterpriseAuthenticationAppLinkConfigs []*EnterpriseAuthenticationAppLinkConfig `json:"enterpriseAuthenticationAppLinkConfigs,omitempty"`
2592
2593 ManagedConfiguration *ManagedConfiguration `json:"managedConfiguration,omitempty"`
2594
2595 ProductId string `json:"productId,omitempty"`
2596
2597
2598
2599 TrackIds []string `json:"trackIds,omitempty"`
2600
2601
2602
2603
2604
2605
2606
2607 Tracks []string `json:"tracks,omitempty"`
2608
2609
2610
2611
2612
2613 ForceSendFields []string `json:"-"`
2614
2615
2616
2617
2618 NullFields []string `json:"-"`
2619 }
2620
2621 func (s *ProductPolicy) MarshalJSON() ([]byte, error) {
2622 type NoMethod ProductPolicy
2623 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2624 }
2625
2626
2627 type ProductSet struct {
2628
2629 ProductId []string `json:"productId,omitempty"`
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651 ProductSetBehavior string `json:"productSetBehavior,omitempty"`
2652
2653
2654
2655
2656
2657
2658 ProductVisibility []*ProductVisibility `json:"productVisibility,omitempty"`
2659
2660
2661 googleapi.ServerResponse `json:"-"`
2662
2663
2664
2665
2666
2667 ForceSendFields []string `json:"-"`
2668
2669
2670
2671
2672 NullFields []string `json:"-"`
2673 }
2674
2675 func (s *ProductSet) MarshalJSON() ([]byte, error) {
2676 type NoMethod ProductSet
2677 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2678 }
2679
2680 type ProductSigningCertificate struct {
2681
2682
2683
2684 CertificateHashSha1 string `json:"certificateHashSha1,omitempty"`
2685
2686
2687 CertificateHashSha256 string `json:"certificateHashSha256,omitempty"`
2688
2689
2690
2691
2692
2693 ForceSendFields []string `json:"-"`
2694
2695
2696
2697
2698 NullFields []string `json:"-"`
2699 }
2700
2701 func (s *ProductSigningCertificate) MarshalJSON() ([]byte, error) {
2702 type NoMethod ProductSigningCertificate
2703 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2704 }
2705
2706
2707 type ProductVisibility struct {
2708
2709
2710 ProductId string `json:"productId,omitempty"`
2711
2712
2713 TrackIds []string `json:"trackIds,omitempty"`
2714
2715
2716
2717
2718
2719
2720
2721 Tracks []string `json:"tracks,omitempty"`
2722
2723
2724
2725
2726
2727 ForceSendFields []string `json:"-"`
2728
2729
2730
2731
2732 NullFields []string `json:"-"`
2733 }
2734
2735 func (s *ProductVisibility) MarshalJSON() ([]byte, error) {
2736 type NoMethod ProductVisibility
2737 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2738 }
2739
2740 type ProductsApproveRequest struct {
2741
2742
2743
2744
2745
2746
2747 ApprovalUrlInfo *ApprovalUrlInfo `json:"approvalUrlInfo,omitempty"`
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762 ApprovedPermissions string `json:"approvedPermissions,omitempty"`
2763
2764
2765
2766
2767
2768 ForceSendFields []string `json:"-"`
2769
2770
2771
2772
2773 NullFields []string `json:"-"`
2774 }
2775
2776 func (s *ProductsApproveRequest) MarshalJSON() ([]byte, error) {
2777 type NoMethod ProductsApproveRequest
2778 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2779 }
2780
2781 type ProductsGenerateApprovalUrlResponse struct {
2782
2783
2784
2785
2786
2787
2788
2789
2790 Url string `json:"url,omitempty"`
2791
2792
2793 googleapi.ServerResponse `json:"-"`
2794
2795
2796
2797
2798
2799 ForceSendFields []string `json:"-"`
2800
2801
2802
2803
2804 NullFields []string `json:"-"`
2805 }
2806
2807 func (s *ProductsGenerateApprovalUrlResponse) MarshalJSON() ([]byte, error) {
2808 type NoMethod ProductsGenerateApprovalUrlResponse
2809 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2810 }
2811
2812 type ProductsListResponse struct {
2813
2814 PageInfo *PageInfo `json:"pageInfo,omitempty"`
2815
2816
2817 Product []*Product `json:"product,omitempty"`
2818
2819 TokenPagination *TokenPagination `json:"tokenPagination,omitempty"`
2820
2821
2822 googleapi.ServerResponse `json:"-"`
2823
2824
2825
2826
2827
2828 ForceSendFields []string `json:"-"`
2829
2830
2831
2832
2833 NullFields []string `json:"-"`
2834 }
2835
2836 func (s *ProductsListResponse) MarshalJSON() ([]byte, error) {
2837 type NoMethod ProductsListResponse
2838 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2839 }
2840
2841
2842
2843 type ServiceAccount struct {
2844
2845 Key *ServiceAccountKey `json:"key,omitempty"`
2846
2847
2848 Name string `json:"name,omitempty"`
2849
2850
2851 googleapi.ServerResponse `json:"-"`
2852
2853
2854
2855
2856
2857 ForceSendFields []string `json:"-"`
2858
2859
2860
2861
2862 NullFields []string `json:"-"`
2863 }
2864
2865 func (s *ServiceAccount) MarshalJSON() ([]byte, error) {
2866 type NoMethod ServiceAccount
2867 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2868 }
2869
2870
2871
2872 type ServiceAccountKey struct {
2873
2874
2875
2876 Data string `json:"data,omitempty"`
2877
2878
2879 Id string `json:"id,omitempty"`
2880
2881
2882
2883
2884 PublicData string `json:"publicData,omitempty"`
2885
2886
2887
2888
2889
2890
2891
2892
2893 Type string `json:"type,omitempty"`
2894
2895
2896 googleapi.ServerResponse `json:"-"`
2897
2898
2899
2900
2901
2902 ForceSendFields []string `json:"-"`
2903
2904
2905
2906
2907 NullFields []string `json:"-"`
2908 }
2909
2910 func (s *ServiceAccountKey) MarshalJSON() ([]byte, error) {
2911 type NoMethod ServiceAccountKey
2912 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2913 }
2914
2915 type ServiceAccountKeysListResponse struct {
2916
2917 ServiceAccountKey []*ServiceAccountKey `json:"serviceAccountKey,omitempty"`
2918
2919
2920 googleapi.ServerResponse `json:"-"`
2921
2922
2923
2924
2925
2926 ForceSendFields []string `json:"-"`
2927
2928
2929
2930
2931 NullFields []string `json:"-"`
2932 }
2933
2934 func (s *ServiceAccountKeysListResponse) MarshalJSON() ([]byte, error) {
2935 type NoMethod ServiceAccountKeysListResponse
2936 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2937 }
2938
2939
2940
2941 type SignupInfo struct {
2942
2943
2944 CompletionToken string `json:"completionToken,omitempty"`
2945
2946 Kind string `json:"kind,omitempty"`
2947
2948
2949 Url string `json:"url,omitempty"`
2950
2951
2952 googleapi.ServerResponse `json:"-"`
2953
2954
2955
2956
2957
2958 ForceSendFields []string `json:"-"`
2959
2960
2961
2962
2963 NullFields []string `json:"-"`
2964 }
2965
2966 func (s *SignupInfo) MarshalJSON() ([]byte, error) {
2967 type NoMethod SignupInfo
2968 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2969 }
2970
2971
2972
2973 type StoreCluster struct {
2974
2975
2976 Id string `json:"id,omitempty"`
2977
2978
2979
2980 Name []*LocalizedText `json:"name,omitempty"`
2981
2982
2983
2984
2985
2986
2987 OrderInPage string `json:"orderInPage,omitempty"`
2988
2989
2990 ProductId []string `json:"productId,omitempty"`
2991
2992
2993 googleapi.ServerResponse `json:"-"`
2994
2995
2996
2997
2998
2999 ForceSendFields []string `json:"-"`
3000
3001
3002
3003
3004 NullFields []string `json:"-"`
3005 }
3006
3007 func (s *StoreCluster) MarshalJSON() ([]byte, error) {
3008 type NoMethod StoreCluster
3009 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3010 }
3011
3012
3013
3014
3015 type StoreLayout struct {
3016
3017
3018
3019
3020 HomepageId string `json:"homepageId,omitempty"`
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030 StoreLayoutType string `json:"storeLayoutType,omitempty"`
3031
3032
3033 googleapi.ServerResponse `json:"-"`
3034
3035
3036
3037
3038
3039 ForceSendFields []string `json:"-"`
3040
3041
3042
3043
3044 NullFields []string `json:"-"`
3045 }
3046
3047 func (s *StoreLayout) MarshalJSON() ([]byte, error) {
3048 type NoMethod StoreLayout
3049 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3050 }
3051
3052 type StoreLayoutClustersListResponse struct {
3053
3054 Cluster []*StoreCluster `json:"cluster,omitempty"`
3055
3056
3057 googleapi.ServerResponse `json:"-"`
3058
3059
3060
3061
3062
3063 ForceSendFields []string `json:"-"`
3064
3065
3066
3067
3068 NullFields []string `json:"-"`
3069 }
3070
3071 func (s *StoreLayoutClustersListResponse) MarshalJSON() ([]byte, error) {
3072 type NoMethod StoreLayoutClustersListResponse
3073 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3074 }
3075
3076 type StoreLayoutPagesListResponse struct {
3077
3078 Page []*StorePage `json:"page,omitempty"`
3079
3080
3081 googleapi.ServerResponse `json:"-"`
3082
3083
3084
3085
3086
3087 ForceSendFields []string `json:"-"`
3088
3089
3090
3091
3092 NullFields []string `json:"-"`
3093 }
3094
3095 func (s *StoreLayoutPagesListResponse) MarshalJSON() ([]byte, error) {
3096 type NoMethod StoreLayoutPagesListResponse
3097 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3098 }
3099
3100
3101
3102
3103
3104
3105
3106 type StorePage struct {
3107
3108 Id string `json:"id,omitempty"`
3109
3110
3111
3112
3113 Link []string `json:"link,omitempty"`
3114
3115
3116
3117 Name []*LocalizedText `json:"name,omitempty"`
3118
3119
3120 googleapi.ServerResponse `json:"-"`
3121
3122
3123
3124
3125
3126 ForceSendFields []string `json:"-"`
3127
3128
3129
3130
3131 NullFields []string `json:"-"`
3132 }
3133
3134 func (s *StorePage) MarshalJSON() ([]byte, error) {
3135 type NoMethod StorePage
3136 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3137 }
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148 type TokenPagination struct {
3149
3150
3151 NextPageToken string `json:"nextPageToken,omitempty"`
3152 PreviousPageToken string `json:"previousPageToken,omitempty"`
3153
3154
3155
3156
3157
3158 ForceSendFields []string `json:"-"`
3159
3160
3161
3162
3163 NullFields []string `json:"-"`
3164 }
3165
3166 func (s *TokenPagination) MarshalJSON() ([]byte, error) {
3167 type NoMethod TokenPagination
3168 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3169 }
3170
3171
3172 type TrackInfo struct {
3173
3174
3175 TrackAlias string `json:"trackAlias,omitempty"`
3176
3177
3178
3179 TrackId string `json:"trackId,omitempty"`
3180
3181
3182
3183
3184
3185 ForceSendFields []string `json:"-"`
3186
3187
3188
3189
3190 NullFields []string `json:"-"`
3191 }
3192
3193 func (s *TrackInfo) MarshalJSON() ([]byte, error) {
3194 type NoMethod TrackInfo
3195 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3196 }
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207 type User struct {
3208
3209
3210
3211
3212 AccountIdentifier string `json:"accountIdentifier,omitempty"`
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222 AccountType string `json:"accountType,omitempty"`
3223
3224
3225
3226
3227
3228 DisplayName string `json:"displayName,omitempty"`
3229
3230 Id string `json:"id,omitempty"`
3231
3232
3233
3234
3235
3236
3237
3238 ManagementType string `json:"managementType,omitempty"`
3239
3240
3241
3242 PrimaryEmail string `json:"primaryEmail,omitempty"`
3243
3244
3245 googleapi.ServerResponse `json:"-"`
3246
3247
3248
3249
3250
3251 ForceSendFields []string `json:"-"`
3252
3253
3254
3255
3256 NullFields []string `json:"-"`
3257 }
3258
3259 func (s *User) MarshalJSON() ([]byte, error) {
3260 type NoMethod User
3261 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3262 }
3263
3264 type UsersListResponse struct {
3265
3266 User []*User `json:"user,omitempty"`
3267
3268
3269 googleapi.ServerResponse `json:"-"`
3270
3271
3272
3273
3274
3275 ForceSendFields []string `json:"-"`
3276
3277
3278
3279
3280 NullFields []string `json:"-"`
3281 }
3282
3283 func (s *UsersListResponse) MarshalJSON() ([]byte, error) {
3284 type NoMethod UsersListResponse
3285 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3286 }
3287
3288
3289
3290
3291
3292 type VariableSet struct {
3293
3294 Placeholder string `json:"placeholder,omitempty"`
3295
3296 UserValue string `json:"userValue,omitempty"`
3297
3298
3299
3300
3301
3302 ForceSendFields []string `json:"-"`
3303
3304
3305
3306
3307 NullFields []string `json:"-"`
3308 }
3309
3310 func (s *VariableSet) MarshalJSON() ([]byte, error) {
3311 type NoMethod VariableSet
3312 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3313 }
3314
3315
3316
3317
3318 type WebApp struct {
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339 DisplayMode string `json:"displayMode,omitempty"`
3340
3341
3342 Icons []*WebAppIcon `json:"icons,omitempty"`
3343
3344
3345 IsPublished bool `json:"isPublished,omitempty"`
3346
3347
3348 StartUrl string `json:"startUrl,omitempty"`
3349
3350
3351 Title string `json:"title,omitempty"`
3352
3353
3354
3355 VersionCode int64 `json:"versionCode,omitempty,string"`
3356
3357
3358
3359 WebAppId string `json:"webAppId,omitempty"`
3360
3361
3362 googleapi.ServerResponse `json:"-"`
3363
3364
3365
3366
3367
3368 ForceSendFields []string `json:"-"`
3369
3370
3371
3372
3373 NullFields []string `json:"-"`
3374 }
3375
3376 func (s *WebApp) MarshalJSON() ([]byte, error) {
3377 type NoMethod WebApp
3378 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3379 }
3380
3381
3382 type WebAppIcon struct {
3383
3384
3385
3386
3387 ImageData string `json:"imageData,omitempty"`
3388
3389
3390
3391
3392
3393 ForceSendFields []string `json:"-"`
3394
3395
3396
3397
3398 NullFields []string `json:"-"`
3399 }
3400
3401 func (s *WebAppIcon) MarshalJSON() ([]byte, error) {
3402 type NoMethod WebAppIcon
3403 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3404 }
3405
3406 type WebAppsListResponse struct {
3407
3408 WebApp []*WebApp `json:"webApp,omitempty"`
3409
3410
3411 googleapi.ServerResponse `json:"-"`
3412
3413
3414
3415
3416
3417 ForceSendFields []string `json:"-"`
3418
3419
3420
3421
3422 NullFields []string `json:"-"`
3423 }
3424
3425 func (s *WebAppsListResponse) MarshalJSON() ([]byte, error) {
3426 type NoMethod WebAppsListResponse
3427 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3428 }
3429
3430 type DevicesForceReportUploadCall struct {
3431 s *Service
3432 enterpriseId string
3433 userId string
3434 deviceId string
3435 urlParams_ gensupport.URLParams
3436 ctx_ context.Context
3437 header_ http.Header
3438 }
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448 func (r *DevicesService) ForceReportUpload(enterpriseId string, userId string, deviceId string) *DevicesForceReportUploadCall {
3449 c := &DevicesForceReportUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3450 c.enterpriseId = enterpriseId
3451 c.userId = userId
3452 c.deviceId = deviceId
3453 return c
3454 }
3455
3456
3457
3458
3459 func (c *DevicesForceReportUploadCall) Fields(s ...googleapi.Field) *DevicesForceReportUploadCall {
3460 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3461 return c
3462 }
3463
3464
3465 func (c *DevicesForceReportUploadCall) Context(ctx context.Context) *DevicesForceReportUploadCall {
3466 c.ctx_ = ctx
3467 return c
3468 }
3469
3470
3471
3472 func (c *DevicesForceReportUploadCall) Header() http.Header {
3473 if c.header_ == nil {
3474 c.header_ = make(http.Header)
3475 }
3476 return c.header_
3477 }
3478
3479 func (c *DevicesForceReportUploadCall) doRequest(alt string) (*http.Response, error) {
3480 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3481 var body io.Reader = nil
3482 c.urlParams_.Set("alt", alt)
3483 c.urlParams_.Set("prettyPrint", "false")
3484 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/forceReportUpload")
3485 urls += "?" + c.urlParams_.Encode()
3486 req, err := http.NewRequest("POST", urls, body)
3487 if err != nil {
3488 return nil, err
3489 }
3490 req.Header = reqHeaders
3491 googleapi.Expand(req.URL, map[string]string{
3492 "enterpriseId": c.enterpriseId,
3493 "userId": c.userId,
3494 "deviceId": c.deviceId,
3495 })
3496 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3497 }
3498
3499
3500 func (c *DevicesForceReportUploadCall) Do(opts ...googleapi.CallOption) error {
3501 gensupport.SetOptions(c.urlParams_, opts...)
3502 res, err := c.doRequest("json")
3503 if err != nil {
3504 return err
3505 }
3506 defer googleapi.CloseBody(res)
3507 if err := googleapi.CheckResponse(res); err != nil {
3508 return gensupport.WrapError(err)
3509 }
3510 return nil
3511 }
3512
3513 type DevicesGetCall struct {
3514 s *Service
3515 enterpriseId string
3516 userId string
3517 deviceId string
3518 urlParams_ gensupport.URLParams
3519 ifNoneMatch_ string
3520 ctx_ context.Context
3521 header_ http.Header
3522 }
3523
3524
3525
3526
3527
3528
3529 func (r *DevicesService) Get(enterpriseId string, userId string, deviceId string) *DevicesGetCall {
3530 c := &DevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3531 c.enterpriseId = enterpriseId
3532 c.userId = userId
3533 c.deviceId = deviceId
3534 return c
3535 }
3536
3537
3538
3539
3540 func (c *DevicesGetCall) Fields(s ...googleapi.Field) *DevicesGetCall {
3541 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3542 return c
3543 }
3544
3545
3546
3547
3548 func (c *DevicesGetCall) IfNoneMatch(entityTag string) *DevicesGetCall {
3549 c.ifNoneMatch_ = entityTag
3550 return c
3551 }
3552
3553
3554 func (c *DevicesGetCall) Context(ctx context.Context) *DevicesGetCall {
3555 c.ctx_ = ctx
3556 return c
3557 }
3558
3559
3560
3561 func (c *DevicesGetCall) Header() http.Header {
3562 if c.header_ == nil {
3563 c.header_ = make(http.Header)
3564 }
3565 return c.header_
3566 }
3567
3568 func (c *DevicesGetCall) doRequest(alt string) (*http.Response, error) {
3569 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3570 if c.ifNoneMatch_ != "" {
3571 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3572 }
3573 var body io.Reader = nil
3574 c.urlParams_.Set("alt", alt)
3575 c.urlParams_.Set("prettyPrint", "false")
3576 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}")
3577 urls += "?" + c.urlParams_.Encode()
3578 req, err := http.NewRequest("GET", urls, body)
3579 if err != nil {
3580 return nil, err
3581 }
3582 req.Header = reqHeaders
3583 googleapi.Expand(req.URL, map[string]string{
3584 "enterpriseId": c.enterpriseId,
3585 "userId": c.userId,
3586 "deviceId": c.deviceId,
3587 })
3588 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3589 }
3590
3591
3592
3593
3594
3595
3596 func (c *DevicesGetCall) Do(opts ...googleapi.CallOption) (*Device, error) {
3597 gensupport.SetOptions(c.urlParams_, opts...)
3598 res, err := c.doRequest("json")
3599 if res != nil && res.StatusCode == http.StatusNotModified {
3600 if res.Body != nil {
3601 res.Body.Close()
3602 }
3603 return nil, gensupport.WrapError(&googleapi.Error{
3604 Code: res.StatusCode,
3605 Header: res.Header,
3606 })
3607 }
3608 if err != nil {
3609 return nil, err
3610 }
3611 defer googleapi.CloseBody(res)
3612 if err := googleapi.CheckResponse(res); err != nil {
3613 return nil, gensupport.WrapError(err)
3614 }
3615 ret := &Device{
3616 ServerResponse: googleapi.ServerResponse{
3617 Header: res.Header,
3618 HTTPStatusCode: res.StatusCode,
3619 },
3620 }
3621 target := &ret
3622 if err := gensupport.DecodeResponse(target, res); err != nil {
3623 return nil, err
3624 }
3625 return ret, nil
3626 }
3627
3628 type DevicesGetStateCall struct {
3629 s *Service
3630 enterpriseId string
3631 userId string
3632 deviceId string
3633 urlParams_ gensupport.URLParams
3634 ifNoneMatch_ string
3635 ctx_ context.Context
3636 header_ http.Header
3637 }
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648 func (r *DevicesService) GetState(enterpriseId string, userId string, deviceId string) *DevicesGetStateCall {
3649 c := &DevicesGetStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3650 c.enterpriseId = enterpriseId
3651 c.userId = userId
3652 c.deviceId = deviceId
3653 return c
3654 }
3655
3656
3657
3658
3659 func (c *DevicesGetStateCall) Fields(s ...googleapi.Field) *DevicesGetStateCall {
3660 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3661 return c
3662 }
3663
3664
3665
3666
3667 func (c *DevicesGetStateCall) IfNoneMatch(entityTag string) *DevicesGetStateCall {
3668 c.ifNoneMatch_ = entityTag
3669 return c
3670 }
3671
3672
3673 func (c *DevicesGetStateCall) Context(ctx context.Context) *DevicesGetStateCall {
3674 c.ctx_ = ctx
3675 return c
3676 }
3677
3678
3679
3680 func (c *DevicesGetStateCall) Header() http.Header {
3681 if c.header_ == nil {
3682 c.header_ = make(http.Header)
3683 }
3684 return c.header_
3685 }
3686
3687 func (c *DevicesGetStateCall) doRequest(alt string) (*http.Response, error) {
3688 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3689 if c.ifNoneMatch_ != "" {
3690 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3691 }
3692 var body io.Reader = nil
3693 c.urlParams_.Set("alt", alt)
3694 c.urlParams_.Set("prettyPrint", "false")
3695 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state")
3696 urls += "?" + c.urlParams_.Encode()
3697 req, err := http.NewRequest("GET", urls, body)
3698 if err != nil {
3699 return nil, err
3700 }
3701 req.Header = reqHeaders
3702 googleapi.Expand(req.URL, map[string]string{
3703 "enterpriseId": c.enterpriseId,
3704 "userId": c.userId,
3705 "deviceId": c.deviceId,
3706 })
3707 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3708 }
3709
3710
3711
3712
3713
3714
3715 func (c *DevicesGetStateCall) Do(opts ...googleapi.CallOption) (*DeviceState, error) {
3716 gensupport.SetOptions(c.urlParams_, opts...)
3717 res, err := c.doRequest("json")
3718 if res != nil && res.StatusCode == http.StatusNotModified {
3719 if res.Body != nil {
3720 res.Body.Close()
3721 }
3722 return nil, gensupport.WrapError(&googleapi.Error{
3723 Code: res.StatusCode,
3724 Header: res.Header,
3725 })
3726 }
3727 if err != nil {
3728 return nil, err
3729 }
3730 defer googleapi.CloseBody(res)
3731 if err := googleapi.CheckResponse(res); err != nil {
3732 return nil, gensupport.WrapError(err)
3733 }
3734 ret := &DeviceState{
3735 ServerResponse: googleapi.ServerResponse{
3736 Header: res.Header,
3737 HTTPStatusCode: res.StatusCode,
3738 },
3739 }
3740 target := &ret
3741 if err := gensupport.DecodeResponse(target, res); err != nil {
3742 return nil, err
3743 }
3744 return ret, nil
3745 }
3746
3747 type DevicesListCall struct {
3748 s *Service
3749 enterpriseId string
3750 userId string
3751 urlParams_ gensupport.URLParams
3752 ifNoneMatch_ string
3753 ctx_ context.Context
3754 header_ http.Header
3755 }
3756
3757
3758
3759
3760
3761 func (r *DevicesService) List(enterpriseId string, userId string) *DevicesListCall {
3762 c := &DevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3763 c.enterpriseId = enterpriseId
3764 c.userId = userId
3765 return c
3766 }
3767
3768
3769
3770
3771 func (c *DevicesListCall) Fields(s ...googleapi.Field) *DevicesListCall {
3772 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3773 return c
3774 }
3775
3776
3777
3778
3779 func (c *DevicesListCall) IfNoneMatch(entityTag string) *DevicesListCall {
3780 c.ifNoneMatch_ = entityTag
3781 return c
3782 }
3783
3784
3785 func (c *DevicesListCall) Context(ctx context.Context) *DevicesListCall {
3786 c.ctx_ = ctx
3787 return c
3788 }
3789
3790
3791
3792 func (c *DevicesListCall) Header() http.Header {
3793 if c.header_ == nil {
3794 c.header_ = make(http.Header)
3795 }
3796 return c.header_
3797 }
3798
3799 func (c *DevicesListCall) doRequest(alt string) (*http.Response, error) {
3800 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3801 if c.ifNoneMatch_ != "" {
3802 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3803 }
3804 var body io.Reader = nil
3805 c.urlParams_.Set("alt", alt)
3806 c.urlParams_.Set("prettyPrint", "false")
3807 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices")
3808 urls += "?" + c.urlParams_.Encode()
3809 req, err := http.NewRequest("GET", urls, body)
3810 if err != nil {
3811 return nil, err
3812 }
3813 req.Header = reqHeaders
3814 googleapi.Expand(req.URL, map[string]string{
3815 "enterpriseId": c.enterpriseId,
3816 "userId": c.userId,
3817 })
3818 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3819 }
3820
3821
3822
3823
3824
3825
3826
3827 func (c *DevicesListCall) Do(opts ...googleapi.CallOption) (*DevicesListResponse, error) {
3828 gensupport.SetOptions(c.urlParams_, opts...)
3829 res, err := c.doRequest("json")
3830 if res != nil && res.StatusCode == http.StatusNotModified {
3831 if res.Body != nil {
3832 res.Body.Close()
3833 }
3834 return nil, gensupport.WrapError(&googleapi.Error{
3835 Code: res.StatusCode,
3836 Header: res.Header,
3837 })
3838 }
3839 if err != nil {
3840 return nil, err
3841 }
3842 defer googleapi.CloseBody(res)
3843 if err := googleapi.CheckResponse(res); err != nil {
3844 return nil, gensupport.WrapError(err)
3845 }
3846 ret := &DevicesListResponse{
3847 ServerResponse: googleapi.ServerResponse{
3848 Header: res.Header,
3849 HTTPStatusCode: res.StatusCode,
3850 },
3851 }
3852 target := &ret
3853 if err := gensupport.DecodeResponse(target, res); err != nil {
3854 return nil, err
3855 }
3856 return ret, nil
3857 }
3858
3859 type DevicesSetStateCall struct {
3860 s *Service
3861 enterpriseId string
3862 userId string
3863 deviceId string
3864 devicestate *DeviceState
3865 urlParams_ gensupport.URLParams
3866 ctx_ context.Context
3867 header_ http.Header
3868 }
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879 func (r *DevicesService) SetState(enterpriseId string, userId string, deviceId string, devicestate *DeviceState) *DevicesSetStateCall {
3880 c := &DevicesSetStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3881 c.enterpriseId = enterpriseId
3882 c.userId = userId
3883 c.deviceId = deviceId
3884 c.devicestate = devicestate
3885 return c
3886 }
3887
3888
3889
3890
3891 func (c *DevicesSetStateCall) Fields(s ...googleapi.Field) *DevicesSetStateCall {
3892 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3893 return c
3894 }
3895
3896
3897 func (c *DevicesSetStateCall) Context(ctx context.Context) *DevicesSetStateCall {
3898 c.ctx_ = ctx
3899 return c
3900 }
3901
3902
3903
3904 func (c *DevicesSetStateCall) Header() http.Header {
3905 if c.header_ == nil {
3906 c.header_ = make(http.Header)
3907 }
3908 return c.header_
3909 }
3910
3911 func (c *DevicesSetStateCall) doRequest(alt string) (*http.Response, error) {
3912 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3913 var body io.Reader = nil
3914 body, err := googleapi.WithoutDataWrapper.JSONReader(c.devicestate)
3915 if err != nil {
3916 return nil, err
3917 }
3918 c.urlParams_.Set("alt", alt)
3919 c.urlParams_.Set("prettyPrint", "false")
3920 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state")
3921 urls += "?" + c.urlParams_.Encode()
3922 req, err := http.NewRequest("PUT", urls, body)
3923 if err != nil {
3924 return nil, err
3925 }
3926 req.Header = reqHeaders
3927 googleapi.Expand(req.URL, map[string]string{
3928 "enterpriseId": c.enterpriseId,
3929 "userId": c.userId,
3930 "deviceId": c.deviceId,
3931 })
3932 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3933 }
3934
3935
3936
3937
3938
3939
3940 func (c *DevicesSetStateCall) Do(opts ...googleapi.CallOption) (*DeviceState, error) {
3941 gensupport.SetOptions(c.urlParams_, opts...)
3942 res, err := c.doRequest("json")
3943 if res != nil && res.StatusCode == http.StatusNotModified {
3944 if res.Body != nil {
3945 res.Body.Close()
3946 }
3947 return nil, gensupport.WrapError(&googleapi.Error{
3948 Code: res.StatusCode,
3949 Header: res.Header,
3950 })
3951 }
3952 if err != nil {
3953 return nil, err
3954 }
3955 defer googleapi.CloseBody(res)
3956 if err := googleapi.CheckResponse(res); err != nil {
3957 return nil, gensupport.WrapError(err)
3958 }
3959 ret := &DeviceState{
3960 ServerResponse: googleapi.ServerResponse{
3961 Header: res.Header,
3962 HTTPStatusCode: res.StatusCode,
3963 },
3964 }
3965 target := &ret
3966 if err := gensupport.DecodeResponse(target, res); err != nil {
3967 return nil, err
3968 }
3969 return ret, nil
3970 }
3971
3972 type DevicesUpdateCall struct {
3973 s *Service
3974 enterpriseId string
3975 userId string
3976 deviceId string
3977 device *Device
3978 urlParams_ gensupport.URLParams
3979 ctx_ context.Context
3980 header_ http.Header
3981 }
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994 func (r *DevicesService) Update(enterpriseId string, userId string, deviceId string, device *Device) *DevicesUpdateCall {
3995 c := &DevicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3996 c.enterpriseId = enterpriseId
3997 c.userId = userId
3998 c.deviceId = deviceId
3999 c.device = device
4000 return c
4001 }
4002
4003
4004
4005
4006
4007 func (c *DevicesUpdateCall) UpdateMask(updateMask string) *DevicesUpdateCall {
4008 c.urlParams_.Set("updateMask", updateMask)
4009 return c
4010 }
4011
4012
4013
4014
4015 func (c *DevicesUpdateCall) Fields(s ...googleapi.Field) *DevicesUpdateCall {
4016 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4017 return c
4018 }
4019
4020
4021 func (c *DevicesUpdateCall) Context(ctx context.Context) *DevicesUpdateCall {
4022 c.ctx_ = ctx
4023 return c
4024 }
4025
4026
4027
4028 func (c *DevicesUpdateCall) Header() http.Header {
4029 if c.header_ == nil {
4030 c.header_ = make(http.Header)
4031 }
4032 return c.header_
4033 }
4034
4035 func (c *DevicesUpdateCall) doRequest(alt string) (*http.Response, error) {
4036 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4037 var body io.Reader = nil
4038 body, err := googleapi.WithoutDataWrapper.JSONReader(c.device)
4039 if err != nil {
4040 return nil, err
4041 }
4042 c.urlParams_.Set("alt", alt)
4043 c.urlParams_.Set("prettyPrint", "false")
4044 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}")
4045 urls += "?" + c.urlParams_.Encode()
4046 req, err := http.NewRequest("PUT", urls, body)
4047 if err != nil {
4048 return nil, err
4049 }
4050 req.Header = reqHeaders
4051 googleapi.Expand(req.URL, map[string]string{
4052 "enterpriseId": c.enterpriseId,
4053 "userId": c.userId,
4054 "deviceId": c.deviceId,
4055 })
4056 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4057 }
4058
4059
4060
4061
4062
4063
4064 func (c *DevicesUpdateCall) Do(opts ...googleapi.CallOption) (*Device, error) {
4065 gensupport.SetOptions(c.urlParams_, opts...)
4066 res, err := c.doRequest("json")
4067 if res != nil && res.StatusCode == http.StatusNotModified {
4068 if res.Body != nil {
4069 res.Body.Close()
4070 }
4071 return nil, gensupport.WrapError(&googleapi.Error{
4072 Code: res.StatusCode,
4073 Header: res.Header,
4074 })
4075 }
4076 if err != nil {
4077 return nil, err
4078 }
4079 defer googleapi.CloseBody(res)
4080 if err := googleapi.CheckResponse(res); err != nil {
4081 return nil, gensupport.WrapError(err)
4082 }
4083 ret := &Device{
4084 ServerResponse: googleapi.ServerResponse{
4085 Header: res.Header,
4086 HTTPStatusCode: res.StatusCode,
4087 },
4088 }
4089 target := &ret
4090 if err := gensupport.DecodeResponse(target, res); err != nil {
4091 return nil, err
4092 }
4093 return ret, nil
4094 }
4095
4096 type EnterprisesAcknowledgeNotificationSetCall struct {
4097 s *Service
4098 urlParams_ gensupport.URLParams
4099 ctx_ context.Context
4100 header_ http.Header
4101 }
4102
4103
4104
4105
4106 func (r *EnterprisesService) AcknowledgeNotificationSet() *EnterprisesAcknowledgeNotificationSetCall {
4107 c := &EnterprisesAcknowledgeNotificationSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4108 return c
4109 }
4110
4111
4112
4113
4114 func (c *EnterprisesAcknowledgeNotificationSetCall) NotificationSetId(notificationSetId string) *EnterprisesAcknowledgeNotificationSetCall {
4115 c.urlParams_.Set("notificationSetId", notificationSetId)
4116 return c
4117 }
4118
4119
4120
4121
4122 func (c *EnterprisesAcknowledgeNotificationSetCall) Fields(s ...googleapi.Field) *EnterprisesAcknowledgeNotificationSetCall {
4123 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4124 return c
4125 }
4126
4127
4128 func (c *EnterprisesAcknowledgeNotificationSetCall) Context(ctx context.Context) *EnterprisesAcknowledgeNotificationSetCall {
4129 c.ctx_ = ctx
4130 return c
4131 }
4132
4133
4134
4135 func (c *EnterprisesAcknowledgeNotificationSetCall) Header() http.Header {
4136 if c.header_ == nil {
4137 c.header_ = make(http.Header)
4138 }
4139 return c.header_
4140 }
4141
4142 func (c *EnterprisesAcknowledgeNotificationSetCall) doRequest(alt string) (*http.Response, error) {
4143 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4144 var body io.Reader = nil
4145 c.urlParams_.Set("alt", alt)
4146 c.urlParams_.Set("prettyPrint", "false")
4147 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/acknowledgeNotificationSet")
4148 urls += "?" + c.urlParams_.Encode()
4149 req, err := http.NewRequest("POST", urls, body)
4150 if err != nil {
4151 return nil, err
4152 }
4153 req.Header = reqHeaders
4154 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4155 }
4156
4157
4158 func (c *EnterprisesAcknowledgeNotificationSetCall) Do(opts ...googleapi.CallOption) error {
4159 gensupport.SetOptions(c.urlParams_, opts...)
4160 res, err := c.doRequest("json")
4161 if err != nil {
4162 return err
4163 }
4164 defer googleapi.CloseBody(res)
4165 if err := googleapi.CheckResponse(res); err != nil {
4166 return gensupport.WrapError(err)
4167 }
4168 return nil
4169 }
4170
4171 type EnterprisesCompleteSignupCall struct {
4172 s *Service
4173 urlParams_ gensupport.URLParams
4174 ctx_ context.Context
4175 header_ http.Header
4176 }
4177
4178
4179
4180
4181 func (r *EnterprisesService) CompleteSignup() *EnterprisesCompleteSignupCall {
4182 c := &EnterprisesCompleteSignupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4183 return c
4184 }
4185
4186
4187
4188 func (c *EnterprisesCompleteSignupCall) CompletionToken(completionToken string) *EnterprisesCompleteSignupCall {
4189 c.urlParams_.Set("completionToken", completionToken)
4190 return c
4191 }
4192
4193
4194
4195 func (c *EnterprisesCompleteSignupCall) EnterpriseToken(enterpriseToken string) *EnterprisesCompleteSignupCall {
4196 c.urlParams_.Set("enterpriseToken", enterpriseToken)
4197 return c
4198 }
4199
4200
4201
4202
4203 func (c *EnterprisesCompleteSignupCall) Fields(s ...googleapi.Field) *EnterprisesCompleteSignupCall {
4204 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4205 return c
4206 }
4207
4208
4209 func (c *EnterprisesCompleteSignupCall) Context(ctx context.Context) *EnterprisesCompleteSignupCall {
4210 c.ctx_ = ctx
4211 return c
4212 }
4213
4214
4215
4216 func (c *EnterprisesCompleteSignupCall) Header() http.Header {
4217 if c.header_ == nil {
4218 c.header_ = make(http.Header)
4219 }
4220 return c.header_
4221 }
4222
4223 func (c *EnterprisesCompleteSignupCall) doRequest(alt string) (*http.Response, error) {
4224 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4225 var body io.Reader = nil
4226 c.urlParams_.Set("alt", alt)
4227 c.urlParams_.Set("prettyPrint", "false")
4228 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/completeSignup")
4229 urls += "?" + c.urlParams_.Encode()
4230 req, err := http.NewRequest("POST", urls, body)
4231 if err != nil {
4232 return nil, err
4233 }
4234 req.Header = reqHeaders
4235 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4236 }
4237
4238
4239
4240
4241
4242
4243 func (c *EnterprisesCompleteSignupCall) Do(opts ...googleapi.CallOption) (*Enterprise, error) {
4244 gensupport.SetOptions(c.urlParams_, opts...)
4245 res, err := c.doRequest("json")
4246 if res != nil && res.StatusCode == http.StatusNotModified {
4247 if res.Body != nil {
4248 res.Body.Close()
4249 }
4250 return nil, gensupport.WrapError(&googleapi.Error{
4251 Code: res.StatusCode,
4252 Header: res.Header,
4253 })
4254 }
4255 if err != nil {
4256 return nil, err
4257 }
4258 defer googleapi.CloseBody(res)
4259 if err := googleapi.CheckResponse(res); err != nil {
4260 return nil, gensupport.WrapError(err)
4261 }
4262 ret := &Enterprise{
4263 ServerResponse: googleapi.ServerResponse{
4264 Header: res.Header,
4265 HTTPStatusCode: res.StatusCode,
4266 },
4267 }
4268 target := &ret
4269 if err := gensupport.DecodeResponse(target, res); err != nil {
4270 return nil, err
4271 }
4272 return ret, nil
4273 }
4274
4275 type EnterprisesCreateEnrollmentTokenCall struct {
4276 s *Service
4277 enterpriseId string
4278 urlParams_ gensupport.URLParams
4279 ctx_ context.Context
4280 header_ http.Header
4281 }
4282
4283
4284
4285
4286
4287
4288
4289 func (r *EnterprisesService) CreateEnrollmentToken(enterpriseId string) *EnterprisesCreateEnrollmentTokenCall {
4290 c := &EnterprisesCreateEnrollmentTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4291 c.enterpriseId = enterpriseId
4292 return c
4293 }
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303 func (c *EnterprisesCreateEnrollmentTokenCall) DeviceType(deviceType string) *EnterprisesCreateEnrollmentTokenCall {
4304 c.urlParams_.Set("deviceType", deviceType)
4305 return c
4306 }
4307
4308
4309
4310
4311 func (c *EnterprisesCreateEnrollmentTokenCall) Fields(s ...googleapi.Field) *EnterprisesCreateEnrollmentTokenCall {
4312 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4313 return c
4314 }
4315
4316
4317 func (c *EnterprisesCreateEnrollmentTokenCall) Context(ctx context.Context) *EnterprisesCreateEnrollmentTokenCall {
4318 c.ctx_ = ctx
4319 return c
4320 }
4321
4322
4323
4324 func (c *EnterprisesCreateEnrollmentTokenCall) Header() http.Header {
4325 if c.header_ == nil {
4326 c.header_ = make(http.Header)
4327 }
4328 return c.header_
4329 }
4330
4331 func (c *EnterprisesCreateEnrollmentTokenCall) doRequest(alt string) (*http.Response, error) {
4332 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4333 var body io.Reader = nil
4334 c.urlParams_.Set("alt", alt)
4335 c.urlParams_.Set("prettyPrint", "false")
4336 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/createEnrollmentToken")
4337 urls += "?" + c.urlParams_.Encode()
4338 req, err := http.NewRequest("POST", urls, body)
4339 if err != nil {
4340 return nil, err
4341 }
4342 req.Header = reqHeaders
4343 googleapi.Expand(req.URL, map[string]string{
4344 "enterpriseId": c.enterpriseId,
4345 })
4346 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4347 }
4348
4349
4350
4351
4352
4353
4354
4355 func (c *EnterprisesCreateEnrollmentTokenCall) Do(opts ...googleapi.CallOption) (*CreateEnrollmentTokenResponse, error) {
4356 gensupport.SetOptions(c.urlParams_, opts...)
4357 res, err := c.doRequest("json")
4358 if res != nil && res.StatusCode == http.StatusNotModified {
4359 if res.Body != nil {
4360 res.Body.Close()
4361 }
4362 return nil, gensupport.WrapError(&googleapi.Error{
4363 Code: res.StatusCode,
4364 Header: res.Header,
4365 })
4366 }
4367 if err != nil {
4368 return nil, err
4369 }
4370 defer googleapi.CloseBody(res)
4371 if err := googleapi.CheckResponse(res); err != nil {
4372 return nil, gensupport.WrapError(err)
4373 }
4374 ret := &CreateEnrollmentTokenResponse{
4375 ServerResponse: googleapi.ServerResponse{
4376 Header: res.Header,
4377 HTTPStatusCode: res.StatusCode,
4378 },
4379 }
4380 target := &ret
4381 if err := gensupport.DecodeResponse(target, res); err != nil {
4382 return nil, err
4383 }
4384 return ret, nil
4385 }
4386
4387 type EnterprisesCreateWebTokenCall struct {
4388 s *Service
4389 enterpriseId string
4390 administratorwebtokenspec *AdministratorWebTokenSpec
4391 urlParams_ gensupport.URLParams
4392 ctx_ context.Context
4393 header_ http.Header
4394 }
4395
4396
4397
4398
4399
4400
4401
4402 func (r *EnterprisesService) CreateWebToken(enterpriseId string, administratorwebtokenspec *AdministratorWebTokenSpec) *EnterprisesCreateWebTokenCall {
4403 c := &EnterprisesCreateWebTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4404 c.enterpriseId = enterpriseId
4405 c.administratorwebtokenspec = administratorwebtokenspec
4406 return c
4407 }
4408
4409
4410
4411
4412 func (c *EnterprisesCreateWebTokenCall) Fields(s ...googleapi.Field) *EnterprisesCreateWebTokenCall {
4413 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4414 return c
4415 }
4416
4417
4418 func (c *EnterprisesCreateWebTokenCall) Context(ctx context.Context) *EnterprisesCreateWebTokenCall {
4419 c.ctx_ = ctx
4420 return c
4421 }
4422
4423
4424
4425 func (c *EnterprisesCreateWebTokenCall) Header() http.Header {
4426 if c.header_ == nil {
4427 c.header_ = make(http.Header)
4428 }
4429 return c.header_
4430 }
4431
4432 func (c *EnterprisesCreateWebTokenCall) doRequest(alt string) (*http.Response, error) {
4433 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4434 var body io.Reader = nil
4435 body, err := googleapi.WithoutDataWrapper.JSONReader(c.administratorwebtokenspec)
4436 if err != nil {
4437 return nil, err
4438 }
4439 c.urlParams_.Set("alt", alt)
4440 c.urlParams_.Set("prettyPrint", "false")
4441 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/createWebToken")
4442 urls += "?" + c.urlParams_.Encode()
4443 req, err := http.NewRequest("POST", urls, body)
4444 if err != nil {
4445 return nil, err
4446 }
4447 req.Header = reqHeaders
4448 googleapi.Expand(req.URL, map[string]string{
4449 "enterpriseId": c.enterpriseId,
4450 })
4451 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4452 }
4453
4454
4455
4456
4457
4458
4459
4460 func (c *EnterprisesCreateWebTokenCall) Do(opts ...googleapi.CallOption) (*AdministratorWebToken, error) {
4461 gensupport.SetOptions(c.urlParams_, opts...)
4462 res, err := c.doRequest("json")
4463 if res != nil && res.StatusCode == http.StatusNotModified {
4464 if res.Body != nil {
4465 res.Body.Close()
4466 }
4467 return nil, gensupport.WrapError(&googleapi.Error{
4468 Code: res.StatusCode,
4469 Header: res.Header,
4470 })
4471 }
4472 if err != nil {
4473 return nil, err
4474 }
4475 defer googleapi.CloseBody(res)
4476 if err := googleapi.CheckResponse(res); err != nil {
4477 return nil, gensupport.WrapError(err)
4478 }
4479 ret := &AdministratorWebToken{
4480 ServerResponse: googleapi.ServerResponse{
4481 Header: res.Header,
4482 HTTPStatusCode: res.StatusCode,
4483 },
4484 }
4485 target := &ret
4486 if err := gensupport.DecodeResponse(target, res); err != nil {
4487 return nil, err
4488 }
4489 return ret, nil
4490 }
4491
4492 type EnterprisesEnrollCall struct {
4493 s *Service
4494 enterprise *Enterprise
4495 urlParams_ gensupport.URLParams
4496 ctx_ context.Context
4497 header_ http.Header
4498 }
4499
4500
4501
4502
4503 func (r *EnterprisesService) Enroll(token string, enterprise *Enterprise) *EnterprisesEnrollCall {
4504 c := &EnterprisesEnrollCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4505 c.urlParams_.Set("token", token)
4506 c.enterprise = enterprise
4507 return c
4508 }
4509
4510
4511
4512
4513 func (c *EnterprisesEnrollCall) Fields(s ...googleapi.Field) *EnterprisesEnrollCall {
4514 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4515 return c
4516 }
4517
4518
4519 func (c *EnterprisesEnrollCall) Context(ctx context.Context) *EnterprisesEnrollCall {
4520 c.ctx_ = ctx
4521 return c
4522 }
4523
4524
4525
4526 func (c *EnterprisesEnrollCall) Header() http.Header {
4527 if c.header_ == nil {
4528 c.header_ = make(http.Header)
4529 }
4530 return c.header_
4531 }
4532
4533 func (c *EnterprisesEnrollCall) doRequest(alt string) (*http.Response, error) {
4534 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4535 var body io.Reader = nil
4536 body, err := googleapi.WithoutDataWrapper.JSONReader(c.enterprise)
4537 if err != nil {
4538 return nil, err
4539 }
4540 c.urlParams_.Set("alt", alt)
4541 c.urlParams_.Set("prettyPrint", "false")
4542 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/enroll")
4543 urls += "?" + c.urlParams_.Encode()
4544 req, err := http.NewRequest("POST", urls, body)
4545 if err != nil {
4546 return nil, err
4547 }
4548 req.Header = reqHeaders
4549 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4550 }
4551
4552
4553
4554
4555
4556
4557 func (c *EnterprisesEnrollCall) Do(opts ...googleapi.CallOption) (*Enterprise, error) {
4558 gensupport.SetOptions(c.urlParams_, opts...)
4559 res, err := c.doRequest("json")
4560 if res != nil && res.StatusCode == http.StatusNotModified {
4561 if res.Body != nil {
4562 res.Body.Close()
4563 }
4564 return nil, gensupport.WrapError(&googleapi.Error{
4565 Code: res.StatusCode,
4566 Header: res.Header,
4567 })
4568 }
4569 if err != nil {
4570 return nil, err
4571 }
4572 defer googleapi.CloseBody(res)
4573 if err := googleapi.CheckResponse(res); err != nil {
4574 return nil, gensupport.WrapError(err)
4575 }
4576 ret := &Enterprise{
4577 ServerResponse: googleapi.ServerResponse{
4578 Header: res.Header,
4579 HTTPStatusCode: res.StatusCode,
4580 },
4581 }
4582 target := &ret
4583 if err := gensupport.DecodeResponse(target, res); err != nil {
4584 return nil, err
4585 }
4586 return ret, nil
4587 }
4588
4589 type EnterprisesGenerateSignupUrlCall struct {
4590 s *Service
4591 urlParams_ gensupport.URLParams
4592 ctx_ context.Context
4593 header_ http.Header
4594 }
4595
4596
4597 func (r *EnterprisesService) GenerateSignupUrl() *EnterprisesGenerateSignupUrlCall {
4598 c := &EnterprisesGenerateSignupUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4599 return c
4600 }
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610 func (c *EnterprisesGenerateSignupUrlCall) CallbackUrl(callbackUrl string) *EnterprisesGenerateSignupUrlCall {
4611 c.urlParams_.Set("callbackUrl", callbackUrl)
4612 return c
4613 }
4614
4615
4616
4617
4618 func (c *EnterprisesGenerateSignupUrlCall) Fields(s ...googleapi.Field) *EnterprisesGenerateSignupUrlCall {
4619 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4620 return c
4621 }
4622
4623
4624 func (c *EnterprisesGenerateSignupUrlCall) Context(ctx context.Context) *EnterprisesGenerateSignupUrlCall {
4625 c.ctx_ = ctx
4626 return c
4627 }
4628
4629
4630
4631 func (c *EnterprisesGenerateSignupUrlCall) Header() http.Header {
4632 if c.header_ == nil {
4633 c.header_ = make(http.Header)
4634 }
4635 return c.header_
4636 }
4637
4638 func (c *EnterprisesGenerateSignupUrlCall) doRequest(alt string) (*http.Response, error) {
4639 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4640 var body io.Reader = nil
4641 c.urlParams_.Set("alt", alt)
4642 c.urlParams_.Set("prettyPrint", "false")
4643 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/signupUrl")
4644 urls += "?" + c.urlParams_.Encode()
4645 req, err := http.NewRequest("POST", urls, body)
4646 if err != nil {
4647 return nil, err
4648 }
4649 req.Header = reqHeaders
4650 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4651 }
4652
4653
4654
4655
4656
4657
4658 func (c *EnterprisesGenerateSignupUrlCall) Do(opts ...googleapi.CallOption) (*SignupInfo, error) {
4659 gensupport.SetOptions(c.urlParams_, opts...)
4660 res, err := c.doRequest("json")
4661 if res != nil && res.StatusCode == http.StatusNotModified {
4662 if res.Body != nil {
4663 res.Body.Close()
4664 }
4665 return nil, gensupport.WrapError(&googleapi.Error{
4666 Code: res.StatusCode,
4667 Header: res.Header,
4668 })
4669 }
4670 if err != nil {
4671 return nil, err
4672 }
4673 defer googleapi.CloseBody(res)
4674 if err := googleapi.CheckResponse(res); err != nil {
4675 return nil, gensupport.WrapError(err)
4676 }
4677 ret := &SignupInfo{
4678 ServerResponse: googleapi.ServerResponse{
4679 Header: res.Header,
4680 HTTPStatusCode: res.StatusCode,
4681 },
4682 }
4683 target := &ret
4684 if err := gensupport.DecodeResponse(target, res); err != nil {
4685 return nil, err
4686 }
4687 return ret, nil
4688 }
4689
4690 type EnterprisesGetCall struct {
4691 s *Service
4692 enterpriseId string
4693 urlParams_ gensupport.URLParams
4694 ifNoneMatch_ string
4695 ctx_ context.Context
4696 header_ http.Header
4697 }
4698
4699
4700
4701
4702 func (r *EnterprisesService) Get(enterpriseId string) *EnterprisesGetCall {
4703 c := &EnterprisesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4704 c.enterpriseId = enterpriseId
4705 return c
4706 }
4707
4708
4709
4710
4711 func (c *EnterprisesGetCall) Fields(s ...googleapi.Field) *EnterprisesGetCall {
4712 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4713 return c
4714 }
4715
4716
4717
4718
4719 func (c *EnterprisesGetCall) IfNoneMatch(entityTag string) *EnterprisesGetCall {
4720 c.ifNoneMatch_ = entityTag
4721 return c
4722 }
4723
4724
4725 func (c *EnterprisesGetCall) Context(ctx context.Context) *EnterprisesGetCall {
4726 c.ctx_ = ctx
4727 return c
4728 }
4729
4730
4731
4732 func (c *EnterprisesGetCall) Header() http.Header {
4733 if c.header_ == nil {
4734 c.header_ = make(http.Header)
4735 }
4736 return c.header_
4737 }
4738
4739 func (c *EnterprisesGetCall) doRequest(alt string) (*http.Response, error) {
4740 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4741 if c.ifNoneMatch_ != "" {
4742 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4743 }
4744 var body io.Reader = nil
4745 c.urlParams_.Set("alt", alt)
4746 c.urlParams_.Set("prettyPrint", "false")
4747 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}")
4748 urls += "?" + c.urlParams_.Encode()
4749 req, err := http.NewRequest("GET", urls, body)
4750 if err != nil {
4751 return nil, err
4752 }
4753 req.Header = reqHeaders
4754 googleapi.Expand(req.URL, map[string]string{
4755 "enterpriseId": c.enterpriseId,
4756 })
4757 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4758 }
4759
4760
4761
4762
4763
4764
4765 func (c *EnterprisesGetCall) Do(opts ...googleapi.CallOption) (*Enterprise, error) {
4766 gensupport.SetOptions(c.urlParams_, opts...)
4767 res, err := c.doRequest("json")
4768 if res != nil && res.StatusCode == http.StatusNotModified {
4769 if res.Body != nil {
4770 res.Body.Close()
4771 }
4772 return nil, gensupport.WrapError(&googleapi.Error{
4773 Code: res.StatusCode,
4774 Header: res.Header,
4775 })
4776 }
4777 if err != nil {
4778 return nil, err
4779 }
4780 defer googleapi.CloseBody(res)
4781 if err := googleapi.CheckResponse(res); err != nil {
4782 return nil, gensupport.WrapError(err)
4783 }
4784 ret := &Enterprise{
4785 ServerResponse: googleapi.ServerResponse{
4786 Header: res.Header,
4787 HTTPStatusCode: res.StatusCode,
4788 },
4789 }
4790 target := &ret
4791 if err := gensupport.DecodeResponse(target, res); err != nil {
4792 return nil, err
4793 }
4794 return ret, nil
4795 }
4796
4797 type EnterprisesGetServiceAccountCall struct {
4798 s *Service
4799 enterpriseId string
4800 urlParams_ gensupport.URLParams
4801 ifNoneMatch_ string
4802 ctx_ context.Context
4803 header_ http.Header
4804 }
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819 func (r *EnterprisesService) GetServiceAccount(enterpriseId string) *EnterprisesGetServiceAccountCall {
4820 c := &EnterprisesGetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4821 c.enterpriseId = enterpriseId
4822 return c
4823 }
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836 func (c *EnterprisesGetServiceAccountCall) KeyType(keyType string) *EnterprisesGetServiceAccountCall {
4837 c.urlParams_.Set("keyType", keyType)
4838 return c
4839 }
4840
4841
4842
4843
4844 func (c *EnterprisesGetServiceAccountCall) Fields(s ...googleapi.Field) *EnterprisesGetServiceAccountCall {
4845 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4846 return c
4847 }
4848
4849
4850
4851
4852 func (c *EnterprisesGetServiceAccountCall) IfNoneMatch(entityTag string) *EnterprisesGetServiceAccountCall {
4853 c.ifNoneMatch_ = entityTag
4854 return c
4855 }
4856
4857
4858 func (c *EnterprisesGetServiceAccountCall) Context(ctx context.Context) *EnterprisesGetServiceAccountCall {
4859 c.ctx_ = ctx
4860 return c
4861 }
4862
4863
4864
4865 func (c *EnterprisesGetServiceAccountCall) Header() http.Header {
4866 if c.header_ == nil {
4867 c.header_ = make(http.Header)
4868 }
4869 return c.header_
4870 }
4871
4872 func (c *EnterprisesGetServiceAccountCall) doRequest(alt string) (*http.Response, error) {
4873 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4874 if c.ifNoneMatch_ != "" {
4875 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4876 }
4877 var body io.Reader = nil
4878 c.urlParams_.Set("alt", alt)
4879 c.urlParams_.Set("prettyPrint", "false")
4880 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/serviceAccount")
4881 urls += "?" + c.urlParams_.Encode()
4882 req, err := http.NewRequest("GET", urls, body)
4883 if err != nil {
4884 return nil, err
4885 }
4886 req.Header = reqHeaders
4887 googleapi.Expand(req.URL, map[string]string{
4888 "enterpriseId": c.enterpriseId,
4889 })
4890 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4891 }
4892
4893
4894
4895
4896
4897
4898 func (c *EnterprisesGetServiceAccountCall) Do(opts ...googleapi.CallOption) (*ServiceAccount, error) {
4899 gensupport.SetOptions(c.urlParams_, opts...)
4900 res, err := c.doRequest("json")
4901 if res != nil && res.StatusCode == http.StatusNotModified {
4902 if res.Body != nil {
4903 res.Body.Close()
4904 }
4905 return nil, gensupport.WrapError(&googleapi.Error{
4906 Code: res.StatusCode,
4907 Header: res.Header,
4908 })
4909 }
4910 if err != nil {
4911 return nil, err
4912 }
4913 defer googleapi.CloseBody(res)
4914 if err := googleapi.CheckResponse(res); err != nil {
4915 return nil, gensupport.WrapError(err)
4916 }
4917 ret := &ServiceAccount{
4918 ServerResponse: googleapi.ServerResponse{
4919 Header: res.Header,
4920 HTTPStatusCode: res.StatusCode,
4921 },
4922 }
4923 target := &ret
4924 if err := gensupport.DecodeResponse(target, res); err != nil {
4925 return nil, err
4926 }
4927 return ret, nil
4928 }
4929
4930 type EnterprisesGetStoreLayoutCall struct {
4931 s *Service
4932 enterpriseId string
4933 urlParams_ gensupport.URLParams
4934 ifNoneMatch_ string
4935 ctx_ context.Context
4936 header_ http.Header
4937 }
4938
4939
4940
4941
4942
4943
4944 func (r *EnterprisesService) GetStoreLayout(enterpriseId string) *EnterprisesGetStoreLayoutCall {
4945 c := &EnterprisesGetStoreLayoutCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4946 c.enterpriseId = enterpriseId
4947 return c
4948 }
4949
4950
4951
4952
4953 func (c *EnterprisesGetStoreLayoutCall) Fields(s ...googleapi.Field) *EnterprisesGetStoreLayoutCall {
4954 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4955 return c
4956 }
4957
4958
4959
4960
4961 func (c *EnterprisesGetStoreLayoutCall) IfNoneMatch(entityTag string) *EnterprisesGetStoreLayoutCall {
4962 c.ifNoneMatch_ = entityTag
4963 return c
4964 }
4965
4966
4967 func (c *EnterprisesGetStoreLayoutCall) Context(ctx context.Context) *EnterprisesGetStoreLayoutCall {
4968 c.ctx_ = ctx
4969 return c
4970 }
4971
4972
4973
4974 func (c *EnterprisesGetStoreLayoutCall) Header() http.Header {
4975 if c.header_ == nil {
4976 c.header_ = make(http.Header)
4977 }
4978 return c.header_
4979 }
4980
4981 func (c *EnterprisesGetStoreLayoutCall) doRequest(alt string) (*http.Response, error) {
4982 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4983 if c.ifNoneMatch_ != "" {
4984 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4985 }
4986 var body io.Reader = nil
4987 c.urlParams_.Set("alt", alt)
4988 c.urlParams_.Set("prettyPrint", "false")
4989 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout")
4990 urls += "?" + c.urlParams_.Encode()
4991 req, err := http.NewRequest("GET", urls, body)
4992 if err != nil {
4993 return nil, err
4994 }
4995 req.Header = reqHeaders
4996 googleapi.Expand(req.URL, map[string]string{
4997 "enterpriseId": c.enterpriseId,
4998 })
4999 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5000 }
5001
5002
5003
5004
5005
5006
5007 func (c *EnterprisesGetStoreLayoutCall) Do(opts ...googleapi.CallOption) (*StoreLayout, error) {
5008 gensupport.SetOptions(c.urlParams_, opts...)
5009 res, err := c.doRequest("json")
5010 if res != nil && res.StatusCode == http.StatusNotModified {
5011 if res.Body != nil {
5012 res.Body.Close()
5013 }
5014 return nil, gensupport.WrapError(&googleapi.Error{
5015 Code: res.StatusCode,
5016 Header: res.Header,
5017 })
5018 }
5019 if err != nil {
5020 return nil, err
5021 }
5022 defer googleapi.CloseBody(res)
5023 if err := googleapi.CheckResponse(res); err != nil {
5024 return nil, gensupport.WrapError(err)
5025 }
5026 ret := &StoreLayout{
5027 ServerResponse: googleapi.ServerResponse{
5028 Header: res.Header,
5029 HTTPStatusCode: res.StatusCode,
5030 },
5031 }
5032 target := &ret
5033 if err := gensupport.DecodeResponse(target, res); err != nil {
5034 return nil, err
5035 }
5036 return ret, nil
5037 }
5038
5039 type EnterprisesListCall struct {
5040 s *Service
5041 urlParams_ gensupport.URLParams
5042 ifNoneMatch_ string
5043 ctx_ context.Context
5044 header_ http.Header
5045 }
5046
5047
5048
5049
5050
5051
5052
5053
5054 func (r *EnterprisesService) List(domain string) *EnterprisesListCall {
5055 c := &EnterprisesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5056 c.urlParams_.Set("domain", domain)
5057 return c
5058 }
5059
5060
5061
5062
5063 func (c *EnterprisesListCall) Fields(s ...googleapi.Field) *EnterprisesListCall {
5064 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5065 return c
5066 }
5067
5068
5069
5070
5071 func (c *EnterprisesListCall) IfNoneMatch(entityTag string) *EnterprisesListCall {
5072 c.ifNoneMatch_ = entityTag
5073 return c
5074 }
5075
5076
5077 func (c *EnterprisesListCall) Context(ctx context.Context) *EnterprisesListCall {
5078 c.ctx_ = ctx
5079 return c
5080 }
5081
5082
5083
5084 func (c *EnterprisesListCall) Header() http.Header {
5085 if c.header_ == nil {
5086 c.header_ = make(http.Header)
5087 }
5088 return c.header_
5089 }
5090
5091 func (c *EnterprisesListCall) doRequest(alt string) (*http.Response, error) {
5092 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5093 if c.ifNoneMatch_ != "" {
5094 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5095 }
5096 var body io.Reader = nil
5097 c.urlParams_.Set("alt", alt)
5098 c.urlParams_.Set("prettyPrint", "false")
5099 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises")
5100 urls += "?" + c.urlParams_.Encode()
5101 req, err := http.NewRequest("GET", urls, body)
5102 if err != nil {
5103 return nil, err
5104 }
5105 req.Header = reqHeaders
5106 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5107 }
5108
5109
5110
5111
5112
5113
5114
5115 func (c *EnterprisesListCall) Do(opts ...googleapi.CallOption) (*EnterprisesListResponse, error) {
5116 gensupport.SetOptions(c.urlParams_, opts...)
5117 res, err := c.doRequest("json")
5118 if res != nil && res.StatusCode == http.StatusNotModified {
5119 if res.Body != nil {
5120 res.Body.Close()
5121 }
5122 return nil, gensupport.WrapError(&googleapi.Error{
5123 Code: res.StatusCode,
5124 Header: res.Header,
5125 })
5126 }
5127 if err != nil {
5128 return nil, err
5129 }
5130 defer googleapi.CloseBody(res)
5131 if err := googleapi.CheckResponse(res); err != nil {
5132 return nil, gensupport.WrapError(err)
5133 }
5134 ret := &EnterprisesListResponse{
5135 ServerResponse: googleapi.ServerResponse{
5136 Header: res.Header,
5137 HTTPStatusCode: res.StatusCode,
5138 },
5139 }
5140 target := &ret
5141 if err := gensupport.DecodeResponse(target, res); err != nil {
5142 return nil, err
5143 }
5144 return ret, nil
5145 }
5146
5147 type EnterprisesPullNotificationSetCall struct {
5148 s *Service
5149 urlParams_ gensupport.URLParams
5150 ctx_ context.Context
5151 header_ http.Header
5152 }
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168 func (r *EnterprisesService) PullNotificationSet() *EnterprisesPullNotificationSetCall {
5169 c := &EnterprisesPullNotificationSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5170 return c
5171 }
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187 func (c *EnterprisesPullNotificationSetCall) RequestMode(requestMode string) *EnterprisesPullNotificationSetCall {
5188 c.urlParams_.Set("requestMode", requestMode)
5189 return c
5190 }
5191
5192
5193
5194
5195 func (c *EnterprisesPullNotificationSetCall) Fields(s ...googleapi.Field) *EnterprisesPullNotificationSetCall {
5196 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5197 return c
5198 }
5199
5200
5201 func (c *EnterprisesPullNotificationSetCall) Context(ctx context.Context) *EnterprisesPullNotificationSetCall {
5202 c.ctx_ = ctx
5203 return c
5204 }
5205
5206
5207
5208 func (c *EnterprisesPullNotificationSetCall) Header() http.Header {
5209 if c.header_ == nil {
5210 c.header_ = make(http.Header)
5211 }
5212 return c.header_
5213 }
5214
5215 func (c *EnterprisesPullNotificationSetCall) doRequest(alt string) (*http.Response, error) {
5216 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5217 var body io.Reader = nil
5218 c.urlParams_.Set("alt", alt)
5219 c.urlParams_.Set("prettyPrint", "false")
5220 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/pullNotificationSet")
5221 urls += "?" + c.urlParams_.Encode()
5222 req, err := http.NewRequest("POST", urls, body)
5223 if err != nil {
5224 return nil, err
5225 }
5226 req.Header = reqHeaders
5227 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5228 }
5229
5230
5231
5232
5233
5234
5235
5236 func (c *EnterprisesPullNotificationSetCall) Do(opts ...googleapi.CallOption) (*NotificationSet, error) {
5237 gensupport.SetOptions(c.urlParams_, opts...)
5238 res, err := c.doRequest("json")
5239 if res != nil && res.StatusCode == http.StatusNotModified {
5240 if res.Body != nil {
5241 res.Body.Close()
5242 }
5243 return nil, gensupport.WrapError(&googleapi.Error{
5244 Code: res.StatusCode,
5245 Header: res.Header,
5246 })
5247 }
5248 if err != nil {
5249 return nil, err
5250 }
5251 defer googleapi.CloseBody(res)
5252 if err := googleapi.CheckResponse(res); err != nil {
5253 return nil, gensupport.WrapError(err)
5254 }
5255 ret := &NotificationSet{
5256 ServerResponse: googleapi.ServerResponse{
5257 Header: res.Header,
5258 HTTPStatusCode: res.StatusCode,
5259 },
5260 }
5261 target := &ret
5262 if err := gensupport.DecodeResponse(target, res); err != nil {
5263 return nil, err
5264 }
5265 return ret, nil
5266 }
5267
5268 type EnterprisesSendTestPushNotificationCall struct {
5269 s *Service
5270 enterpriseId string
5271 urlParams_ gensupport.URLParams
5272 ctx_ context.Context
5273 header_ http.Header
5274 }
5275
5276
5277
5278
5279
5280 func (r *EnterprisesService) SendTestPushNotification(enterpriseId string) *EnterprisesSendTestPushNotificationCall {
5281 c := &EnterprisesSendTestPushNotificationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5282 c.enterpriseId = enterpriseId
5283 return c
5284 }
5285
5286
5287
5288
5289 func (c *EnterprisesSendTestPushNotificationCall) Fields(s ...googleapi.Field) *EnterprisesSendTestPushNotificationCall {
5290 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5291 return c
5292 }
5293
5294
5295 func (c *EnterprisesSendTestPushNotificationCall) Context(ctx context.Context) *EnterprisesSendTestPushNotificationCall {
5296 c.ctx_ = ctx
5297 return c
5298 }
5299
5300
5301
5302 func (c *EnterprisesSendTestPushNotificationCall) Header() http.Header {
5303 if c.header_ == nil {
5304 c.header_ = make(http.Header)
5305 }
5306 return c.header_
5307 }
5308
5309 func (c *EnterprisesSendTestPushNotificationCall) doRequest(alt string) (*http.Response, error) {
5310 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5311 var body io.Reader = nil
5312 c.urlParams_.Set("alt", alt)
5313 c.urlParams_.Set("prettyPrint", "false")
5314 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/sendTestPushNotification")
5315 urls += "?" + c.urlParams_.Encode()
5316 req, err := http.NewRequest("POST", urls, body)
5317 if err != nil {
5318 return nil, err
5319 }
5320 req.Header = reqHeaders
5321 googleapi.Expand(req.URL, map[string]string{
5322 "enterpriseId": c.enterpriseId,
5323 })
5324 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5325 }
5326
5327
5328
5329
5330
5331
5332
5333 func (c *EnterprisesSendTestPushNotificationCall) Do(opts ...googleapi.CallOption) (*EnterprisesSendTestPushNotificationResponse, error) {
5334 gensupport.SetOptions(c.urlParams_, opts...)
5335 res, err := c.doRequest("json")
5336 if res != nil && res.StatusCode == http.StatusNotModified {
5337 if res.Body != nil {
5338 res.Body.Close()
5339 }
5340 return nil, gensupport.WrapError(&googleapi.Error{
5341 Code: res.StatusCode,
5342 Header: res.Header,
5343 })
5344 }
5345 if err != nil {
5346 return nil, err
5347 }
5348 defer googleapi.CloseBody(res)
5349 if err := googleapi.CheckResponse(res); err != nil {
5350 return nil, gensupport.WrapError(err)
5351 }
5352 ret := &EnterprisesSendTestPushNotificationResponse{
5353 ServerResponse: googleapi.ServerResponse{
5354 Header: res.Header,
5355 HTTPStatusCode: res.StatusCode,
5356 },
5357 }
5358 target := &ret
5359 if err := gensupport.DecodeResponse(target, res); err != nil {
5360 return nil, err
5361 }
5362 return ret, nil
5363 }
5364
5365 type EnterprisesSetAccountCall struct {
5366 s *Service
5367 enterpriseId string
5368 enterpriseaccount *EnterpriseAccount
5369 urlParams_ gensupport.URLParams
5370 ctx_ context.Context
5371 header_ http.Header
5372 }
5373
5374
5375
5376
5377
5378 func (r *EnterprisesService) SetAccount(enterpriseId string, enterpriseaccount *EnterpriseAccount) *EnterprisesSetAccountCall {
5379 c := &EnterprisesSetAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5380 c.enterpriseId = enterpriseId
5381 c.enterpriseaccount = enterpriseaccount
5382 return c
5383 }
5384
5385
5386
5387
5388 func (c *EnterprisesSetAccountCall) Fields(s ...googleapi.Field) *EnterprisesSetAccountCall {
5389 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5390 return c
5391 }
5392
5393
5394 func (c *EnterprisesSetAccountCall) Context(ctx context.Context) *EnterprisesSetAccountCall {
5395 c.ctx_ = ctx
5396 return c
5397 }
5398
5399
5400
5401 func (c *EnterprisesSetAccountCall) Header() http.Header {
5402 if c.header_ == nil {
5403 c.header_ = make(http.Header)
5404 }
5405 return c.header_
5406 }
5407
5408 func (c *EnterprisesSetAccountCall) doRequest(alt string) (*http.Response, error) {
5409 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5410 var body io.Reader = nil
5411 body, err := googleapi.WithoutDataWrapper.JSONReader(c.enterpriseaccount)
5412 if err != nil {
5413 return nil, err
5414 }
5415 c.urlParams_.Set("alt", alt)
5416 c.urlParams_.Set("prettyPrint", "false")
5417 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/account")
5418 urls += "?" + c.urlParams_.Encode()
5419 req, err := http.NewRequest("PUT", urls, body)
5420 if err != nil {
5421 return nil, err
5422 }
5423 req.Header = reqHeaders
5424 googleapi.Expand(req.URL, map[string]string{
5425 "enterpriseId": c.enterpriseId,
5426 })
5427 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5428 }
5429
5430
5431
5432
5433
5434
5435
5436 func (c *EnterprisesSetAccountCall) Do(opts ...googleapi.CallOption) (*EnterpriseAccount, error) {
5437 gensupport.SetOptions(c.urlParams_, opts...)
5438 res, err := c.doRequest("json")
5439 if res != nil && res.StatusCode == http.StatusNotModified {
5440 if res.Body != nil {
5441 res.Body.Close()
5442 }
5443 return nil, gensupport.WrapError(&googleapi.Error{
5444 Code: res.StatusCode,
5445 Header: res.Header,
5446 })
5447 }
5448 if err != nil {
5449 return nil, err
5450 }
5451 defer googleapi.CloseBody(res)
5452 if err := googleapi.CheckResponse(res); err != nil {
5453 return nil, gensupport.WrapError(err)
5454 }
5455 ret := &EnterpriseAccount{
5456 ServerResponse: googleapi.ServerResponse{
5457 Header: res.Header,
5458 HTTPStatusCode: res.StatusCode,
5459 },
5460 }
5461 target := &ret
5462 if err := gensupport.DecodeResponse(target, res); err != nil {
5463 return nil, err
5464 }
5465 return ret, nil
5466 }
5467
5468 type EnterprisesSetStoreLayoutCall struct {
5469 s *Service
5470 enterpriseId string
5471 storelayout *StoreLayout
5472 urlParams_ gensupport.URLParams
5473 ctx_ context.Context
5474 header_ http.Header
5475 }
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487 func (r *EnterprisesService) SetStoreLayout(enterpriseId string, storelayout *StoreLayout) *EnterprisesSetStoreLayoutCall {
5488 c := &EnterprisesSetStoreLayoutCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5489 c.enterpriseId = enterpriseId
5490 c.storelayout = storelayout
5491 return c
5492 }
5493
5494
5495
5496
5497 func (c *EnterprisesSetStoreLayoutCall) Fields(s ...googleapi.Field) *EnterprisesSetStoreLayoutCall {
5498 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5499 return c
5500 }
5501
5502
5503 func (c *EnterprisesSetStoreLayoutCall) Context(ctx context.Context) *EnterprisesSetStoreLayoutCall {
5504 c.ctx_ = ctx
5505 return c
5506 }
5507
5508
5509
5510 func (c *EnterprisesSetStoreLayoutCall) Header() http.Header {
5511 if c.header_ == nil {
5512 c.header_ = make(http.Header)
5513 }
5514 return c.header_
5515 }
5516
5517 func (c *EnterprisesSetStoreLayoutCall) doRequest(alt string) (*http.Response, error) {
5518 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5519 var body io.Reader = nil
5520 body, err := googleapi.WithoutDataWrapper.JSONReader(c.storelayout)
5521 if err != nil {
5522 return nil, err
5523 }
5524 c.urlParams_.Set("alt", alt)
5525 c.urlParams_.Set("prettyPrint", "false")
5526 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout")
5527 urls += "?" + c.urlParams_.Encode()
5528 req, err := http.NewRequest("PUT", urls, body)
5529 if err != nil {
5530 return nil, err
5531 }
5532 req.Header = reqHeaders
5533 googleapi.Expand(req.URL, map[string]string{
5534 "enterpriseId": c.enterpriseId,
5535 })
5536 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5537 }
5538
5539
5540
5541
5542
5543
5544 func (c *EnterprisesSetStoreLayoutCall) Do(opts ...googleapi.CallOption) (*StoreLayout, error) {
5545 gensupport.SetOptions(c.urlParams_, opts...)
5546 res, err := c.doRequest("json")
5547 if res != nil && res.StatusCode == http.StatusNotModified {
5548 if res.Body != nil {
5549 res.Body.Close()
5550 }
5551 return nil, gensupport.WrapError(&googleapi.Error{
5552 Code: res.StatusCode,
5553 Header: res.Header,
5554 })
5555 }
5556 if err != nil {
5557 return nil, err
5558 }
5559 defer googleapi.CloseBody(res)
5560 if err := googleapi.CheckResponse(res); err != nil {
5561 return nil, gensupport.WrapError(err)
5562 }
5563 ret := &StoreLayout{
5564 ServerResponse: googleapi.ServerResponse{
5565 Header: res.Header,
5566 HTTPStatusCode: res.StatusCode,
5567 },
5568 }
5569 target := &ret
5570 if err := gensupport.DecodeResponse(target, res); err != nil {
5571 return nil, err
5572 }
5573 return ret, nil
5574 }
5575
5576 type EnterprisesUnenrollCall struct {
5577 s *Service
5578 enterpriseId string
5579 urlParams_ gensupport.URLParams
5580 ctx_ context.Context
5581 header_ http.Header
5582 }
5583
5584
5585
5586
5587 func (r *EnterprisesService) Unenroll(enterpriseId string) *EnterprisesUnenrollCall {
5588 c := &EnterprisesUnenrollCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5589 c.enterpriseId = enterpriseId
5590 return c
5591 }
5592
5593
5594
5595
5596 func (c *EnterprisesUnenrollCall) Fields(s ...googleapi.Field) *EnterprisesUnenrollCall {
5597 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5598 return c
5599 }
5600
5601
5602 func (c *EnterprisesUnenrollCall) Context(ctx context.Context) *EnterprisesUnenrollCall {
5603 c.ctx_ = ctx
5604 return c
5605 }
5606
5607
5608
5609 func (c *EnterprisesUnenrollCall) Header() http.Header {
5610 if c.header_ == nil {
5611 c.header_ = make(http.Header)
5612 }
5613 return c.header_
5614 }
5615
5616 func (c *EnterprisesUnenrollCall) doRequest(alt string) (*http.Response, error) {
5617 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5618 var body io.Reader = nil
5619 c.urlParams_.Set("alt", alt)
5620 c.urlParams_.Set("prettyPrint", "false")
5621 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/unenroll")
5622 urls += "?" + c.urlParams_.Encode()
5623 req, err := http.NewRequest("POST", urls, body)
5624 if err != nil {
5625 return nil, err
5626 }
5627 req.Header = reqHeaders
5628 googleapi.Expand(req.URL, map[string]string{
5629 "enterpriseId": c.enterpriseId,
5630 })
5631 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5632 }
5633
5634
5635 func (c *EnterprisesUnenrollCall) Do(opts ...googleapi.CallOption) error {
5636 gensupport.SetOptions(c.urlParams_, opts...)
5637 res, err := c.doRequest("json")
5638 if err != nil {
5639 return err
5640 }
5641 defer googleapi.CloseBody(res)
5642 if err := googleapi.CheckResponse(res); err != nil {
5643 return gensupport.WrapError(err)
5644 }
5645 return nil
5646 }
5647
5648 type EntitlementsDeleteCall struct {
5649 s *Service
5650 enterpriseId string
5651 userId string
5652 entitlementId string
5653 urlParams_ gensupport.URLParams
5654 ctx_ context.Context
5655 header_ http.Header
5656 }
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666 func (r *EntitlementsService) Delete(enterpriseId string, userId string, entitlementId string) *EntitlementsDeleteCall {
5667 c := &EntitlementsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5668 c.enterpriseId = enterpriseId
5669 c.userId = userId
5670 c.entitlementId = entitlementId
5671 return c
5672 }
5673
5674
5675
5676
5677 func (c *EntitlementsDeleteCall) Fields(s ...googleapi.Field) *EntitlementsDeleteCall {
5678 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5679 return c
5680 }
5681
5682
5683 func (c *EntitlementsDeleteCall) Context(ctx context.Context) *EntitlementsDeleteCall {
5684 c.ctx_ = ctx
5685 return c
5686 }
5687
5688
5689
5690 func (c *EntitlementsDeleteCall) Header() http.Header {
5691 if c.header_ == nil {
5692 c.header_ = make(http.Header)
5693 }
5694 return c.header_
5695 }
5696
5697 func (c *EntitlementsDeleteCall) doRequest(alt string) (*http.Response, error) {
5698 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5699 var body io.Reader = nil
5700 c.urlParams_.Set("alt", alt)
5701 c.urlParams_.Set("prettyPrint", "false")
5702 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}")
5703 urls += "?" + c.urlParams_.Encode()
5704 req, err := http.NewRequest("DELETE", urls, body)
5705 if err != nil {
5706 return nil, err
5707 }
5708 req.Header = reqHeaders
5709 googleapi.Expand(req.URL, map[string]string{
5710 "enterpriseId": c.enterpriseId,
5711 "userId": c.userId,
5712 "entitlementId": c.entitlementId,
5713 })
5714 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5715 }
5716
5717
5718 func (c *EntitlementsDeleteCall) Do(opts ...googleapi.CallOption) error {
5719 gensupport.SetOptions(c.urlParams_, opts...)
5720 res, err := c.doRequest("json")
5721 if err != nil {
5722 return err
5723 }
5724 defer googleapi.CloseBody(res)
5725 if err := googleapi.CheckResponse(res); err != nil {
5726 return gensupport.WrapError(err)
5727 }
5728 return nil
5729 }
5730
5731 type EntitlementsGetCall struct {
5732 s *Service
5733 enterpriseId string
5734 userId string
5735 entitlementId string
5736 urlParams_ gensupport.URLParams
5737 ifNoneMatch_ string
5738 ctx_ context.Context
5739 header_ http.Header
5740 }
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750 func (r *EntitlementsService) Get(enterpriseId string, userId string, entitlementId string) *EntitlementsGetCall {
5751 c := &EntitlementsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5752 c.enterpriseId = enterpriseId
5753 c.userId = userId
5754 c.entitlementId = entitlementId
5755 return c
5756 }
5757
5758
5759
5760
5761 func (c *EntitlementsGetCall) Fields(s ...googleapi.Field) *EntitlementsGetCall {
5762 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5763 return c
5764 }
5765
5766
5767
5768
5769 func (c *EntitlementsGetCall) IfNoneMatch(entityTag string) *EntitlementsGetCall {
5770 c.ifNoneMatch_ = entityTag
5771 return c
5772 }
5773
5774
5775 func (c *EntitlementsGetCall) Context(ctx context.Context) *EntitlementsGetCall {
5776 c.ctx_ = ctx
5777 return c
5778 }
5779
5780
5781
5782 func (c *EntitlementsGetCall) Header() http.Header {
5783 if c.header_ == nil {
5784 c.header_ = make(http.Header)
5785 }
5786 return c.header_
5787 }
5788
5789 func (c *EntitlementsGetCall) doRequest(alt string) (*http.Response, error) {
5790 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5791 if c.ifNoneMatch_ != "" {
5792 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5793 }
5794 var body io.Reader = nil
5795 c.urlParams_.Set("alt", alt)
5796 c.urlParams_.Set("prettyPrint", "false")
5797 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}")
5798 urls += "?" + c.urlParams_.Encode()
5799 req, err := http.NewRequest("GET", urls, body)
5800 if err != nil {
5801 return nil, err
5802 }
5803 req.Header = reqHeaders
5804 googleapi.Expand(req.URL, map[string]string{
5805 "enterpriseId": c.enterpriseId,
5806 "userId": c.userId,
5807 "entitlementId": c.entitlementId,
5808 })
5809 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5810 }
5811
5812
5813
5814
5815
5816
5817 func (c *EntitlementsGetCall) Do(opts ...googleapi.CallOption) (*Entitlement, error) {
5818 gensupport.SetOptions(c.urlParams_, opts...)
5819 res, err := c.doRequest("json")
5820 if res != nil && res.StatusCode == http.StatusNotModified {
5821 if res.Body != nil {
5822 res.Body.Close()
5823 }
5824 return nil, gensupport.WrapError(&googleapi.Error{
5825 Code: res.StatusCode,
5826 Header: res.Header,
5827 })
5828 }
5829 if err != nil {
5830 return nil, err
5831 }
5832 defer googleapi.CloseBody(res)
5833 if err := googleapi.CheckResponse(res); err != nil {
5834 return nil, gensupport.WrapError(err)
5835 }
5836 ret := &Entitlement{
5837 ServerResponse: googleapi.ServerResponse{
5838 Header: res.Header,
5839 HTTPStatusCode: res.StatusCode,
5840 },
5841 }
5842 target := &ret
5843 if err := gensupport.DecodeResponse(target, res); err != nil {
5844 return nil, err
5845 }
5846 return ret, nil
5847 }
5848
5849 type EntitlementsListCall struct {
5850 s *Service
5851 enterpriseId string
5852 userId string
5853 urlParams_ gensupport.URLParams
5854 ifNoneMatch_ string
5855 ctx_ context.Context
5856 header_ http.Header
5857 }
5858
5859
5860
5861
5862
5863
5864
5865 func (r *EntitlementsService) List(enterpriseId string, userId string) *EntitlementsListCall {
5866 c := &EntitlementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5867 c.enterpriseId = enterpriseId
5868 c.userId = userId
5869 return c
5870 }
5871
5872
5873
5874
5875 func (c *EntitlementsListCall) Fields(s ...googleapi.Field) *EntitlementsListCall {
5876 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5877 return c
5878 }
5879
5880
5881
5882
5883 func (c *EntitlementsListCall) IfNoneMatch(entityTag string) *EntitlementsListCall {
5884 c.ifNoneMatch_ = entityTag
5885 return c
5886 }
5887
5888
5889 func (c *EntitlementsListCall) Context(ctx context.Context) *EntitlementsListCall {
5890 c.ctx_ = ctx
5891 return c
5892 }
5893
5894
5895
5896 func (c *EntitlementsListCall) Header() http.Header {
5897 if c.header_ == nil {
5898 c.header_ = make(http.Header)
5899 }
5900 return c.header_
5901 }
5902
5903 func (c *EntitlementsListCall) doRequest(alt string) (*http.Response, error) {
5904 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5905 if c.ifNoneMatch_ != "" {
5906 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5907 }
5908 var body io.Reader = nil
5909 c.urlParams_.Set("alt", alt)
5910 c.urlParams_.Set("prettyPrint", "false")
5911 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements")
5912 urls += "?" + c.urlParams_.Encode()
5913 req, err := http.NewRequest("GET", urls, body)
5914 if err != nil {
5915 return nil, err
5916 }
5917 req.Header = reqHeaders
5918 googleapi.Expand(req.URL, map[string]string{
5919 "enterpriseId": c.enterpriseId,
5920 "userId": c.userId,
5921 })
5922 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5923 }
5924
5925
5926
5927
5928
5929
5930
5931 func (c *EntitlementsListCall) Do(opts ...googleapi.CallOption) (*EntitlementsListResponse, error) {
5932 gensupport.SetOptions(c.urlParams_, opts...)
5933 res, err := c.doRequest("json")
5934 if res != nil && res.StatusCode == http.StatusNotModified {
5935 if res.Body != nil {
5936 res.Body.Close()
5937 }
5938 return nil, gensupport.WrapError(&googleapi.Error{
5939 Code: res.StatusCode,
5940 Header: res.Header,
5941 })
5942 }
5943 if err != nil {
5944 return nil, err
5945 }
5946 defer googleapi.CloseBody(res)
5947 if err := googleapi.CheckResponse(res); err != nil {
5948 return nil, gensupport.WrapError(err)
5949 }
5950 ret := &EntitlementsListResponse{
5951 ServerResponse: googleapi.ServerResponse{
5952 Header: res.Header,
5953 HTTPStatusCode: res.StatusCode,
5954 },
5955 }
5956 target := &ret
5957 if err := gensupport.DecodeResponse(target, res); err != nil {
5958 return nil, err
5959 }
5960 return ret, nil
5961 }
5962
5963 type EntitlementsUpdateCall struct {
5964 s *Service
5965 enterpriseId string
5966 userId string
5967 entitlementId string
5968 entitlement *Entitlement
5969 urlParams_ gensupport.URLParams
5970 ctx_ context.Context
5971 header_ http.Header
5972 }
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982 func (r *EntitlementsService) Update(enterpriseId string, userId string, entitlementId string, entitlement *Entitlement) *EntitlementsUpdateCall {
5983 c := &EntitlementsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5984 c.enterpriseId = enterpriseId
5985 c.userId = userId
5986 c.entitlementId = entitlementId
5987 c.entitlement = entitlement
5988 return c
5989 }
5990
5991
5992
5993
5994
5995
5996 func (c *EntitlementsUpdateCall) Install(install bool) *EntitlementsUpdateCall {
5997 c.urlParams_.Set("install", fmt.Sprint(install))
5998 return c
5999 }
6000
6001
6002
6003
6004 func (c *EntitlementsUpdateCall) Fields(s ...googleapi.Field) *EntitlementsUpdateCall {
6005 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6006 return c
6007 }
6008
6009
6010 func (c *EntitlementsUpdateCall) Context(ctx context.Context) *EntitlementsUpdateCall {
6011 c.ctx_ = ctx
6012 return c
6013 }
6014
6015
6016
6017 func (c *EntitlementsUpdateCall) Header() http.Header {
6018 if c.header_ == nil {
6019 c.header_ = make(http.Header)
6020 }
6021 return c.header_
6022 }
6023
6024 func (c *EntitlementsUpdateCall) doRequest(alt string) (*http.Response, error) {
6025 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6026 var body io.Reader = nil
6027 body, err := googleapi.WithoutDataWrapper.JSONReader(c.entitlement)
6028 if err != nil {
6029 return nil, err
6030 }
6031 c.urlParams_.Set("alt", alt)
6032 c.urlParams_.Set("prettyPrint", "false")
6033 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}")
6034 urls += "?" + c.urlParams_.Encode()
6035 req, err := http.NewRequest("PUT", urls, body)
6036 if err != nil {
6037 return nil, err
6038 }
6039 req.Header = reqHeaders
6040 googleapi.Expand(req.URL, map[string]string{
6041 "enterpriseId": c.enterpriseId,
6042 "userId": c.userId,
6043 "entitlementId": c.entitlementId,
6044 })
6045 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6046 }
6047
6048
6049
6050
6051
6052
6053 func (c *EntitlementsUpdateCall) Do(opts ...googleapi.CallOption) (*Entitlement, error) {
6054 gensupport.SetOptions(c.urlParams_, opts...)
6055 res, err := c.doRequest("json")
6056 if res != nil && res.StatusCode == http.StatusNotModified {
6057 if res.Body != nil {
6058 res.Body.Close()
6059 }
6060 return nil, gensupport.WrapError(&googleapi.Error{
6061 Code: res.StatusCode,
6062 Header: res.Header,
6063 })
6064 }
6065 if err != nil {
6066 return nil, err
6067 }
6068 defer googleapi.CloseBody(res)
6069 if err := googleapi.CheckResponse(res); err != nil {
6070 return nil, gensupport.WrapError(err)
6071 }
6072 ret := &Entitlement{
6073 ServerResponse: googleapi.ServerResponse{
6074 Header: res.Header,
6075 HTTPStatusCode: res.StatusCode,
6076 },
6077 }
6078 target := &ret
6079 if err := gensupport.DecodeResponse(target, res); err != nil {
6080 return nil, err
6081 }
6082 return ret, nil
6083 }
6084
6085 type GrouplicensesGetCall struct {
6086 s *Service
6087 enterpriseId string
6088 groupLicenseId string
6089 urlParams_ gensupport.URLParams
6090 ifNoneMatch_ string
6091 ctx_ context.Context
6092 header_ http.Header
6093 }
6094
6095
6096
6097
6098
6099
6100
6101
6102 func (r *GrouplicensesService) Get(enterpriseId string, groupLicenseId string) *GrouplicensesGetCall {
6103 c := &GrouplicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6104 c.enterpriseId = enterpriseId
6105 c.groupLicenseId = groupLicenseId
6106 return c
6107 }
6108
6109
6110
6111
6112 func (c *GrouplicensesGetCall) Fields(s ...googleapi.Field) *GrouplicensesGetCall {
6113 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6114 return c
6115 }
6116
6117
6118
6119
6120 func (c *GrouplicensesGetCall) IfNoneMatch(entityTag string) *GrouplicensesGetCall {
6121 c.ifNoneMatch_ = entityTag
6122 return c
6123 }
6124
6125
6126 func (c *GrouplicensesGetCall) Context(ctx context.Context) *GrouplicensesGetCall {
6127 c.ctx_ = ctx
6128 return c
6129 }
6130
6131
6132
6133 func (c *GrouplicensesGetCall) Header() http.Header {
6134 if c.header_ == nil {
6135 c.header_ = make(http.Header)
6136 }
6137 return c.header_
6138 }
6139
6140 func (c *GrouplicensesGetCall) doRequest(alt string) (*http.Response, error) {
6141 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6142 if c.ifNoneMatch_ != "" {
6143 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6144 }
6145 var body io.Reader = nil
6146 c.urlParams_.Set("alt", alt)
6147 c.urlParams_.Set("prettyPrint", "false")
6148 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/groupLicenses/{groupLicenseId}")
6149 urls += "?" + c.urlParams_.Encode()
6150 req, err := http.NewRequest("GET", urls, body)
6151 if err != nil {
6152 return nil, err
6153 }
6154 req.Header = reqHeaders
6155 googleapi.Expand(req.URL, map[string]string{
6156 "enterpriseId": c.enterpriseId,
6157 "groupLicenseId": c.groupLicenseId,
6158 })
6159 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6160 }
6161
6162
6163
6164
6165
6166
6167 func (c *GrouplicensesGetCall) Do(opts ...googleapi.CallOption) (*GroupLicense, error) {
6168 gensupport.SetOptions(c.urlParams_, opts...)
6169 res, err := c.doRequest("json")
6170 if res != nil && res.StatusCode == http.StatusNotModified {
6171 if res.Body != nil {
6172 res.Body.Close()
6173 }
6174 return nil, gensupport.WrapError(&googleapi.Error{
6175 Code: res.StatusCode,
6176 Header: res.Header,
6177 })
6178 }
6179 if err != nil {
6180 return nil, err
6181 }
6182 defer googleapi.CloseBody(res)
6183 if err := googleapi.CheckResponse(res); err != nil {
6184 return nil, gensupport.WrapError(err)
6185 }
6186 ret := &GroupLicense{
6187 ServerResponse: googleapi.ServerResponse{
6188 Header: res.Header,
6189 HTTPStatusCode: res.StatusCode,
6190 },
6191 }
6192 target := &ret
6193 if err := gensupport.DecodeResponse(target, res); err != nil {
6194 return nil, err
6195 }
6196 return ret, nil
6197 }
6198
6199 type GrouplicensesListCall struct {
6200 s *Service
6201 enterpriseId string
6202 urlParams_ gensupport.URLParams
6203 ifNoneMatch_ string
6204 ctx_ context.Context
6205 header_ http.Header
6206 }
6207
6208
6209
6210
6211
6212
6213 func (r *GrouplicensesService) List(enterpriseId string) *GrouplicensesListCall {
6214 c := &GrouplicensesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6215 c.enterpriseId = enterpriseId
6216 return c
6217 }
6218
6219
6220
6221
6222 func (c *GrouplicensesListCall) Fields(s ...googleapi.Field) *GrouplicensesListCall {
6223 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6224 return c
6225 }
6226
6227
6228
6229
6230 func (c *GrouplicensesListCall) IfNoneMatch(entityTag string) *GrouplicensesListCall {
6231 c.ifNoneMatch_ = entityTag
6232 return c
6233 }
6234
6235
6236 func (c *GrouplicensesListCall) Context(ctx context.Context) *GrouplicensesListCall {
6237 c.ctx_ = ctx
6238 return c
6239 }
6240
6241
6242
6243 func (c *GrouplicensesListCall) Header() http.Header {
6244 if c.header_ == nil {
6245 c.header_ = make(http.Header)
6246 }
6247 return c.header_
6248 }
6249
6250 func (c *GrouplicensesListCall) doRequest(alt string) (*http.Response, error) {
6251 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6252 if c.ifNoneMatch_ != "" {
6253 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6254 }
6255 var body io.Reader = nil
6256 c.urlParams_.Set("alt", alt)
6257 c.urlParams_.Set("prettyPrint", "false")
6258 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/groupLicenses")
6259 urls += "?" + c.urlParams_.Encode()
6260 req, err := http.NewRequest("GET", urls, body)
6261 if err != nil {
6262 return nil, err
6263 }
6264 req.Header = reqHeaders
6265 googleapi.Expand(req.URL, map[string]string{
6266 "enterpriseId": c.enterpriseId,
6267 })
6268 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6269 }
6270
6271
6272
6273
6274
6275
6276
6277 func (c *GrouplicensesListCall) Do(opts ...googleapi.CallOption) (*GroupLicensesListResponse, error) {
6278 gensupport.SetOptions(c.urlParams_, opts...)
6279 res, err := c.doRequest("json")
6280 if res != nil && res.StatusCode == http.StatusNotModified {
6281 if res.Body != nil {
6282 res.Body.Close()
6283 }
6284 return nil, gensupport.WrapError(&googleapi.Error{
6285 Code: res.StatusCode,
6286 Header: res.Header,
6287 })
6288 }
6289 if err != nil {
6290 return nil, err
6291 }
6292 defer googleapi.CloseBody(res)
6293 if err := googleapi.CheckResponse(res); err != nil {
6294 return nil, gensupport.WrapError(err)
6295 }
6296 ret := &GroupLicensesListResponse{
6297 ServerResponse: googleapi.ServerResponse{
6298 Header: res.Header,
6299 HTTPStatusCode: res.StatusCode,
6300 },
6301 }
6302 target := &ret
6303 if err := gensupport.DecodeResponse(target, res); err != nil {
6304 return nil, err
6305 }
6306 return ret, nil
6307 }
6308
6309 type GrouplicenseusersListCall struct {
6310 s *Service
6311 enterpriseId string
6312 groupLicenseId string
6313 urlParams_ gensupport.URLParams
6314 ifNoneMatch_ string
6315 ctx_ context.Context
6316 header_ http.Header
6317 }
6318
6319
6320
6321
6322
6323
6324
6325
6326 func (r *GrouplicenseusersService) List(enterpriseId string, groupLicenseId string) *GrouplicenseusersListCall {
6327 c := &GrouplicenseusersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6328 c.enterpriseId = enterpriseId
6329 c.groupLicenseId = groupLicenseId
6330 return c
6331 }
6332
6333
6334
6335
6336 func (c *GrouplicenseusersListCall) Fields(s ...googleapi.Field) *GrouplicenseusersListCall {
6337 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6338 return c
6339 }
6340
6341
6342
6343
6344 func (c *GrouplicenseusersListCall) IfNoneMatch(entityTag string) *GrouplicenseusersListCall {
6345 c.ifNoneMatch_ = entityTag
6346 return c
6347 }
6348
6349
6350 func (c *GrouplicenseusersListCall) Context(ctx context.Context) *GrouplicenseusersListCall {
6351 c.ctx_ = ctx
6352 return c
6353 }
6354
6355
6356
6357 func (c *GrouplicenseusersListCall) Header() http.Header {
6358 if c.header_ == nil {
6359 c.header_ = make(http.Header)
6360 }
6361 return c.header_
6362 }
6363
6364 func (c *GrouplicenseusersListCall) doRequest(alt string) (*http.Response, error) {
6365 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6366 if c.ifNoneMatch_ != "" {
6367 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6368 }
6369 var body io.Reader = nil
6370 c.urlParams_.Set("alt", alt)
6371 c.urlParams_.Set("prettyPrint", "false")
6372 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/groupLicenses/{groupLicenseId}/users")
6373 urls += "?" + c.urlParams_.Encode()
6374 req, err := http.NewRequest("GET", urls, body)
6375 if err != nil {
6376 return nil, err
6377 }
6378 req.Header = reqHeaders
6379 googleapi.Expand(req.URL, map[string]string{
6380 "enterpriseId": c.enterpriseId,
6381 "groupLicenseId": c.groupLicenseId,
6382 })
6383 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6384 }
6385
6386
6387
6388
6389
6390
6391
6392 func (c *GrouplicenseusersListCall) Do(opts ...googleapi.CallOption) (*GroupLicenseUsersListResponse, error) {
6393 gensupport.SetOptions(c.urlParams_, opts...)
6394 res, err := c.doRequest("json")
6395 if res != nil && res.StatusCode == http.StatusNotModified {
6396 if res.Body != nil {
6397 res.Body.Close()
6398 }
6399 return nil, gensupport.WrapError(&googleapi.Error{
6400 Code: res.StatusCode,
6401 Header: res.Header,
6402 })
6403 }
6404 if err != nil {
6405 return nil, err
6406 }
6407 defer googleapi.CloseBody(res)
6408 if err := googleapi.CheckResponse(res); err != nil {
6409 return nil, gensupport.WrapError(err)
6410 }
6411 ret := &GroupLicenseUsersListResponse{
6412 ServerResponse: googleapi.ServerResponse{
6413 Header: res.Header,
6414 HTTPStatusCode: res.StatusCode,
6415 },
6416 }
6417 target := &ret
6418 if err := gensupport.DecodeResponse(target, res); err != nil {
6419 return nil, err
6420 }
6421 return ret, nil
6422 }
6423
6424 type InstallsDeleteCall struct {
6425 s *Service
6426 enterpriseId string
6427 userId string
6428 deviceId string
6429 installId string
6430 urlParams_ gensupport.URLParams
6431 ctx_ context.Context
6432 header_ http.Header
6433 }
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447 func (r *InstallsService) Delete(enterpriseId string, userId string, deviceId string, installId string) *InstallsDeleteCall {
6448 c := &InstallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6449 c.enterpriseId = enterpriseId
6450 c.userId = userId
6451 c.deviceId = deviceId
6452 c.installId = installId
6453 return c
6454 }
6455
6456
6457
6458
6459 func (c *InstallsDeleteCall) Fields(s ...googleapi.Field) *InstallsDeleteCall {
6460 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6461 return c
6462 }
6463
6464
6465 func (c *InstallsDeleteCall) Context(ctx context.Context) *InstallsDeleteCall {
6466 c.ctx_ = ctx
6467 return c
6468 }
6469
6470
6471
6472 func (c *InstallsDeleteCall) Header() http.Header {
6473 if c.header_ == nil {
6474 c.header_ = make(http.Header)
6475 }
6476 return c.header_
6477 }
6478
6479 func (c *InstallsDeleteCall) doRequest(alt string) (*http.Response, error) {
6480 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6481 var body io.Reader = nil
6482 c.urlParams_.Set("alt", alt)
6483 c.urlParams_.Set("prettyPrint", "false")
6484 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}")
6485 urls += "?" + c.urlParams_.Encode()
6486 req, err := http.NewRequest("DELETE", urls, body)
6487 if err != nil {
6488 return nil, err
6489 }
6490 req.Header = reqHeaders
6491 googleapi.Expand(req.URL, map[string]string{
6492 "enterpriseId": c.enterpriseId,
6493 "userId": c.userId,
6494 "deviceId": c.deviceId,
6495 "installId": c.installId,
6496 })
6497 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6498 }
6499
6500
6501 func (c *InstallsDeleteCall) Do(opts ...googleapi.CallOption) error {
6502 gensupport.SetOptions(c.urlParams_, opts...)
6503 res, err := c.doRequest("json")
6504 if err != nil {
6505 return err
6506 }
6507 defer googleapi.CloseBody(res)
6508 if err := googleapi.CheckResponse(res); err != nil {
6509 return gensupport.WrapError(err)
6510 }
6511 return nil
6512 }
6513
6514 type InstallsGetCall struct {
6515 s *Service
6516 enterpriseId string
6517 userId string
6518 deviceId string
6519 installId string
6520 urlParams_ gensupport.URLParams
6521 ifNoneMatch_ string
6522 ctx_ context.Context
6523 header_ http.Header
6524 }
6525
6526
6527
6528
6529
6530
6531
6532
6533 func (r *InstallsService) Get(enterpriseId string, userId string, deviceId string, installId string) *InstallsGetCall {
6534 c := &InstallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6535 c.enterpriseId = enterpriseId
6536 c.userId = userId
6537 c.deviceId = deviceId
6538 c.installId = installId
6539 return c
6540 }
6541
6542
6543
6544
6545 func (c *InstallsGetCall) Fields(s ...googleapi.Field) *InstallsGetCall {
6546 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6547 return c
6548 }
6549
6550
6551
6552
6553 func (c *InstallsGetCall) IfNoneMatch(entityTag string) *InstallsGetCall {
6554 c.ifNoneMatch_ = entityTag
6555 return c
6556 }
6557
6558
6559 func (c *InstallsGetCall) Context(ctx context.Context) *InstallsGetCall {
6560 c.ctx_ = ctx
6561 return c
6562 }
6563
6564
6565
6566 func (c *InstallsGetCall) Header() http.Header {
6567 if c.header_ == nil {
6568 c.header_ = make(http.Header)
6569 }
6570 return c.header_
6571 }
6572
6573 func (c *InstallsGetCall) doRequest(alt string) (*http.Response, error) {
6574 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6575 if c.ifNoneMatch_ != "" {
6576 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6577 }
6578 var body io.Reader = nil
6579 c.urlParams_.Set("alt", alt)
6580 c.urlParams_.Set("prettyPrint", "false")
6581 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}")
6582 urls += "?" + c.urlParams_.Encode()
6583 req, err := http.NewRequest("GET", urls, body)
6584 if err != nil {
6585 return nil, err
6586 }
6587 req.Header = reqHeaders
6588 googleapi.Expand(req.URL, map[string]string{
6589 "enterpriseId": c.enterpriseId,
6590 "userId": c.userId,
6591 "deviceId": c.deviceId,
6592 "installId": c.installId,
6593 })
6594 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6595 }
6596
6597
6598
6599
6600
6601
6602 func (c *InstallsGetCall) Do(opts ...googleapi.CallOption) (*Install, error) {
6603 gensupport.SetOptions(c.urlParams_, opts...)
6604 res, err := c.doRequest("json")
6605 if res != nil && res.StatusCode == http.StatusNotModified {
6606 if res.Body != nil {
6607 res.Body.Close()
6608 }
6609 return nil, gensupport.WrapError(&googleapi.Error{
6610 Code: res.StatusCode,
6611 Header: res.Header,
6612 })
6613 }
6614 if err != nil {
6615 return nil, err
6616 }
6617 defer googleapi.CloseBody(res)
6618 if err := googleapi.CheckResponse(res); err != nil {
6619 return nil, gensupport.WrapError(err)
6620 }
6621 ret := &Install{
6622 ServerResponse: googleapi.ServerResponse{
6623 Header: res.Header,
6624 HTTPStatusCode: res.StatusCode,
6625 },
6626 }
6627 target := &ret
6628 if err := gensupport.DecodeResponse(target, res); err != nil {
6629 return nil, err
6630 }
6631 return ret, nil
6632 }
6633
6634 type InstallsListCall struct {
6635 s *Service
6636 enterpriseId string
6637 userId string
6638 deviceId string
6639 urlParams_ gensupport.URLParams
6640 ifNoneMatch_ string
6641 ctx_ context.Context
6642 header_ http.Header
6643 }
6644
6645
6646
6647
6648
6649
6650 func (r *InstallsService) List(enterpriseId string, userId string, deviceId string) *InstallsListCall {
6651 c := &InstallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6652 c.enterpriseId = enterpriseId
6653 c.userId = userId
6654 c.deviceId = deviceId
6655 return c
6656 }
6657
6658
6659
6660
6661 func (c *InstallsListCall) Fields(s ...googleapi.Field) *InstallsListCall {
6662 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6663 return c
6664 }
6665
6666
6667
6668
6669 func (c *InstallsListCall) IfNoneMatch(entityTag string) *InstallsListCall {
6670 c.ifNoneMatch_ = entityTag
6671 return c
6672 }
6673
6674
6675 func (c *InstallsListCall) Context(ctx context.Context) *InstallsListCall {
6676 c.ctx_ = ctx
6677 return c
6678 }
6679
6680
6681
6682 func (c *InstallsListCall) Header() http.Header {
6683 if c.header_ == nil {
6684 c.header_ = make(http.Header)
6685 }
6686 return c.header_
6687 }
6688
6689 func (c *InstallsListCall) doRequest(alt string) (*http.Response, error) {
6690 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6691 if c.ifNoneMatch_ != "" {
6692 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6693 }
6694 var body io.Reader = nil
6695 c.urlParams_.Set("alt", alt)
6696 c.urlParams_.Set("prettyPrint", "false")
6697 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs")
6698 urls += "?" + c.urlParams_.Encode()
6699 req, err := http.NewRequest("GET", urls, body)
6700 if err != nil {
6701 return nil, err
6702 }
6703 req.Header = reqHeaders
6704 googleapi.Expand(req.URL, map[string]string{
6705 "enterpriseId": c.enterpriseId,
6706 "userId": c.userId,
6707 "deviceId": c.deviceId,
6708 })
6709 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6710 }
6711
6712
6713
6714
6715
6716
6717
6718 func (c *InstallsListCall) Do(opts ...googleapi.CallOption) (*InstallsListResponse, error) {
6719 gensupport.SetOptions(c.urlParams_, opts...)
6720 res, err := c.doRequest("json")
6721 if res != nil && res.StatusCode == http.StatusNotModified {
6722 if res.Body != nil {
6723 res.Body.Close()
6724 }
6725 return nil, gensupport.WrapError(&googleapi.Error{
6726 Code: res.StatusCode,
6727 Header: res.Header,
6728 })
6729 }
6730 if err != nil {
6731 return nil, err
6732 }
6733 defer googleapi.CloseBody(res)
6734 if err := googleapi.CheckResponse(res); err != nil {
6735 return nil, gensupport.WrapError(err)
6736 }
6737 ret := &InstallsListResponse{
6738 ServerResponse: googleapi.ServerResponse{
6739 Header: res.Header,
6740 HTTPStatusCode: res.StatusCode,
6741 },
6742 }
6743 target := &ret
6744 if err := gensupport.DecodeResponse(target, res); err != nil {
6745 return nil, err
6746 }
6747 return ret, nil
6748 }
6749
6750 type InstallsUpdateCall struct {
6751 s *Service
6752 enterpriseId string
6753 userId string
6754 deviceId string
6755 installId string
6756 install *Install
6757 urlParams_ gensupport.URLParams
6758 ctx_ context.Context
6759 header_ http.Header
6760 }
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771 func (r *InstallsService) Update(enterpriseId string, userId string, deviceId string, installId string, install *Install) *InstallsUpdateCall {
6772 c := &InstallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6773 c.enterpriseId = enterpriseId
6774 c.userId = userId
6775 c.deviceId = deviceId
6776 c.installId = installId
6777 c.install = install
6778 return c
6779 }
6780
6781
6782
6783
6784 func (c *InstallsUpdateCall) Fields(s ...googleapi.Field) *InstallsUpdateCall {
6785 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6786 return c
6787 }
6788
6789
6790 func (c *InstallsUpdateCall) Context(ctx context.Context) *InstallsUpdateCall {
6791 c.ctx_ = ctx
6792 return c
6793 }
6794
6795
6796
6797 func (c *InstallsUpdateCall) Header() http.Header {
6798 if c.header_ == nil {
6799 c.header_ = make(http.Header)
6800 }
6801 return c.header_
6802 }
6803
6804 func (c *InstallsUpdateCall) doRequest(alt string) (*http.Response, error) {
6805 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6806 var body io.Reader = nil
6807 body, err := googleapi.WithoutDataWrapper.JSONReader(c.install)
6808 if err != nil {
6809 return nil, err
6810 }
6811 c.urlParams_.Set("alt", alt)
6812 c.urlParams_.Set("prettyPrint", "false")
6813 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}")
6814 urls += "?" + c.urlParams_.Encode()
6815 req, err := http.NewRequest("PUT", urls, body)
6816 if err != nil {
6817 return nil, err
6818 }
6819 req.Header = reqHeaders
6820 googleapi.Expand(req.URL, map[string]string{
6821 "enterpriseId": c.enterpriseId,
6822 "userId": c.userId,
6823 "deviceId": c.deviceId,
6824 "installId": c.installId,
6825 })
6826 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6827 }
6828
6829
6830
6831
6832
6833
6834 func (c *InstallsUpdateCall) Do(opts ...googleapi.CallOption) (*Install, error) {
6835 gensupport.SetOptions(c.urlParams_, opts...)
6836 res, err := c.doRequest("json")
6837 if res != nil && res.StatusCode == http.StatusNotModified {
6838 if res.Body != nil {
6839 res.Body.Close()
6840 }
6841 return nil, gensupport.WrapError(&googleapi.Error{
6842 Code: res.StatusCode,
6843 Header: res.Header,
6844 })
6845 }
6846 if err != nil {
6847 return nil, err
6848 }
6849 defer googleapi.CloseBody(res)
6850 if err := googleapi.CheckResponse(res); err != nil {
6851 return nil, gensupport.WrapError(err)
6852 }
6853 ret := &Install{
6854 ServerResponse: googleapi.ServerResponse{
6855 Header: res.Header,
6856 HTTPStatusCode: res.StatusCode,
6857 },
6858 }
6859 target := &ret
6860 if err := gensupport.DecodeResponse(target, res); err != nil {
6861 return nil, err
6862 }
6863 return ret, nil
6864 }
6865
6866 type ManagedconfigurationsfordeviceDeleteCall struct {
6867 s *Service
6868 enterpriseId string
6869 userId string
6870 deviceId string
6871 managedConfigurationForDeviceId string
6872 urlParams_ gensupport.URLParams
6873 ctx_ context.Context
6874 header_ http.Header
6875 }
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885 func (r *ManagedconfigurationsfordeviceService) Delete(enterpriseId string, userId string, deviceId string, managedConfigurationForDeviceId string) *ManagedconfigurationsfordeviceDeleteCall {
6886 c := &ManagedconfigurationsfordeviceDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6887 c.enterpriseId = enterpriseId
6888 c.userId = userId
6889 c.deviceId = deviceId
6890 c.managedConfigurationForDeviceId = managedConfigurationForDeviceId
6891 return c
6892 }
6893
6894
6895
6896
6897 func (c *ManagedconfigurationsfordeviceDeleteCall) Fields(s ...googleapi.Field) *ManagedconfigurationsfordeviceDeleteCall {
6898 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6899 return c
6900 }
6901
6902
6903 func (c *ManagedconfigurationsfordeviceDeleteCall) Context(ctx context.Context) *ManagedconfigurationsfordeviceDeleteCall {
6904 c.ctx_ = ctx
6905 return c
6906 }
6907
6908
6909
6910 func (c *ManagedconfigurationsfordeviceDeleteCall) Header() http.Header {
6911 if c.header_ == nil {
6912 c.header_ = make(http.Header)
6913 }
6914 return c.header_
6915 }
6916
6917 func (c *ManagedconfigurationsfordeviceDeleteCall) doRequest(alt string) (*http.Response, error) {
6918 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6919 var body io.Reader = nil
6920 c.urlParams_.Set("alt", alt)
6921 c.urlParams_.Set("prettyPrint", "false")
6922 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}")
6923 urls += "?" + c.urlParams_.Encode()
6924 req, err := http.NewRequest("DELETE", urls, body)
6925 if err != nil {
6926 return nil, err
6927 }
6928 req.Header = reqHeaders
6929 googleapi.Expand(req.URL, map[string]string{
6930 "enterpriseId": c.enterpriseId,
6931 "userId": c.userId,
6932 "deviceId": c.deviceId,
6933 "managedConfigurationForDeviceId": c.managedConfigurationForDeviceId,
6934 })
6935 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6936 }
6937
6938
6939 func (c *ManagedconfigurationsfordeviceDeleteCall) Do(opts ...googleapi.CallOption) error {
6940 gensupport.SetOptions(c.urlParams_, opts...)
6941 res, err := c.doRequest("json")
6942 if err != nil {
6943 return err
6944 }
6945 defer googleapi.CloseBody(res)
6946 if err := googleapi.CheckResponse(res); err != nil {
6947 return gensupport.WrapError(err)
6948 }
6949 return nil
6950 }
6951
6952 type ManagedconfigurationsfordeviceGetCall struct {
6953 s *Service
6954 enterpriseId string
6955 userId string
6956 deviceId string
6957 managedConfigurationForDeviceId string
6958 urlParams_ gensupport.URLParams
6959 ifNoneMatch_ string
6960 ctx_ context.Context
6961 header_ http.Header
6962 }
6963
6964
6965
6966
6967
6968
6969
6970
6971 func (r *ManagedconfigurationsfordeviceService) Get(enterpriseId string, userId string, deviceId string, managedConfigurationForDeviceId string) *ManagedconfigurationsfordeviceGetCall {
6972 c := &ManagedconfigurationsfordeviceGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6973 c.enterpriseId = enterpriseId
6974 c.userId = userId
6975 c.deviceId = deviceId
6976 c.managedConfigurationForDeviceId = managedConfigurationForDeviceId
6977 return c
6978 }
6979
6980
6981
6982
6983 func (c *ManagedconfigurationsfordeviceGetCall) Fields(s ...googleapi.Field) *ManagedconfigurationsfordeviceGetCall {
6984 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6985 return c
6986 }
6987
6988
6989
6990
6991 func (c *ManagedconfigurationsfordeviceGetCall) IfNoneMatch(entityTag string) *ManagedconfigurationsfordeviceGetCall {
6992 c.ifNoneMatch_ = entityTag
6993 return c
6994 }
6995
6996
6997 func (c *ManagedconfigurationsfordeviceGetCall) Context(ctx context.Context) *ManagedconfigurationsfordeviceGetCall {
6998 c.ctx_ = ctx
6999 return c
7000 }
7001
7002
7003
7004 func (c *ManagedconfigurationsfordeviceGetCall) Header() http.Header {
7005 if c.header_ == nil {
7006 c.header_ = make(http.Header)
7007 }
7008 return c.header_
7009 }
7010
7011 func (c *ManagedconfigurationsfordeviceGetCall) doRequest(alt string) (*http.Response, error) {
7012 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7013 if c.ifNoneMatch_ != "" {
7014 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7015 }
7016 var body io.Reader = nil
7017 c.urlParams_.Set("alt", alt)
7018 c.urlParams_.Set("prettyPrint", "false")
7019 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}")
7020 urls += "?" + c.urlParams_.Encode()
7021 req, err := http.NewRequest("GET", urls, body)
7022 if err != nil {
7023 return nil, err
7024 }
7025 req.Header = reqHeaders
7026 googleapi.Expand(req.URL, map[string]string{
7027 "enterpriseId": c.enterpriseId,
7028 "userId": c.userId,
7029 "deviceId": c.deviceId,
7030 "managedConfigurationForDeviceId": c.managedConfigurationForDeviceId,
7031 })
7032 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7033 }
7034
7035
7036
7037
7038
7039
7040
7041 func (c *ManagedconfigurationsfordeviceGetCall) Do(opts ...googleapi.CallOption) (*ManagedConfiguration, error) {
7042 gensupport.SetOptions(c.urlParams_, opts...)
7043 res, err := c.doRequest("json")
7044 if res != nil && res.StatusCode == http.StatusNotModified {
7045 if res.Body != nil {
7046 res.Body.Close()
7047 }
7048 return nil, gensupport.WrapError(&googleapi.Error{
7049 Code: res.StatusCode,
7050 Header: res.Header,
7051 })
7052 }
7053 if err != nil {
7054 return nil, err
7055 }
7056 defer googleapi.CloseBody(res)
7057 if err := googleapi.CheckResponse(res); err != nil {
7058 return nil, gensupport.WrapError(err)
7059 }
7060 ret := &ManagedConfiguration{
7061 ServerResponse: googleapi.ServerResponse{
7062 Header: res.Header,
7063 HTTPStatusCode: res.StatusCode,
7064 },
7065 }
7066 target := &ret
7067 if err := gensupport.DecodeResponse(target, res); err != nil {
7068 return nil, err
7069 }
7070 return ret, nil
7071 }
7072
7073 type ManagedconfigurationsfordeviceListCall struct {
7074 s *Service
7075 enterpriseId string
7076 userId string
7077 deviceId string
7078 urlParams_ gensupport.URLParams
7079 ifNoneMatch_ string
7080 ctx_ context.Context
7081 header_ http.Header
7082 }
7083
7084
7085
7086
7087
7088
7089
7090 func (r *ManagedconfigurationsfordeviceService) List(enterpriseId string, userId string, deviceId string) *ManagedconfigurationsfordeviceListCall {
7091 c := &ManagedconfigurationsfordeviceListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7092 c.enterpriseId = enterpriseId
7093 c.userId = userId
7094 c.deviceId = deviceId
7095 return c
7096 }
7097
7098
7099
7100
7101 func (c *ManagedconfigurationsfordeviceListCall) Fields(s ...googleapi.Field) *ManagedconfigurationsfordeviceListCall {
7102 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7103 return c
7104 }
7105
7106
7107
7108
7109 func (c *ManagedconfigurationsfordeviceListCall) IfNoneMatch(entityTag string) *ManagedconfigurationsfordeviceListCall {
7110 c.ifNoneMatch_ = entityTag
7111 return c
7112 }
7113
7114
7115 func (c *ManagedconfigurationsfordeviceListCall) Context(ctx context.Context) *ManagedconfigurationsfordeviceListCall {
7116 c.ctx_ = ctx
7117 return c
7118 }
7119
7120
7121
7122 func (c *ManagedconfigurationsfordeviceListCall) Header() http.Header {
7123 if c.header_ == nil {
7124 c.header_ = make(http.Header)
7125 }
7126 return c.header_
7127 }
7128
7129 func (c *ManagedconfigurationsfordeviceListCall) doRequest(alt string) (*http.Response, error) {
7130 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7131 if c.ifNoneMatch_ != "" {
7132 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7133 }
7134 var body io.Reader = nil
7135 c.urlParams_.Set("alt", alt)
7136 c.urlParams_.Set("prettyPrint", "false")
7137 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice")
7138 urls += "?" + c.urlParams_.Encode()
7139 req, err := http.NewRequest("GET", urls, body)
7140 if err != nil {
7141 return nil, err
7142 }
7143 req.Header = reqHeaders
7144 googleapi.Expand(req.URL, map[string]string{
7145 "enterpriseId": c.enterpriseId,
7146 "userId": c.userId,
7147 "deviceId": c.deviceId,
7148 })
7149 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7150 }
7151
7152
7153
7154
7155
7156
7157
7158 func (c *ManagedconfigurationsfordeviceListCall) Do(opts ...googleapi.CallOption) (*ManagedConfigurationsForDeviceListResponse, error) {
7159 gensupport.SetOptions(c.urlParams_, opts...)
7160 res, err := c.doRequest("json")
7161 if res != nil && res.StatusCode == http.StatusNotModified {
7162 if res.Body != nil {
7163 res.Body.Close()
7164 }
7165 return nil, gensupport.WrapError(&googleapi.Error{
7166 Code: res.StatusCode,
7167 Header: res.Header,
7168 })
7169 }
7170 if err != nil {
7171 return nil, err
7172 }
7173 defer googleapi.CloseBody(res)
7174 if err := googleapi.CheckResponse(res); err != nil {
7175 return nil, gensupport.WrapError(err)
7176 }
7177 ret := &ManagedConfigurationsForDeviceListResponse{
7178 ServerResponse: googleapi.ServerResponse{
7179 Header: res.Header,
7180 HTTPStatusCode: res.StatusCode,
7181 },
7182 }
7183 target := &ret
7184 if err := gensupport.DecodeResponse(target, res); err != nil {
7185 return nil, err
7186 }
7187 return ret, nil
7188 }
7189
7190 type ManagedconfigurationsfordeviceUpdateCall struct {
7191 s *Service
7192 enterpriseId string
7193 userId string
7194 deviceId string
7195 managedConfigurationForDeviceId string
7196 managedconfiguration *ManagedConfiguration
7197 urlParams_ gensupport.URLParams
7198 ctx_ context.Context
7199 header_ http.Header
7200 }
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210 func (r *ManagedconfigurationsfordeviceService) Update(enterpriseId string, userId string, deviceId string, managedConfigurationForDeviceId string, managedconfiguration *ManagedConfiguration) *ManagedconfigurationsfordeviceUpdateCall {
7211 c := &ManagedconfigurationsfordeviceUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7212 c.enterpriseId = enterpriseId
7213 c.userId = userId
7214 c.deviceId = deviceId
7215 c.managedConfigurationForDeviceId = managedConfigurationForDeviceId
7216 c.managedconfiguration = managedconfiguration
7217 return c
7218 }
7219
7220
7221
7222
7223 func (c *ManagedconfigurationsfordeviceUpdateCall) Fields(s ...googleapi.Field) *ManagedconfigurationsfordeviceUpdateCall {
7224 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7225 return c
7226 }
7227
7228
7229 func (c *ManagedconfigurationsfordeviceUpdateCall) Context(ctx context.Context) *ManagedconfigurationsfordeviceUpdateCall {
7230 c.ctx_ = ctx
7231 return c
7232 }
7233
7234
7235
7236 func (c *ManagedconfigurationsfordeviceUpdateCall) Header() http.Header {
7237 if c.header_ == nil {
7238 c.header_ = make(http.Header)
7239 }
7240 return c.header_
7241 }
7242
7243 func (c *ManagedconfigurationsfordeviceUpdateCall) doRequest(alt string) (*http.Response, error) {
7244 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7245 var body io.Reader = nil
7246 body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedconfiguration)
7247 if err != nil {
7248 return nil, err
7249 }
7250 c.urlParams_.Set("alt", alt)
7251 c.urlParams_.Set("prettyPrint", "false")
7252 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}")
7253 urls += "?" + c.urlParams_.Encode()
7254 req, err := http.NewRequest("PUT", urls, body)
7255 if err != nil {
7256 return nil, err
7257 }
7258 req.Header = reqHeaders
7259 googleapi.Expand(req.URL, map[string]string{
7260 "enterpriseId": c.enterpriseId,
7261 "userId": c.userId,
7262 "deviceId": c.deviceId,
7263 "managedConfigurationForDeviceId": c.managedConfigurationForDeviceId,
7264 })
7265 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7266 }
7267
7268
7269
7270
7271
7272
7273
7274 func (c *ManagedconfigurationsfordeviceUpdateCall) Do(opts ...googleapi.CallOption) (*ManagedConfiguration, error) {
7275 gensupport.SetOptions(c.urlParams_, opts...)
7276 res, err := c.doRequest("json")
7277 if res != nil && res.StatusCode == http.StatusNotModified {
7278 if res.Body != nil {
7279 res.Body.Close()
7280 }
7281 return nil, gensupport.WrapError(&googleapi.Error{
7282 Code: res.StatusCode,
7283 Header: res.Header,
7284 })
7285 }
7286 if err != nil {
7287 return nil, err
7288 }
7289 defer googleapi.CloseBody(res)
7290 if err := googleapi.CheckResponse(res); err != nil {
7291 return nil, gensupport.WrapError(err)
7292 }
7293 ret := &ManagedConfiguration{
7294 ServerResponse: googleapi.ServerResponse{
7295 Header: res.Header,
7296 HTTPStatusCode: res.StatusCode,
7297 },
7298 }
7299 target := &ret
7300 if err := gensupport.DecodeResponse(target, res); err != nil {
7301 return nil, err
7302 }
7303 return ret, nil
7304 }
7305
7306 type ManagedconfigurationsforuserDeleteCall struct {
7307 s *Service
7308 enterpriseId string
7309 userId string
7310 managedConfigurationForUserId string
7311 urlParams_ gensupport.URLParams
7312 ctx_ context.Context
7313 header_ http.Header
7314 }
7315
7316
7317
7318
7319
7320
7321
7322
7323 func (r *ManagedconfigurationsforuserService) Delete(enterpriseId string, userId string, managedConfigurationForUserId string) *ManagedconfigurationsforuserDeleteCall {
7324 c := &ManagedconfigurationsforuserDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7325 c.enterpriseId = enterpriseId
7326 c.userId = userId
7327 c.managedConfigurationForUserId = managedConfigurationForUserId
7328 return c
7329 }
7330
7331
7332
7333
7334 func (c *ManagedconfigurationsforuserDeleteCall) Fields(s ...googleapi.Field) *ManagedconfigurationsforuserDeleteCall {
7335 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7336 return c
7337 }
7338
7339
7340 func (c *ManagedconfigurationsforuserDeleteCall) Context(ctx context.Context) *ManagedconfigurationsforuserDeleteCall {
7341 c.ctx_ = ctx
7342 return c
7343 }
7344
7345
7346
7347 func (c *ManagedconfigurationsforuserDeleteCall) Header() http.Header {
7348 if c.header_ == nil {
7349 c.header_ = make(http.Header)
7350 }
7351 return c.header_
7352 }
7353
7354 func (c *ManagedconfigurationsforuserDeleteCall) doRequest(alt string) (*http.Response, error) {
7355 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7356 var body io.Reader = nil
7357 c.urlParams_.Set("alt", alt)
7358 c.urlParams_.Set("prettyPrint", "false")
7359 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}")
7360 urls += "?" + c.urlParams_.Encode()
7361 req, err := http.NewRequest("DELETE", urls, body)
7362 if err != nil {
7363 return nil, err
7364 }
7365 req.Header = reqHeaders
7366 googleapi.Expand(req.URL, map[string]string{
7367 "enterpriseId": c.enterpriseId,
7368 "userId": c.userId,
7369 "managedConfigurationForUserId": c.managedConfigurationForUserId,
7370 })
7371 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7372 }
7373
7374
7375 func (c *ManagedconfigurationsforuserDeleteCall) Do(opts ...googleapi.CallOption) error {
7376 gensupport.SetOptions(c.urlParams_, opts...)
7377 res, err := c.doRequest("json")
7378 if err != nil {
7379 return err
7380 }
7381 defer googleapi.CloseBody(res)
7382 if err := googleapi.CheckResponse(res); err != nil {
7383 return gensupport.WrapError(err)
7384 }
7385 return nil
7386 }
7387
7388 type ManagedconfigurationsforuserGetCall struct {
7389 s *Service
7390 enterpriseId string
7391 userId string
7392 managedConfigurationForUserId string
7393 urlParams_ gensupport.URLParams
7394 ifNoneMatch_ string
7395 ctx_ context.Context
7396 header_ http.Header
7397 }
7398
7399
7400
7401
7402
7403
7404
7405
7406 func (r *ManagedconfigurationsforuserService) Get(enterpriseId string, userId string, managedConfigurationForUserId string) *ManagedconfigurationsforuserGetCall {
7407 c := &ManagedconfigurationsforuserGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7408 c.enterpriseId = enterpriseId
7409 c.userId = userId
7410 c.managedConfigurationForUserId = managedConfigurationForUserId
7411 return c
7412 }
7413
7414
7415
7416
7417 func (c *ManagedconfigurationsforuserGetCall) Fields(s ...googleapi.Field) *ManagedconfigurationsforuserGetCall {
7418 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7419 return c
7420 }
7421
7422
7423
7424
7425 func (c *ManagedconfigurationsforuserGetCall) IfNoneMatch(entityTag string) *ManagedconfigurationsforuserGetCall {
7426 c.ifNoneMatch_ = entityTag
7427 return c
7428 }
7429
7430
7431 func (c *ManagedconfigurationsforuserGetCall) Context(ctx context.Context) *ManagedconfigurationsforuserGetCall {
7432 c.ctx_ = ctx
7433 return c
7434 }
7435
7436
7437
7438 func (c *ManagedconfigurationsforuserGetCall) Header() http.Header {
7439 if c.header_ == nil {
7440 c.header_ = make(http.Header)
7441 }
7442 return c.header_
7443 }
7444
7445 func (c *ManagedconfigurationsforuserGetCall) doRequest(alt string) (*http.Response, error) {
7446 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7447 if c.ifNoneMatch_ != "" {
7448 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7449 }
7450 var body io.Reader = nil
7451 c.urlParams_.Set("alt", alt)
7452 c.urlParams_.Set("prettyPrint", "false")
7453 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}")
7454 urls += "?" + c.urlParams_.Encode()
7455 req, err := http.NewRequest("GET", urls, body)
7456 if err != nil {
7457 return nil, err
7458 }
7459 req.Header = reqHeaders
7460 googleapi.Expand(req.URL, map[string]string{
7461 "enterpriseId": c.enterpriseId,
7462 "userId": c.userId,
7463 "managedConfigurationForUserId": c.managedConfigurationForUserId,
7464 })
7465 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7466 }
7467
7468
7469
7470
7471
7472
7473
7474 func (c *ManagedconfigurationsforuserGetCall) Do(opts ...googleapi.CallOption) (*ManagedConfiguration, error) {
7475 gensupport.SetOptions(c.urlParams_, opts...)
7476 res, err := c.doRequest("json")
7477 if res != nil && res.StatusCode == http.StatusNotModified {
7478 if res.Body != nil {
7479 res.Body.Close()
7480 }
7481 return nil, gensupport.WrapError(&googleapi.Error{
7482 Code: res.StatusCode,
7483 Header: res.Header,
7484 })
7485 }
7486 if err != nil {
7487 return nil, err
7488 }
7489 defer googleapi.CloseBody(res)
7490 if err := googleapi.CheckResponse(res); err != nil {
7491 return nil, gensupport.WrapError(err)
7492 }
7493 ret := &ManagedConfiguration{
7494 ServerResponse: googleapi.ServerResponse{
7495 Header: res.Header,
7496 HTTPStatusCode: res.StatusCode,
7497 },
7498 }
7499 target := &ret
7500 if err := gensupport.DecodeResponse(target, res); err != nil {
7501 return nil, err
7502 }
7503 return ret, nil
7504 }
7505
7506 type ManagedconfigurationsforuserListCall struct {
7507 s *Service
7508 enterpriseId string
7509 userId string
7510 urlParams_ gensupport.URLParams
7511 ifNoneMatch_ string
7512 ctx_ context.Context
7513 header_ http.Header
7514 }
7515
7516
7517
7518
7519
7520
7521 func (r *ManagedconfigurationsforuserService) List(enterpriseId string, userId string) *ManagedconfigurationsforuserListCall {
7522 c := &ManagedconfigurationsforuserListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7523 c.enterpriseId = enterpriseId
7524 c.userId = userId
7525 return c
7526 }
7527
7528
7529
7530
7531 func (c *ManagedconfigurationsforuserListCall) Fields(s ...googleapi.Field) *ManagedconfigurationsforuserListCall {
7532 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7533 return c
7534 }
7535
7536
7537
7538
7539 func (c *ManagedconfigurationsforuserListCall) IfNoneMatch(entityTag string) *ManagedconfigurationsforuserListCall {
7540 c.ifNoneMatch_ = entityTag
7541 return c
7542 }
7543
7544
7545 func (c *ManagedconfigurationsforuserListCall) Context(ctx context.Context) *ManagedconfigurationsforuserListCall {
7546 c.ctx_ = ctx
7547 return c
7548 }
7549
7550
7551
7552 func (c *ManagedconfigurationsforuserListCall) Header() http.Header {
7553 if c.header_ == nil {
7554 c.header_ = make(http.Header)
7555 }
7556 return c.header_
7557 }
7558
7559 func (c *ManagedconfigurationsforuserListCall) doRequest(alt string) (*http.Response, error) {
7560 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7561 if c.ifNoneMatch_ != "" {
7562 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7563 }
7564 var body io.Reader = nil
7565 c.urlParams_.Set("alt", alt)
7566 c.urlParams_.Set("prettyPrint", "false")
7567 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser")
7568 urls += "?" + c.urlParams_.Encode()
7569 req, err := http.NewRequest("GET", urls, body)
7570 if err != nil {
7571 return nil, err
7572 }
7573 req.Header = reqHeaders
7574 googleapi.Expand(req.URL, map[string]string{
7575 "enterpriseId": c.enterpriseId,
7576 "userId": c.userId,
7577 })
7578 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7579 }
7580
7581
7582
7583
7584
7585
7586
7587 func (c *ManagedconfigurationsforuserListCall) Do(opts ...googleapi.CallOption) (*ManagedConfigurationsForUserListResponse, error) {
7588 gensupport.SetOptions(c.urlParams_, opts...)
7589 res, err := c.doRequest("json")
7590 if res != nil && res.StatusCode == http.StatusNotModified {
7591 if res.Body != nil {
7592 res.Body.Close()
7593 }
7594 return nil, gensupport.WrapError(&googleapi.Error{
7595 Code: res.StatusCode,
7596 Header: res.Header,
7597 })
7598 }
7599 if err != nil {
7600 return nil, err
7601 }
7602 defer googleapi.CloseBody(res)
7603 if err := googleapi.CheckResponse(res); err != nil {
7604 return nil, gensupport.WrapError(err)
7605 }
7606 ret := &ManagedConfigurationsForUserListResponse{
7607 ServerResponse: googleapi.ServerResponse{
7608 Header: res.Header,
7609 HTTPStatusCode: res.StatusCode,
7610 },
7611 }
7612 target := &ret
7613 if err := gensupport.DecodeResponse(target, res); err != nil {
7614 return nil, err
7615 }
7616 return ret, nil
7617 }
7618
7619 type ManagedconfigurationsforuserUpdateCall struct {
7620 s *Service
7621 enterpriseId string
7622 userId string
7623 managedConfigurationForUserId string
7624 managedconfiguration *ManagedConfiguration
7625 urlParams_ gensupport.URLParams
7626 ctx_ context.Context
7627 header_ http.Header
7628 }
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641 func (r *ManagedconfigurationsforuserService) Update(enterpriseId string, userId string, managedConfigurationForUserId string, managedconfiguration *ManagedConfiguration) *ManagedconfigurationsforuserUpdateCall {
7642 c := &ManagedconfigurationsforuserUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7643 c.enterpriseId = enterpriseId
7644 c.userId = userId
7645 c.managedConfigurationForUserId = managedConfigurationForUserId
7646 c.managedconfiguration = managedconfiguration
7647 return c
7648 }
7649
7650
7651
7652
7653 func (c *ManagedconfigurationsforuserUpdateCall) Fields(s ...googleapi.Field) *ManagedconfigurationsforuserUpdateCall {
7654 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7655 return c
7656 }
7657
7658
7659 func (c *ManagedconfigurationsforuserUpdateCall) Context(ctx context.Context) *ManagedconfigurationsforuserUpdateCall {
7660 c.ctx_ = ctx
7661 return c
7662 }
7663
7664
7665
7666 func (c *ManagedconfigurationsforuserUpdateCall) Header() http.Header {
7667 if c.header_ == nil {
7668 c.header_ = make(http.Header)
7669 }
7670 return c.header_
7671 }
7672
7673 func (c *ManagedconfigurationsforuserUpdateCall) doRequest(alt string) (*http.Response, error) {
7674 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7675 var body io.Reader = nil
7676 body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedconfiguration)
7677 if err != nil {
7678 return nil, err
7679 }
7680 c.urlParams_.Set("alt", alt)
7681 c.urlParams_.Set("prettyPrint", "false")
7682 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}")
7683 urls += "?" + c.urlParams_.Encode()
7684 req, err := http.NewRequest("PUT", urls, body)
7685 if err != nil {
7686 return nil, err
7687 }
7688 req.Header = reqHeaders
7689 googleapi.Expand(req.URL, map[string]string{
7690 "enterpriseId": c.enterpriseId,
7691 "userId": c.userId,
7692 "managedConfigurationForUserId": c.managedConfigurationForUserId,
7693 })
7694 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7695 }
7696
7697
7698
7699
7700
7701
7702
7703 func (c *ManagedconfigurationsforuserUpdateCall) Do(opts ...googleapi.CallOption) (*ManagedConfiguration, error) {
7704 gensupport.SetOptions(c.urlParams_, opts...)
7705 res, err := c.doRequest("json")
7706 if res != nil && res.StatusCode == http.StatusNotModified {
7707 if res.Body != nil {
7708 res.Body.Close()
7709 }
7710 return nil, gensupport.WrapError(&googleapi.Error{
7711 Code: res.StatusCode,
7712 Header: res.Header,
7713 })
7714 }
7715 if err != nil {
7716 return nil, err
7717 }
7718 defer googleapi.CloseBody(res)
7719 if err := googleapi.CheckResponse(res); err != nil {
7720 return nil, gensupport.WrapError(err)
7721 }
7722 ret := &ManagedConfiguration{
7723 ServerResponse: googleapi.ServerResponse{
7724 Header: res.Header,
7725 HTTPStatusCode: res.StatusCode,
7726 },
7727 }
7728 target := &ret
7729 if err := gensupport.DecodeResponse(target, res); err != nil {
7730 return nil, err
7731 }
7732 return ret, nil
7733 }
7734
7735 type ManagedconfigurationssettingsListCall struct {
7736 s *Service
7737 enterpriseId string
7738 productId string
7739 urlParams_ gensupport.URLParams
7740 ifNoneMatch_ string
7741 ctx_ context.Context
7742 header_ http.Header
7743 }
7744
7745
7746
7747
7748
7749
7750 func (r *ManagedconfigurationssettingsService) List(enterpriseId string, productId string) *ManagedconfigurationssettingsListCall {
7751 c := &ManagedconfigurationssettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7752 c.enterpriseId = enterpriseId
7753 c.productId = productId
7754 return c
7755 }
7756
7757
7758
7759
7760 func (c *ManagedconfigurationssettingsListCall) Fields(s ...googleapi.Field) *ManagedconfigurationssettingsListCall {
7761 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7762 return c
7763 }
7764
7765
7766
7767
7768 func (c *ManagedconfigurationssettingsListCall) IfNoneMatch(entityTag string) *ManagedconfigurationssettingsListCall {
7769 c.ifNoneMatch_ = entityTag
7770 return c
7771 }
7772
7773
7774 func (c *ManagedconfigurationssettingsListCall) Context(ctx context.Context) *ManagedconfigurationssettingsListCall {
7775 c.ctx_ = ctx
7776 return c
7777 }
7778
7779
7780
7781 func (c *ManagedconfigurationssettingsListCall) Header() http.Header {
7782 if c.header_ == nil {
7783 c.header_ = make(http.Header)
7784 }
7785 return c.header_
7786 }
7787
7788 func (c *ManagedconfigurationssettingsListCall) doRequest(alt string) (*http.Response, error) {
7789 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7790 if c.ifNoneMatch_ != "" {
7791 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7792 }
7793 var body io.Reader = nil
7794 c.urlParams_.Set("alt", alt)
7795 c.urlParams_.Set("prettyPrint", "false")
7796 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/managedConfigurationsSettings")
7797 urls += "?" + c.urlParams_.Encode()
7798 req, err := http.NewRequest("GET", urls, body)
7799 if err != nil {
7800 return nil, err
7801 }
7802 req.Header = reqHeaders
7803 googleapi.Expand(req.URL, map[string]string{
7804 "enterpriseId": c.enterpriseId,
7805 "productId": c.productId,
7806 })
7807 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7808 }
7809
7810
7811
7812
7813
7814
7815
7816 func (c *ManagedconfigurationssettingsListCall) Do(opts ...googleapi.CallOption) (*ManagedConfigurationsSettingsListResponse, error) {
7817 gensupport.SetOptions(c.urlParams_, opts...)
7818 res, err := c.doRequest("json")
7819 if res != nil && res.StatusCode == http.StatusNotModified {
7820 if res.Body != nil {
7821 res.Body.Close()
7822 }
7823 return nil, gensupport.WrapError(&googleapi.Error{
7824 Code: res.StatusCode,
7825 Header: res.Header,
7826 })
7827 }
7828 if err != nil {
7829 return nil, err
7830 }
7831 defer googleapi.CloseBody(res)
7832 if err := googleapi.CheckResponse(res); err != nil {
7833 return nil, gensupport.WrapError(err)
7834 }
7835 ret := &ManagedConfigurationsSettingsListResponse{
7836 ServerResponse: googleapi.ServerResponse{
7837 Header: res.Header,
7838 HTTPStatusCode: res.StatusCode,
7839 },
7840 }
7841 target := &ret
7842 if err := gensupport.DecodeResponse(target, res); err != nil {
7843 return nil, err
7844 }
7845 return ret, nil
7846 }
7847
7848 type PermissionsGetCall struct {
7849 s *Service
7850 permissionId string
7851 urlParams_ gensupport.URLParams
7852 ifNoneMatch_ string
7853 ctx_ context.Context
7854 header_ http.Header
7855 }
7856
7857
7858
7859
7860
7861 func (r *PermissionsService) Get(permissionId string) *PermissionsGetCall {
7862 c := &PermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7863 c.permissionId = permissionId
7864 return c
7865 }
7866
7867
7868
7869 func (c *PermissionsGetCall) Language(language string) *PermissionsGetCall {
7870 c.urlParams_.Set("language", language)
7871 return c
7872 }
7873
7874
7875
7876
7877 func (c *PermissionsGetCall) Fields(s ...googleapi.Field) *PermissionsGetCall {
7878 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7879 return c
7880 }
7881
7882
7883
7884
7885 func (c *PermissionsGetCall) IfNoneMatch(entityTag string) *PermissionsGetCall {
7886 c.ifNoneMatch_ = entityTag
7887 return c
7888 }
7889
7890
7891 func (c *PermissionsGetCall) Context(ctx context.Context) *PermissionsGetCall {
7892 c.ctx_ = ctx
7893 return c
7894 }
7895
7896
7897
7898 func (c *PermissionsGetCall) Header() http.Header {
7899 if c.header_ == nil {
7900 c.header_ = make(http.Header)
7901 }
7902 return c.header_
7903 }
7904
7905 func (c *PermissionsGetCall) doRequest(alt string) (*http.Response, error) {
7906 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7907 if c.ifNoneMatch_ != "" {
7908 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7909 }
7910 var body io.Reader = nil
7911 c.urlParams_.Set("alt", alt)
7912 c.urlParams_.Set("prettyPrint", "false")
7913 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/permissions/{permissionId}")
7914 urls += "?" + c.urlParams_.Encode()
7915 req, err := http.NewRequest("GET", urls, body)
7916 if err != nil {
7917 return nil, err
7918 }
7919 req.Header = reqHeaders
7920 googleapi.Expand(req.URL, map[string]string{
7921 "permissionId": c.permissionId,
7922 })
7923 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7924 }
7925
7926
7927
7928
7929
7930
7931 func (c *PermissionsGetCall) Do(opts ...googleapi.CallOption) (*Permission, error) {
7932 gensupport.SetOptions(c.urlParams_, opts...)
7933 res, err := c.doRequest("json")
7934 if res != nil && res.StatusCode == http.StatusNotModified {
7935 if res.Body != nil {
7936 res.Body.Close()
7937 }
7938 return nil, gensupport.WrapError(&googleapi.Error{
7939 Code: res.StatusCode,
7940 Header: res.Header,
7941 })
7942 }
7943 if err != nil {
7944 return nil, err
7945 }
7946 defer googleapi.CloseBody(res)
7947 if err := googleapi.CheckResponse(res); err != nil {
7948 return nil, gensupport.WrapError(err)
7949 }
7950 ret := &Permission{
7951 ServerResponse: googleapi.ServerResponse{
7952 Header: res.Header,
7953 HTTPStatusCode: res.StatusCode,
7954 },
7955 }
7956 target := &ret
7957 if err := gensupport.DecodeResponse(target, res); err != nil {
7958 return nil, err
7959 }
7960 return ret, nil
7961 }
7962
7963 type ProductsApproveCall struct {
7964 s *Service
7965 enterpriseId string
7966 productId string
7967 productsapproverequest *ProductsApproveRequest
7968 urlParams_ gensupport.URLParams
7969 ctx_ context.Context
7970 header_ http.Header
7971 }
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982 func (r *ProductsService) Approve(enterpriseId string, productId string, productsapproverequest *ProductsApproveRequest) *ProductsApproveCall {
7983 c := &ProductsApproveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7984 c.enterpriseId = enterpriseId
7985 c.productId = productId
7986 c.productsapproverequest = productsapproverequest
7987 return c
7988 }
7989
7990
7991
7992
7993 func (c *ProductsApproveCall) Fields(s ...googleapi.Field) *ProductsApproveCall {
7994 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7995 return c
7996 }
7997
7998
7999 func (c *ProductsApproveCall) Context(ctx context.Context) *ProductsApproveCall {
8000 c.ctx_ = ctx
8001 return c
8002 }
8003
8004
8005
8006 func (c *ProductsApproveCall) Header() http.Header {
8007 if c.header_ == nil {
8008 c.header_ = make(http.Header)
8009 }
8010 return c.header_
8011 }
8012
8013 func (c *ProductsApproveCall) doRequest(alt string) (*http.Response, error) {
8014 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8015 var body io.Reader = nil
8016 body, err := googleapi.WithoutDataWrapper.JSONReader(c.productsapproverequest)
8017 if err != nil {
8018 return nil, err
8019 }
8020 c.urlParams_.Set("alt", alt)
8021 c.urlParams_.Set("prettyPrint", "false")
8022 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/approve")
8023 urls += "?" + c.urlParams_.Encode()
8024 req, err := http.NewRequest("POST", urls, body)
8025 if err != nil {
8026 return nil, err
8027 }
8028 req.Header = reqHeaders
8029 googleapi.Expand(req.URL, map[string]string{
8030 "enterpriseId": c.enterpriseId,
8031 "productId": c.productId,
8032 })
8033 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8034 }
8035
8036
8037 func (c *ProductsApproveCall) Do(opts ...googleapi.CallOption) error {
8038 gensupport.SetOptions(c.urlParams_, opts...)
8039 res, err := c.doRequest("json")
8040 if err != nil {
8041 return err
8042 }
8043 defer googleapi.CloseBody(res)
8044 if err := googleapi.CheckResponse(res); err != nil {
8045 return gensupport.WrapError(err)
8046 }
8047 return nil
8048 }
8049
8050 type ProductsGenerateApprovalUrlCall struct {
8051 s *Service
8052 enterpriseId string
8053 productId string
8054 urlParams_ gensupport.URLParams
8055 ctx_ context.Context
8056 header_ http.Header
8057 }
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072 func (r *ProductsService) GenerateApprovalUrl(enterpriseId string, productId string) *ProductsGenerateApprovalUrlCall {
8073 c := &ProductsGenerateApprovalUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8074 c.enterpriseId = enterpriseId
8075 c.productId = productId
8076 return c
8077 }
8078
8079
8080
8081
8082 func (c *ProductsGenerateApprovalUrlCall) LanguageCode(languageCode string) *ProductsGenerateApprovalUrlCall {
8083 c.urlParams_.Set("languageCode", languageCode)
8084 return c
8085 }
8086
8087
8088
8089
8090 func (c *ProductsGenerateApprovalUrlCall) Fields(s ...googleapi.Field) *ProductsGenerateApprovalUrlCall {
8091 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8092 return c
8093 }
8094
8095
8096 func (c *ProductsGenerateApprovalUrlCall) Context(ctx context.Context) *ProductsGenerateApprovalUrlCall {
8097 c.ctx_ = ctx
8098 return c
8099 }
8100
8101
8102
8103 func (c *ProductsGenerateApprovalUrlCall) Header() http.Header {
8104 if c.header_ == nil {
8105 c.header_ = make(http.Header)
8106 }
8107 return c.header_
8108 }
8109
8110 func (c *ProductsGenerateApprovalUrlCall) doRequest(alt string) (*http.Response, error) {
8111 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8112 var body io.Reader = nil
8113 c.urlParams_.Set("alt", alt)
8114 c.urlParams_.Set("prettyPrint", "false")
8115 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/generateApprovalUrl")
8116 urls += "?" + c.urlParams_.Encode()
8117 req, err := http.NewRequest("POST", urls, body)
8118 if err != nil {
8119 return nil, err
8120 }
8121 req.Header = reqHeaders
8122 googleapi.Expand(req.URL, map[string]string{
8123 "enterpriseId": c.enterpriseId,
8124 "productId": c.productId,
8125 })
8126 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8127 }
8128
8129
8130
8131
8132
8133
8134
8135 func (c *ProductsGenerateApprovalUrlCall) Do(opts ...googleapi.CallOption) (*ProductsGenerateApprovalUrlResponse, error) {
8136 gensupport.SetOptions(c.urlParams_, opts...)
8137 res, err := c.doRequest("json")
8138 if res != nil && res.StatusCode == http.StatusNotModified {
8139 if res.Body != nil {
8140 res.Body.Close()
8141 }
8142 return nil, gensupport.WrapError(&googleapi.Error{
8143 Code: res.StatusCode,
8144 Header: res.Header,
8145 })
8146 }
8147 if err != nil {
8148 return nil, err
8149 }
8150 defer googleapi.CloseBody(res)
8151 if err := googleapi.CheckResponse(res); err != nil {
8152 return nil, gensupport.WrapError(err)
8153 }
8154 ret := &ProductsGenerateApprovalUrlResponse{
8155 ServerResponse: googleapi.ServerResponse{
8156 Header: res.Header,
8157 HTTPStatusCode: res.StatusCode,
8158 },
8159 }
8160 target := &ret
8161 if err := gensupport.DecodeResponse(target, res); err != nil {
8162 return nil, err
8163 }
8164 return ret, nil
8165 }
8166
8167 type ProductsGetCall struct {
8168 s *Service
8169 enterpriseId string
8170 productId string
8171 urlParams_ gensupport.URLParams
8172 ifNoneMatch_ string
8173 ctx_ context.Context
8174 header_ http.Header
8175 }
8176
8177
8178
8179
8180
8181 func (r *ProductsService) Get(enterpriseId string, productId string) *ProductsGetCall {
8182 c := &ProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8183 c.enterpriseId = enterpriseId
8184 c.productId = productId
8185 return c
8186 }
8187
8188
8189
8190 func (c *ProductsGetCall) Language(language string) *ProductsGetCall {
8191 c.urlParams_.Set("language", language)
8192 return c
8193 }
8194
8195
8196
8197
8198 func (c *ProductsGetCall) Fields(s ...googleapi.Field) *ProductsGetCall {
8199 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8200 return c
8201 }
8202
8203
8204
8205
8206 func (c *ProductsGetCall) IfNoneMatch(entityTag string) *ProductsGetCall {
8207 c.ifNoneMatch_ = entityTag
8208 return c
8209 }
8210
8211
8212 func (c *ProductsGetCall) Context(ctx context.Context) *ProductsGetCall {
8213 c.ctx_ = ctx
8214 return c
8215 }
8216
8217
8218
8219 func (c *ProductsGetCall) Header() http.Header {
8220 if c.header_ == nil {
8221 c.header_ = make(http.Header)
8222 }
8223 return c.header_
8224 }
8225
8226 func (c *ProductsGetCall) doRequest(alt string) (*http.Response, error) {
8227 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8228 if c.ifNoneMatch_ != "" {
8229 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8230 }
8231 var body io.Reader = nil
8232 c.urlParams_.Set("alt", alt)
8233 c.urlParams_.Set("prettyPrint", "false")
8234 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}")
8235 urls += "?" + c.urlParams_.Encode()
8236 req, err := http.NewRequest("GET", urls, body)
8237 if err != nil {
8238 return nil, err
8239 }
8240 req.Header = reqHeaders
8241 googleapi.Expand(req.URL, map[string]string{
8242 "enterpriseId": c.enterpriseId,
8243 "productId": c.productId,
8244 })
8245 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8246 }
8247
8248
8249
8250
8251
8252
8253 func (c *ProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error) {
8254 gensupport.SetOptions(c.urlParams_, opts...)
8255 res, err := c.doRequest("json")
8256 if res != nil && res.StatusCode == http.StatusNotModified {
8257 if res.Body != nil {
8258 res.Body.Close()
8259 }
8260 return nil, gensupport.WrapError(&googleapi.Error{
8261 Code: res.StatusCode,
8262 Header: res.Header,
8263 })
8264 }
8265 if err != nil {
8266 return nil, err
8267 }
8268 defer googleapi.CloseBody(res)
8269 if err := googleapi.CheckResponse(res); err != nil {
8270 return nil, gensupport.WrapError(err)
8271 }
8272 ret := &Product{
8273 ServerResponse: googleapi.ServerResponse{
8274 Header: res.Header,
8275 HTTPStatusCode: res.StatusCode,
8276 },
8277 }
8278 target := &ret
8279 if err := gensupport.DecodeResponse(target, res); err != nil {
8280 return nil, err
8281 }
8282 return ret, nil
8283 }
8284
8285 type ProductsGetAppRestrictionsSchemaCall struct {
8286 s *Service
8287 enterpriseId string
8288 productId string
8289 urlParams_ gensupport.URLParams
8290 ifNoneMatch_ string
8291 ctx_ context.Context
8292 header_ http.Header
8293 }
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304 func (r *ProductsService) GetAppRestrictionsSchema(enterpriseId string, productId string) *ProductsGetAppRestrictionsSchemaCall {
8305 c := &ProductsGetAppRestrictionsSchemaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8306 c.enterpriseId = enterpriseId
8307 c.productId = productId
8308 return c
8309 }
8310
8311
8312
8313 func (c *ProductsGetAppRestrictionsSchemaCall) Language(language string) *ProductsGetAppRestrictionsSchemaCall {
8314 c.urlParams_.Set("language", language)
8315 return c
8316 }
8317
8318
8319
8320
8321 func (c *ProductsGetAppRestrictionsSchemaCall) Fields(s ...googleapi.Field) *ProductsGetAppRestrictionsSchemaCall {
8322 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8323 return c
8324 }
8325
8326
8327
8328
8329 func (c *ProductsGetAppRestrictionsSchemaCall) IfNoneMatch(entityTag string) *ProductsGetAppRestrictionsSchemaCall {
8330 c.ifNoneMatch_ = entityTag
8331 return c
8332 }
8333
8334
8335 func (c *ProductsGetAppRestrictionsSchemaCall) Context(ctx context.Context) *ProductsGetAppRestrictionsSchemaCall {
8336 c.ctx_ = ctx
8337 return c
8338 }
8339
8340
8341
8342 func (c *ProductsGetAppRestrictionsSchemaCall) Header() http.Header {
8343 if c.header_ == nil {
8344 c.header_ = make(http.Header)
8345 }
8346 return c.header_
8347 }
8348
8349 func (c *ProductsGetAppRestrictionsSchemaCall) doRequest(alt string) (*http.Response, error) {
8350 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8351 if c.ifNoneMatch_ != "" {
8352 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8353 }
8354 var body io.Reader = nil
8355 c.urlParams_.Set("alt", alt)
8356 c.urlParams_.Set("prettyPrint", "false")
8357 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/appRestrictionsSchema")
8358 urls += "?" + c.urlParams_.Encode()
8359 req, err := http.NewRequest("GET", urls, body)
8360 if err != nil {
8361 return nil, err
8362 }
8363 req.Header = reqHeaders
8364 googleapi.Expand(req.URL, map[string]string{
8365 "enterpriseId": c.enterpriseId,
8366 "productId": c.productId,
8367 })
8368 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8369 }
8370
8371
8372
8373
8374
8375
8376
8377 func (c *ProductsGetAppRestrictionsSchemaCall) Do(opts ...googleapi.CallOption) (*AppRestrictionsSchema, error) {
8378 gensupport.SetOptions(c.urlParams_, opts...)
8379 res, err := c.doRequest("json")
8380 if res != nil && res.StatusCode == http.StatusNotModified {
8381 if res.Body != nil {
8382 res.Body.Close()
8383 }
8384 return nil, gensupport.WrapError(&googleapi.Error{
8385 Code: res.StatusCode,
8386 Header: res.Header,
8387 })
8388 }
8389 if err != nil {
8390 return nil, err
8391 }
8392 defer googleapi.CloseBody(res)
8393 if err := googleapi.CheckResponse(res); err != nil {
8394 return nil, gensupport.WrapError(err)
8395 }
8396 ret := &AppRestrictionsSchema{
8397 ServerResponse: googleapi.ServerResponse{
8398 Header: res.Header,
8399 HTTPStatusCode: res.StatusCode,
8400 },
8401 }
8402 target := &ret
8403 if err := gensupport.DecodeResponse(target, res); err != nil {
8404 return nil, err
8405 }
8406 return ret, nil
8407 }
8408
8409 type ProductsGetPermissionsCall struct {
8410 s *Service
8411 enterpriseId string
8412 productId string
8413 urlParams_ gensupport.URLParams
8414 ifNoneMatch_ string
8415 ctx_ context.Context
8416 header_ http.Header
8417 }
8418
8419
8420
8421
8422
8423 func (r *ProductsService) GetPermissions(enterpriseId string, productId string) *ProductsGetPermissionsCall {
8424 c := &ProductsGetPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8425 c.enterpriseId = enterpriseId
8426 c.productId = productId
8427 return c
8428 }
8429
8430
8431
8432
8433 func (c *ProductsGetPermissionsCall) Fields(s ...googleapi.Field) *ProductsGetPermissionsCall {
8434 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8435 return c
8436 }
8437
8438
8439
8440
8441 func (c *ProductsGetPermissionsCall) IfNoneMatch(entityTag string) *ProductsGetPermissionsCall {
8442 c.ifNoneMatch_ = entityTag
8443 return c
8444 }
8445
8446
8447 func (c *ProductsGetPermissionsCall) Context(ctx context.Context) *ProductsGetPermissionsCall {
8448 c.ctx_ = ctx
8449 return c
8450 }
8451
8452
8453
8454 func (c *ProductsGetPermissionsCall) Header() http.Header {
8455 if c.header_ == nil {
8456 c.header_ = make(http.Header)
8457 }
8458 return c.header_
8459 }
8460
8461 func (c *ProductsGetPermissionsCall) doRequest(alt string) (*http.Response, error) {
8462 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8463 if c.ifNoneMatch_ != "" {
8464 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8465 }
8466 var body io.Reader = nil
8467 c.urlParams_.Set("alt", alt)
8468 c.urlParams_.Set("prettyPrint", "false")
8469 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/permissions")
8470 urls += "?" + c.urlParams_.Encode()
8471 req, err := http.NewRequest("GET", urls, body)
8472 if err != nil {
8473 return nil, err
8474 }
8475 req.Header = reqHeaders
8476 googleapi.Expand(req.URL, map[string]string{
8477 "enterpriseId": c.enterpriseId,
8478 "productId": c.productId,
8479 })
8480 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8481 }
8482
8483
8484
8485
8486
8487
8488
8489 func (c *ProductsGetPermissionsCall) Do(opts ...googleapi.CallOption) (*ProductPermissions, error) {
8490 gensupport.SetOptions(c.urlParams_, opts...)
8491 res, err := c.doRequest("json")
8492 if res != nil && res.StatusCode == http.StatusNotModified {
8493 if res.Body != nil {
8494 res.Body.Close()
8495 }
8496 return nil, gensupport.WrapError(&googleapi.Error{
8497 Code: res.StatusCode,
8498 Header: res.Header,
8499 })
8500 }
8501 if err != nil {
8502 return nil, err
8503 }
8504 defer googleapi.CloseBody(res)
8505 if err := googleapi.CheckResponse(res); err != nil {
8506 return nil, gensupport.WrapError(err)
8507 }
8508 ret := &ProductPermissions{
8509 ServerResponse: googleapi.ServerResponse{
8510 Header: res.Header,
8511 HTTPStatusCode: res.StatusCode,
8512 },
8513 }
8514 target := &ret
8515 if err := gensupport.DecodeResponse(target, res); err != nil {
8516 return nil, err
8517 }
8518 return ret, nil
8519 }
8520
8521 type ProductsListCall struct {
8522 s *Service
8523 enterpriseId string
8524 urlParams_ gensupport.URLParams
8525 ifNoneMatch_ string
8526 ctx_ context.Context
8527 header_ http.Header
8528 }
8529
8530
8531
8532
8533
8534
8535
8536 func (r *ProductsService) List(enterpriseId string) *ProductsListCall {
8537 c := &ProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8538 c.enterpriseId = enterpriseId
8539 return c
8540 }
8541
8542
8543
8544
8545 func (c *ProductsListCall) Approved(approved bool) *ProductsListCall {
8546 c.urlParams_.Set("approved", fmt.Sprint(approved))
8547 return c
8548 }
8549
8550
8551
8552
8553 func (c *ProductsListCall) Language(language string) *ProductsListCall {
8554 c.urlParams_.Set("language", language)
8555 return c
8556 }
8557
8558
8559
8560
8561 func (c *ProductsListCall) MaxResults(maxResults int64) *ProductsListCall {
8562 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
8563 return c
8564 }
8565
8566
8567
8568
8569
8570 func (c *ProductsListCall) Query(query string) *ProductsListCall {
8571 c.urlParams_.Set("query", query)
8572 return c
8573 }
8574
8575
8576
8577
8578 func (c *ProductsListCall) Token(token string) *ProductsListCall {
8579 c.urlParams_.Set("token", token)
8580 return c
8581 }
8582
8583
8584
8585
8586 func (c *ProductsListCall) Fields(s ...googleapi.Field) *ProductsListCall {
8587 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8588 return c
8589 }
8590
8591
8592
8593
8594 func (c *ProductsListCall) IfNoneMatch(entityTag string) *ProductsListCall {
8595 c.ifNoneMatch_ = entityTag
8596 return c
8597 }
8598
8599
8600 func (c *ProductsListCall) Context(ctx context.Context) *ProductsListCall {
8601 c.ctx_ = ctx
8602 return c
8603 }
8604
8605
8606
8607 func (c *ProductsListCall) Header() http.Header {
8608 if c.header_ == nil {
8609 c.header_ = make(http.Header)
8610 }
8611 return c.header_
8612 }
8613
8614 func (c *ProductsListCall) doRequest(alt string) (*http.Response, error) {
8615 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8616 if c.ifNoneMatch_ != "" {
8617 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8618 }
8619 var body io.Reader = nil
8620 c.urlParams_.Set("alt", alt)
8621 c.urlParams_.Set("prettyPrint", "false")
8622 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/products")
8623 urls += "?" + c.urlParams_.Encode()
8624 req, err := http.NewRequest("GET", urls, body)
8625 if err != nil {
8626 return nil, err
8627 }
8628 req.Header = reqHeaders
8629 googleapi.Expand(req.URL, map[string]string{
8630 "enterpriseId": c.enterpriseId,
8631 })
8632 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8633 }
8634
8635
8636
8637
8638
8639
8640
8641 func (c *ProductsListCall) Do(opts ...googleapi.CallOption) (*ProductsListResponse, error) {
8642 gensupport.SetOptions(c.urlParams_, opts...)
8643 res, err := c.doRequest("json")
8644 if res != nil && res.StatusCode == http.StatusNotModified {
8645 if res.Body != nil {
8646 res.Body.Close()
8647 }
8648 return nil, gensupport.WrapError(&googleapi.Error{
8649 Code: res.StatusCode,
8650 Header: res.Header,
8651 })
8652 }
8653 if err != nil {
8654 return nil, err
8655 }
8656 defer googleapi.CloseBody(res)
8657 if err := googleapi.CheckResponse(res); err != nil {
8658 return nil, gensupport.WrapError(err)
8659 }
8660 ret := &ProductsListResponse{
8661 ServerResponse: googleapi.ServerResponse{
8662 Header: res.Header,
8663 HTTPStatusCode: res.StatusCode,
8664 },
8665 }
8666 target := &ret
8667 if err := gensupport.DecodeResponse(target, res); err != nil {
8668 return nil, err
8669 }
8670 return ret, nil
8671 }
8672
8673 type ProductsUnapproveCall struct {
8674 s *Service
8675 enterpriseId string
8676 productId string
8677 urlParams_ gensupport.URLParams
8678 ctx_ context.Context
8679 header_ http.Header
8680 }
8681
8682
8683
8684
8685
8686
8687
8688
8689 func (r *ProductsService) Unapprove(enterpriseId string, productId string) *ProductsUnapproveCall {
8690 c := &ProductsUnapproveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8691 c.enterpriseId = enterpriseId
8692 c.productId = productId
8693 return c
8694 }
8695
8696
8697
8698
8699 func (c *ProductsUnapproveCall) Fields(s ...googleapi.Field) *ProductsUnapproveCall {
8700 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8701 return c
8702 }
8703
8704
8705 func (c *ProductsUnapproveCall) Context(ctx context.Context) *ProductsUnapproveCall {
8706 c.ctx_ = ctx
8707 return c
8708 }
8709
8710
8711
8712 func (c *ProductsUnapproveCall) Header() http.Header {
8713 if c.header_ == nil {
8714 c.header_ = make(http.Header)
8715 }
8716 return c.header_
8717 }
8718
8719 func (c *ProductsUnapproveCall) doRequest(alt string) (*http.Response, error) {
8720 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8721 var body io.Reader = nil
8722 c.urlParams_.Set("alt", alt)
8723 c.urlParams_.Set("prettyPrint", "false")
8724 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/unapprove")
8725 urls += "?" + c.urlParams_.Encode()
8726 req, err := http.NewRequest("POST", urls, body)
8727 if err != nil {
8728 return nil, err
8729 }
8730 req.Header = reqHeaders
8731 googleapi.Expand(req.URL, map[string]string{
8732 "enterpriseId": c.enterpriseId,
8733 "productId": c.productId,
8734 })
8735 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8736 }
8737
8738
8739 func (c *ProductsUnapproveCall) Do(opts ...googleapi.CallOption) error {
8740 gensupport.SetOptions(c.urlParams_, opts...)
8741 res, err := c.doRequest("json")
8742 if err != nil {
8743 return err
8744 }
8745 defer googleapi.CloseBody(res)
8746 if err := googleapi.CheckResponse(res); err != nil {
8747 return gensupport.WrapError(err)
8748 }
8749 return nil
8750 }
8751
8752 type ServiceaccountkeysDeleteCall struct {
8753 s *Service
8754 enterpriseId string
8755 keyId string
8756 urlParams_ gensupport.URLParams
8757 ctx_ context.Context
8758 header_ http.Header
8759 }
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769 func (r *ServiceaccountkeysService) Delete(enterpriseId string, keyId string) *ServiceaccountkeysDeleteCall {
8770 c := &ServiceaccountkeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8771 c.enterpriseId = enterpriseId
8772 c.keyId = keyId
8773 return c
8774 }
8775
8776
8777
8778
8779 func (c *ServiceaccountkeysDeleteCall) Fields(s ...googleapi.Field) *ServiceaccountkeysDeleteCall {
8780 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8781 return c
8782 }
8783
8784
8785 func (c *ServiceaccountkeysDeleteCall) Context(ctx context.Context) *ServiceaccountkeysDeleteCall {
8786 c.ctx_ = ctx
8787 return c
8788 }
8789
8790
8791
8792 func (c *ServiceaccountkeysDeleteCall) Header() http.Header {
8793 if c.header_ == nil {
8794 c.header_ = make(http.Header)
8795 }
8796 return c.header_
8797 }
8798
8799 func (c *ServiceaccountkeysDeleteCall) doRequest(alt string) (*http.Response, error) {
8800 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8801 var body io.Reader = nil
8802 c.urlParams_.Set("alt", alt)
8803 c.urlParams_.Set("prettyPrint", "false")
8804 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/serviceAccountKeys/{keyId}")
8805 urls += "?" + c.urlParams_.Encode()
8806 req, err := http.NewRequest("DELETE", urls, body)
8807 if err != nil {
8808 return nil, err
8809 }
8810 req.Header = reqHeaders
8811 googleapi.Expand(req.URL, map[string]string{
8812 "enterpriseId": c.enterpriseId,
8813 "keyId": c.keyId,
8814 })
8815 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8816 }
8817
8818
8819 func (c *ServiceaccountkeysDeleteCall) Do(opts ...googleapi.CallOption) error {
8820 gensupport.SetOptions(c.urlParams_, opts...)
8821 res, err := c.doRequest("json")
8822 if err != nil {
8823 return err
8824 }
8825 defer googleapi.CloseBody(res)
8826 if err := googleapi.CheckResponse(res); err != nil {
8827 return gensupport.WrapError(err)
8828 }
8829 return nil
8830 }
8831
8832 type ServiceaccountkeysInsertCall struct {
8833 s *Service
8834 enterpriseId string
8835 serviceaccountkey *ServiceAccountKey
8836 urlParams_ gensupport.URLParams
8837 ctx_ context.Context
8838 header_ http.Header
8839 }
8840
8841
8842
8843
8844
8845
8846
8847
8848 func (r *ServiceaccountkeysService) Insert(enterpriseId string, serviceaccountkey *ServiceAccountKey) *ServiceaccountkeysInsertCall {
8849 c := &ServiceaccountkeysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8850 c.enterpriseId = enterpriseId
8851 c.serviceaccountkey = serviceaccountkey
8852 return c
8853 }
8854
8855
8856
8857
8858 func (c *ServiceaccountkeysInsertCall) Fields(s ...googleapi.Field) *ServiceaccountkeysInsertCall {
8859 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8860 return c
8861 }
8862
8863
8864 func (c *ServiceaccountkeysInsertCall) Context(ctx context.Context) *ServiceaccountkeysInsertCall {
8865 c.ctx_ = ctx
8866 return c
8867 }
8868
8869
8870
8871 func (c *ServiceaccountkeysInsertCall) Header() http.Header {
8872 if c.header_ == nil {
8873 c.header_ = make(http.Header)
8874 }
8875 return c.header_
8876 }
8877
8878 func (c *ServiceaccountkeysInsertCall) doRequest(alt string) (*http.Response, error) {
8879 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8880 var body io.Reader = nil
8881 body, err := googleapi.WithoutDataWrapper.JSONReader(c.serviceaccountkey)
8882 if err != nil {
8883 return nil, err
8884 }
8885 c.urlParams_.Set("alt", alt)
8886 c.urlParams_.Set("prettyPrint", "false")
8887 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/serviceAccountKeys")
8888 urls += "?" + c.urlParams_.Encode()
8889 req, err := http.NewRequest("POST", urls, body)
8890 if err != nil {
8891 return nil, err
8892 }
8893 req.Header = reqHeaders
8894 googleapi.Expand(req.URL, map[string]string{
8895 "enterpriseId": c.enterpriseId,
8896 })
8897 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8898 }
8899
8900
8901
8902
8903
8904
8905
8906 func (c *ServiceaccountkeysInsertCall) Do(opts ...googleapi.CallOption) (*ServiceAccountKey, error) {
8907 gensupport.SetOptions(c.urlParams_, opts...)
8908 res, err := c.doRequest("json")
8909 if res != nil && res.StatusCode == http.StatusNotModified {
8910 if res.Body != nil {
8911 res.Body.Close()
8912 }
8913 return nil, gensupport.WrapError(&googleapi.Error{
8914 Code: res.StatusCode,
8915 Header: res.Header,
8916 })
8917 }
8918 if err != nil {
8919 return nil, err
8920 }
8921 defer googleapi.CloseBody(res)
8922 if err := googleapi.CheckResponse(res); err != nil {
8923 return nil, gensupport.WrapError(err)
8924 }
8925 ret := &ServiceAccountKey{
8926 ServerResponse: googleapi.ServerResponse{
8927 Header: res.Header,
8928 HTTPStatusCode: res.StatusCode,
8929 },
8930 }
8931 target := &ret
8932 if err := gensupport.DecodeResponse(target, res); err != nil {
8933 return nil, err
8934 }
8935 return ret, nil
8936 }
8937
8938 type ServiceaccountkeysListCall struct {
8939 s *Service
8940 enterpriseId string
8941 urlParams_ gensupport.URLParams
8942 ifNoneMatch_ string
8943 ctx_ context.Context
8944 header_ http.Header
8945 }
8946
8947
8948
8949
8950
8951
8952
8953
8954 func (r *ServiceaccountkeysService) List(enterpriseId string) *ServiceaccountkeysListCall {
8955 c := &ServiceaccountkeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8956 c.enterpriseId = enterpriseId
8957 return c
8958 }
8959
8960
8961
8962
8963 func (c *ServiceaccountkeysListCall) Fields(s ...googleapi.Field) *ServiceaccountkeysListCall {
8964 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8965 return c
8966 }
8967
8968
8969
8970
8971 func (c *ServiceaccountkeysListCall) IfNoneMatch(entityTag string) *ServiceaccountkeysListCall {
8972 c.ifNoneMatch_ = entityTag
8973 return c
8974 }
8975
8976
8977 func (c *ServiceaccountkeysListCall) Context(ctx context.Context) *ServiceaccountkeysListCall {
8978 c.ctx_ = ctx
8979 return c
8980 }
8981
8982
8983
8984 func (c *ServiceaccountkeysListCall) Header() http.Header {
8985 if c.header_ == nil {
8986 c.header_ = make(http.Header)
8987 }
8988 return c.header_
8989 }
8990
8991 func (c *ServiceaccountkeysListCall) doRequest(alt string) (*http.Response, error) {
8992 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8993 if c.ifNoneMatch_ != "" {
8994 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8995 }
8996 var body io.Reader = nil
8997 c.urlParams_.Set("alt", alt)
8998 c.urlParams_.Set("prettyPrint", "false")
8999 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/serviceAccountKeys")
9000 urls += "?" + c.urlParams_.Encode()
9001 req, err := http.NewRequest("GET", urls, body)
9002 if err != nil {
9003 return nil, err
9004 }
9005 req.Header = reqHeaders
9006 googleapi.Expand(req.URL, map[string]string{
9007 "enterpriseId": c.enterpriseId,
9008 })
9009 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9010 }
9011
9012
9013
9014
9015
9016
9017
9018 func (c *ServiceaccountkeysListCall) Do(opts ...googleapi.CallOption) (*ServiceAccountKeysListResponse, error) {
9019 gensupport.SetOptions(c.urlParams_, opts...)
9020 res, err := c.doRequest("json")
9021 if res != nil && res.StatusCode == http.StatusNotModified {
9022 if res.Body != nil {
9023 res.Body.Close()
9024 }
9025 return nil, gensupport.WrapError(&googleapi.Error{
9026 Code: res.StatusCode,
9027 Header: res.Header,
9028 })
9029 }
9030 if err != nil {
9031 return nil, err
9032 }
9033 defer googleapi.CloseBody(res)
9034 if err := googleapi.CheckResponse(res); err != nil {
9035 return nil, gensupport.WrapError(err)
9036 }
9037 ret := &ServiceAccountKeysListResponse{
9038 ServerResponse: googleapi.ServerResponse{
9039 Header: res.Header,
9040 HTTPStatusCode: res.StatusCode,
9041 },
9042 }
9043 target := &ret
9044 if err := gensupport.DecodeResponse(target, res); err != nil {
9045 return nil, err
9046 }
9047 return ret, nil
9048 }
9049
9050 type StorelayoutclustersDeleteCall struct {
9051 s *Service
9052 enterpriseId string
9053 pageId string
9054 clusterId string
9055 urlParams_ gensupport.URLParams
9056 ctx_ context.Context
9057 header_ http.Header
9058 }
9059
9060
9061
9062
9063
9064
9065 func (r *StorelayoutclustersService) Delete(enterpriseId string, pageId string, clusterId string) *StorelayoutclustersDeleteCall {
9066 c := &StorelayoutclustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9067 c.enterpriseId = enterpriseId
9068 c.pageId = pageId
9069 c.clusterId = clusterId
9070 return c
9071 }
9072
9073
9074
9075
9076 func (c *StorelayoutclustersDeleteCall) Fields(s ...googleapi.Field) *StorelayoutclustersDeleteCall {
9077 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9078 return c
9079 }
9080
9081
9082 func (c *StorelayoutclustersDeleteCall) Context(ctx context.Context) *StorelayoutclustersDeleteCall {
9083 c.ctx_ = ctx
9084 return c
9085 }
9086
9087
9088
9089 func (c *StorelayoutclustersDeleteCall) Header() http.Header {
9090 if c.header_ == nil {
9091 c.header_ = make(http.Header)
9092 }
9093 return c.header_
9094 }
9095
9096 func (c *StorelayoutclustersDeleteCall) doRequest(alt string) (*http.Response, error) {
9097 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9098 var body io.Reader = nil
9099 c.urlParams_.Set("alt", alt)
9100 c.urlParams_.Set("prettyPrint", "false")
9101 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters/{clusterId}")
9102 urls += "?" + c.urlParams_.Encode()
9103 req, err := http.NewRequest("DELETE", urls, body)
9104 if err != nil {
9105 return nil, err
9106 }
9107 req.Header = reqHeaders
9108 googleapi.Expand(req.URL, map[string]string{
9109 "enterpriseId": c.enterpriseId,
9110 "pageId": c.pageId,
9111 "clusterId": c.clusterId,
9112 })
9113 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9114 }
9115
9116
9117 func (c *StorelayoutclustersDeleteCall) Do(opts ...googleapi.CallOption) error {
9118 gensupport.SetOptions(c.urlParams_, opts...)
9119 res, err := c.doRequest("json")
9120 if err != nil {
9121 return err
9122 }
9123 defer googleapi.CloseBody(res)
9124 if err := googleapi.CheckResponse(res); err != nil {
9125 return gensupport.WrapError(err)
9126 }
9127 return nil
9128 }
9129
9130 type StorelayoutclustersGetCall struct {
9131 s *Service
9132 enterpriseId string
9133 pageId string
9134 clusterId string
9135 urlParams_ gensupport.URLParams
9136 ifNoneMatch_ string
9137 ctx_ context.Context
9138 header_ http.Header
9139 }
9140
9141
9142
9143
9144
9145
9146 func (r *StorelayoutclustersService) Get(enterpriseId string, pageId string, clusterId string) *StorelayoutclustersGetCall {
9147 c := &StorelayoutclustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9148 c.enterpriseId = enterpriseId
9149 c.pageId = pageId
9150 c.clusterId = clusterId
9151 return c
9152 }
9153
9154
9155
9156
9157 func (c *StorelayoutclustersGetCall) Fields(s ...googleapi.Field) *StorelayoutclustersGetCall {
9158 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9159 return c
9160 }
9161
9162
9163
9164
9165 func (c *StorelayoutclustersGetCall) IfNoneMatch(entityTag string) *StorelayoutclustersGetCall {
9166 c.ifNoneMatch_ = entityTag
9167 return c
9168 }
9169
9170
9171 func (c *StorelayoutclustersGetCall) Context(ctx context.Context) *StorelayoutclustersGetCall {
9172 c.ctx_ = ctx
9173 return c
9174 }
9175
9176
9177
9178 func (c *StorelayoutclustersGetCall) Header() http.Header {
9179 if c.header_ == nil {
9180 c.header_ = make(http.Header)
9181 }
9182 return c.header_
9183 }
9184
9185 func (c *StorelayoutclustersGetCall) doRequest(alt string) (*http.Response, error) {
9186 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9187 if c.ifNoneMatch_ != "" {
9188 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9189 }
9190 var body io.Reader = nil
9191 c.urlParams_.Set("alt", alt)
9192 c.urlParams_.Set("prettyPrint", "false")
9193 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters/{clusterId}")
9194 urls += "?" + c.urlParams_.Encode()
9195 req, err := http.NewRequest("GET", urls, body)
9196 if err != nil {
9197 return nil, err
9198 }
9199 req.Header = reqHeaders
9200 googleapi.Expand(req.URL, map[string]string{
9201 "enterpriseId": c.enterpriseId,
9202 "pageId": c.pageId,
9203 "clusterId": c.clusterId,
9204 })
9205 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9206 }
9207
9208
9209
9210
9211
9212
9213 func (c *StorelayoutclustersGetCall) Do(opts ...googleapi.CallOption) (*StoreCluster, error) {
9214 gensupport.SetOptions(c.urlParams_, opts...)
9215 res, err := c.doRequest("json")
9216 if res != nil && res.StatusCode == http.StatusNotModified {
9217 if res.Body != nil {
9218 res.Body.Close()
9219 }
9220 return nil, gensupport.WrapError(&googleapi.Error{
9221 Code: res.StatusCode,
9222 Header: res.Header,
9223 })
9224 }
9225 if err != nil {
9226 return nil, err
9227 }
9228 defer googleapi.CloseBody(res)
9229 if err := googleapi.CheckResponse(res); err != nil {
9230 return nil, gensupport.WrapError(err)
9231 }
9232 ret := &StoreCluster{
9233 ServerResponse: googleapi.ServerResponse{
9234 Header: res.Header,
9235 HTTPStatusCode: res.StatusCode,
9236 },
9237 }
9238 target := &ret
9239 if err := gensupport.DecodeResponse(target, res); err != nil {
9240 return nil, err
9241 }
9242 return ret, nil
9243 }
9244
9245 type StorelayoutclustersInsertCall struct {
9246 s *Service
9247 enterpriseId string
9248 pageId string
9249 storecluster *StoreCluster
9250 urlParams_ gensupport.URLParams
9251 ctx_ context.Context
9252 header_ http.Header
9253 }
9254
9255
9256
9257
9258
9259 func (r *StorelayoutclustersService) Insert(enterpriseId string, pageId string, storecluster *StoreCluster) *StorelayoutclustersInsertCall {
9260 c := &StorelayoutclustersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9261 c.enterpriseId = enterpriseId
9262 c.pageId = pageId
9263 c.storecluster = storecluster
9264 return c
9265 }
9266
9267
9268
9269
9270 func (c *StorelayoutclustersInsertCall) Fields(s ...googleapi.Field) *StorelayoutclustersInsertCall {
9271 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9272 return c
9273 }
9274
9275
9276 func (c *StorelayoutclustersInsertCall) Context(ctx context.Context) *StorelayoutclustersInsertCall {
9277 c.ctx_ = ctx
9278 return c
9279 }
9280
9281
9282
9283 func (c *StorelayoutclustersInsertCall) Header() http.Header {
9284 if c.header_ == nil {
9285 c.header_ = make(http.Header)
9286 }
9287 return c.header_
9288 }
9289
9290 func (c *StorelayoutclustersInsertCall) doRequest(alt string) (*http.Response, error) {
9291 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9292 var body io.Reader = nil
9293 body, err := googleapi.WithoutDataWrapper.JSONReader(c.storecluster)
9294 if err != nil {
9295 return nil, err
9296 }
9297 c.urlParams_.Set("alt", alt)
9298 c.urlParams_.Set("prettyPrint", "false")
9299 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters")
9300 urls += "?" + c.urlParams_.Encode()
9301 req, err := http.NewRequest("POST", urls, body)
9302 if err != nil {
9303 return nil, err
9304 }
9305 req.Header = reqHeaders
9306 googleapi.Expand(req.URL, map[string]string{
9307 "enterpriseId": c.enterpriseId,
9308 "pageId": c.pageId,
9309 })
9310 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9311 }
9312
9313
9314
9315
9316
9317
9318 func (c *StorelayoutclustersInsertCall) Do(opts ...googleapi.CallOption) (*StoreCluster, error) {
9319 gensupport.SetOptions(c.urlParams_, opts...)
9320 res, err := c.doRequest("json")
9321 if res != nil && res.StatusCode == http.StatusNotModified {
9322 if res.Body != nil {
9323 res.Body.Close()
9324 }
9325 return nil, gensupport.WrapError(&googleapi.Error{
9326 Code: res.StatusCode,
9327 Header: res.Header,
9328 })
9329 }
9330 if err != nil {
9331 return nil, err
9332 }
9333 defer googleapi.CloseBody(res)
9334 if err := googleapi.CheckResponse(res); err != nil {
9335 return nil, gensupport.WrapError(err)
9336 }
9337 ret := &StoreCluster{
9338 ServerResponse: googleapi.ServerResponse{
9339 Header: res.Header,
9340 HTTPStatusCode: res.StatusCode,
9341 },
9342 }
9343 target := &ret
9344 if err := gensupport.DecodeResponse(target, res); err != nil {
9345 return nil, err
9346 }
9347 return ret, nil
9348 }
9349
9350 type StorelayoutclustersListCall struct {
9351 s *Service
9352 enterpriseId string
9353 pageId string
9354 urlParams_ gensupport.URLParams
9355 ifNoneMatch_ string
9356 ctx_ context.Context
9357 header_ http.Header
9358 }
9359
9360
9361
9362
9363
9364 func (r *StorelayoutclustersService) List(enterpriseId string, pageId string) *StorelayoutclustersListCall {
9365 c := &StorelayoutclustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9366 c.enterpriseId = enterpriseId
9367 c.pageId = pageId
9368 return c
9369 }
9370
9371
9372
9373
9374 func (c *StorelayoutclustersListCall) Fields(s ...googleapi.Field) *StorelayoutclustersListCall {
9375 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9376 return c
9377 }
9378
9379
9380
9381
9382 func (c *StorelayoutclustersListCall) IfNoneMatch(entityTag string) *StorelayoutclustersListCall {
9383 c.ifNoneMatch_ = entityTag
9384 return c
9385 }
9386
9387
9388 func (c *StorelayoutclustersListCall) Context(ctx context.Context) *StorelayoutclustersListCall {
9389 c.ctx_ = ctx
9390 return c
9391 }
9392
9393
9394
9395 func (c *StorelayoutclustersListCall) Header() http.Header {
9396 if c.header_ == nil {
9397 c.header_ = make(http.Header)
9398 }
9399 return c.header_
9400 }
9401
9402 func (c *StorelayoutclustersListCall) doRequest(alt string) (*http.Response, error) {
9403 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9404 if c.ifNoneMatch_ != "" {
9405 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9406 }
9407 var body io.Reader = nil
9408 c.urlParams_.Set("alt", alt)
9409 c.urlParams_.Set("prettyPrint", "false")
9410 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters")
9411 urls += "?" + c.urlParams_.Encode()
9412 req, err := http.NewRequest("GET", urls, body)
9413 if err != nil {
9414 return nil, err
9415 }
9416 req.Header = reqHeaders
9417 googleapi.Expand(req.URL, map[string]string{
9418 "enterpriseId": c.enterpriseId,
9419 "pageId": c.pageId,
9420 })
9421 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9422 }
9423
9424
9425
9426
9427
9428
9429
9430 func (c *StorelayoutclustersListCall) Do(opts ...googleapi.CallOption) (*StoreLayoutClustersListResponse, error) {
9431 gensupport.SetOptions(c.urlParams_, opts...)
9432 res, err := c.doRequest("json")
9433 if res != nil && res.StatusCode == http.StatusNotModified {
9434 if res.Body != nil {
9435 res.Body.Close()
9436 }
9437 return nil, gensupport.WrapError(&googleapi.Error{
9438 Code: res.StatusCode,
9439 Header: res.Header,
9440 })
9441 }
9442 if err != nil {
9443 return nil, err
9444 }
9445 defer googleapi.CloseBody(res)
9446 if err := googleapi.CheckResponse(res); err != nil {
9447 return nil, gensupport.WrapError(err)
9448 }
9449 ret := &StoreLayoutClustersListResponse{
9450 ServerResponse: googleapi.ServerResponse{
9451 Header: res.Header,
9452 HTTPStatusCode: res.StatusCode,
9453 },
9454 }
9455 target := &ret
9456 if err := gensupport.DecodeResponse(target, res); err != nil {
9457 return nil, err
9458 }
9459 return ret, nil
9460 }
9461
9462 type StorelayoutclustersUpdateCall struct {
9463 s *Service
9464 enterpriseId string
9465 pageId string
9466 clusterId string
9467 storecluster *StoreCluster
9468 urlParams_ gensupport.URLParams
9469 ctx_ context.Context
9470 header_ http.Header
9471 }
9472
9473
9474
9475
9476
9477
9478 func (r *StorelayoutclustersService) Update(enterpriseId string, pageId string, clusterId string, storecluster *StoreCluster) *StorelayoutclustersUpdateCall {
9479 c := &StorelayoutclustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9480 c.enterpriseId = enterpriseId
9481 c.pageId = pageId
9482 c.clusterId = clusterId
9483 c.storecluster = storecluster
9484 return c
9485 }
9486
9487
9488
9489
9490 func (c *StorelayoutclustersUpdateCall) Fields(s ...googleapi.Field) *StorelayoutclustersUpdateCall {
9491 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9492 return c
9493 }
9494
9495
9496 func (c *StorelayoutclustersUpdateCall) Context(ctx context.Context) *StorelayoutclustersUpdateCall {
9497 c.ctx_ = ctx
9498 return c
9499 }
9500
9501
9502
9503 func (c *StorelayoutclustersUpdateCall) Header() http.Header {
9504 if c.header_ == nil {
9505 c.header_ = make(http.Header)
9506 }
9507 return c.header_
9508 }
9509
9510 func (c *StorelayoutclustersUpdateCall) doRequest(alt string) (*http.Response, error) {
9511 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9512 var body io.Reader = nil
9513 body, err := googleapi.WithoutDataWrapper.JSONReader(c.storecluster)
9514 if err != nil {
9515 return nil, err
9516 }
9517 c.urlParams_.Set("alt", alt)
9518 c.urlParams_.Set("prettyPrint", "false")
9519 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters/{clusterId}")
9520 urls += "?" + c.urlParams_.Encode()
9521 req, err := http.NewRequest("PUT", urls, body)
9522 if err != nil {
9523 return nil, err
9524 }
9525 req.Header = reqHeaders
9526 googleapi.Expand(req.URL, map[string]string{
9527 "enterpriseId": c.enterpriseId,
9528 "pageId": c.pageId,
9529 "clusterId": c.clusterId,
9530 })
9531 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9532 }
9533
9534
9535
9536
9537
9538
9539 func (c *StorelayoutclustersUpdateCall) Do(opts ...googleapi.CallOption) (*StoreCluster, error) {
9540 gensupport.SetOptions(c.urlParams_, opts...)
9541 res, err := c.doRequest("json")
9542 if res != nil && res.StatusCode == http.StatusNotModified {
9543 if res.Body != nil {
9544 res.Body.Close()
9545 }
9546 return nil, gensupport.WrapError(&googleapi.Error{
9547 Code: res.StatusCode,
9548 Header: res.Header,
9549 })
9550 }
9551 if err != nil {
9552 return nil, err
9553 }
9554 defer googleapi.CloseBody(res)
9555 if err := googleapi.CheckResponse(res); err != nil {
9556 return nil, gensupport.WrapError(err)
9557 }
9558 ret := &StoreCluster{
9559 ServerResponse: googleapi.ServerResponse{
9560 Header: res.Header,
9561 HTTPStatusCode: res.StatusCode,
9562 },
9563 }
9564 target := &ret
9565 if err := gensupport.DecodeResponse(target, res); err != nil {
9566 return nil, err
9567 }
9568 return ret, nil
9569 }
9570
9571 type StorelayoutpagesDeleteCall struct {
9572 s *Service
9573 enterpriseId string
9574 pageId string
9575 urlParams_ gensupport.URLParams
9576 ctx_ context.Context
9577 header_ http.Header
9578 }
9579
9580
9581
9582
9583
9584 func (r *StorelayoutpagesService) Delete(enterpriseId string, pageId string) *StorelayoutpagesDeleteCall {
9585 c := &StorelayoutpagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9586 c.enterpriseId = enterpriseId
9587 c.pageId = pageId
9588 return c
9589 }
9590
9591
9592
9593
9594 func (c *StorelayoutpagesDeleteCall) Fields(s ...googleapi.Field) *StorelayoutpagesDeleteCall {
9595 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9596 return c
9597 }
9598
9599
9600 func (c *StorelayoutpagesDeleteCall) Context(ctx context.Context) *StorelayoutpagesDeleteCall {
9601 c.ctx_ = ctx
9602 return c
9603 }
9604
9605
9606
9607 func (c *StorelayoutpagesDeleteCall) Header() http.Header {
9608 if c.header_ == nil {
9609 c.header_ = make(http.Header)
9610 }
9611 return c.header_
9612 }
9613
9614 func (c *StorelayoutpagesDeleteCall) doRequest(alt string) (*http.Response, error) {
9615 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9616 var body io.Reader = nil
9617 c.urlParams_.Set("alt", alt)
9618 c.urlParams_.Set("prettyPrint", "false")
9619 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}")
9620 urls += "?" + c.urlParams_.Encode()
9621 req, err := http.NewRequest("DELETE", urls, body)
9622 if err != nil {
9623 return nil, err
9624 }
9625 req.Header = reqHeaders
9626 googleapi.Expand(req.URL, map[string]string{
9627 "enterpriseId": c.enterpriseId,
9628 "pageId": c.pageId,
9629 })
9630 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9631 }
9632
9633
9634 func (c *StorelayoutpagesDeleteCall) Do(opts ...googleapi.CallOption) error {
9635 gensupport.SetOptions(c.urlParams_, opts...)
9636 res, err := c.doRequest("json")
9637 if err != nil {
9638 return err
9639 }
9640 defer googleapi.CloseBody(res)
9641 if err := googleapi.CheckResponse(res); err != nil {
9642 return gensupport.WrapError(err)
9643 }
9644 return nil
9645 }
9646
9647 type StorelayoutpagesGetCall struct {
9648 s *Service
9649 enterpriseId string
9650 pageId string
9651 urlParams_ gensupport.URLParams
9652 ifNoneMatch_ string
9653 ctx_ context.Context
9654 header_ http.Header
9655 }
9656
9657
9658
9659
9660
9661 func (r *StorelayoutpagesService) Get(enterpriseId string, pageId string) *StorelayoutpagesGetCall {
9662 c := &StorelayoutpagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9663 c.enterpriseId = enterpriseId
9664 c.pageId = pageId
9665 return c
9666 }
9667
9668
9669
9670
9671 func (c *StorelayoutpagesGetCall) Fields(s ...googleapi.Field) *StorelayoutpagesGetCall {
9672 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9673 return c
9674 }
9675
9676
9677
9678
9679 func (c *StorelayoutpagesGetCall) IfNoneMatch(entityTag string) *StorelayoutpagesGetCall {
9680 c.ifNoneMatch_ = entityTag
9681 return c
9682 }
9683
9684
9685 func (c *StorelayoutpagesGetCall) Context(ctx context.Context) *StorelayoutpagesGetCall {
9686 c.ctx_ = ctx
9687 return c
9688 }
9689
9690
9691
9692 func (c *StorelayoutpagesGetCall) Header() http.Header {
9693 if c.header_ == nil {
9694 c.header_ = make(http.Header)
9695 }
9696 return c.header_
9697 }
9698
9699 func (c *StorelayoutpagesGetCall) doRequest(alt string) (*http.Response, error) {
9700 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9701 if c.ifNoneMatch_ != "" {
9702 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9703 }
9704 var body io.Reader = nil
9705 c.urlParams_.Set("alt", alt)
9706 c.urlParams_.Set("prettyPrint", "false")
9707 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}")
9708 urls += "?" + c.urlParams_.Encode()
9709 req, err := http.NewRequest("GET", urls, body)
9710 if err != nil {
9711 return nil, err
9712 }
9713 req.Header = reqHeaders
9714 googleapi.Expand(req.URL, map[string]string{
9715 "enterpriseId": c.enterpriseId,
9716 "pageId": c.pageId,
9717 })
9718 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9719 }
9720
9721
9722
9723
9724
9725
9726 func (c *StorelayoutpagesGetCall) Do(opts ...googleapi.CallOption) (*StorePage, error) {
9727 gensupport.SetOptions(c.urlParams_, opts...)
9728 res, err := c.doRequest("json")
9729 if res != nil && res.StatusCode == http.StatusNotModified {
9730 if res.Body != nil {
9731 res.Body.Close()
9732 }
9733 return nil, gensupport.WrapError(&googleapi.Error{
9734 Code: res.StatusCode,
9735 Header: res.Header,
9736 })
9737 }
9738 if err != nil {
9739 return nil, err
9740 }
9741 defer googleapi.CloseBody(res)
9742 if err := googleapi.CheckResponse(res); err != nil {
9743 return nil, gensupport.WrapError(err)
9744 }
9745 ret := &StorePage{
9746 ServerResponse: googleapi.ServerResponse{
9747 Header: res.Header,
9748 HTTPStatusCode: res.StatusCode,
9749 },
9750 }
9751 target := &ret
9752 if err := gensupport.DecodeResponse(target, res); err != nil {
9753 return nil, err
9754 }
9755 return ret, nil
9756 }
9757
9758 type StorelayoutpagesInsertCall struct {
9759 s *Service
9760 enterpriseId string
9761 storepage *StorePage
9762 urlParams_ gensupport.URLParams
9763 ctx_ context.Context
9764 header_ http.Header
9765 }
9766
9767
9768
9769
9770 func (r *StorelayoutpagesService) Insert(enterpriseId string, storepage *StorePage) *StorelayoutpagesInsertCall {
9771 c := &StorelayoutpagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9772 c.enterpriseId = enterpriseId
9773 c.storepage = storepage
9774 return c
9775 }
9776
9777
9778
9779
9780 func (c *StorelayoutpagesInsertCall) Fields(s ...googleapi.Field) *StorelayoutpagesInsertCall {
9781 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9782 return c
9783 }
9784
9785
9786 func (c *StorelayoutpagesInsertCall) Context(ctx context.Context) *StorelayoutpagesInsertCall {
9787 c.ctx_ = ctx
9788 return c
9789 }
9790
9791
9792
9793 func (c *StorelayoutpagesInsertCall) Header() http.Header {
9794 if c.header_ == nil {
9795 c.header_ = make(http.Header)
9796 }
9797 return c.header_
9798 }
9799
9800 func (c *StorelayoutpagesInsertCall) doRequest(alt string) (*http.Response, error) {
9801 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9802 var body io.Reader = nil
9803 body, err := googleapi.WithoutDataWrapper.JSONReader(c.storepage)
9804 if err != nil {
9805 return nil, err
9806 }
9807 c.urlParams_.Set("alt", alt)
9808 c.urlParams_.Set("prettyPrint", "false")
9809 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages")
9810 urls += "?" + c.urlParams_.Encode()
9811 req, err := http.NewRequest("POST", urls, body)
9812 if err != nil {
9813 return nil, err
9814 }
9815 req.Header = reqHeaders
9816 googleapi.Expand(req.URL, map[string]string{
9817 "enterpriseId": c.enterpriseId,
9818 })
9819 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9820 }
9821
9822
9823
9824
9825
9826
9827 func (c *StorelayoutpagesInsertCall) Do(opts ...googleapi.CallOption) (*StorePage, error) {
9828 gensupport.SetOptions(c.urlParams_, opts...)
9829 res, err := c.doRequest("json")
9830 if res != nil && res.StatusCode == http.StatusNotModified {
9831 if res.Body != nil {
9832 res.Body.Close()
9833 }
9834 return nil, gensupport.WrapError(&googleapi.Error{
9835 Code: res.StatusCode,
9836 Header: res.Header,
9837 })
9838 }
9839 if err != nil {
9840 return nil, err
9841 }
9842 defer googleapi.CloseBody(res)
9843 if err := googleapi.CheckResponse(res); err != nil {
9844 return nil, gensupport.WrapError(err)
9845 }
9846 ret := &StorePage{
9847 ServerResponse: googleapi.ServerResponse{
9848 Header: res.Header,
9849 HTTPStatusCode: res.StatusCode,
9850 },
9851 }
9852 target := &ret
9853 if err := gensupport.DecodeResponse(target, res); err != nil {
9854 return nil, err
9855 }
9856 return ret, nil
9857 }
9858
9859 type StorelayoutpagesListCall struct {
9860 s *Service
9861 enterpriseId string
9862 urlParams_ gensupport.URLParams
9863 ifNoneMatch_ string
9864 ctx_ context.Context
9865 header_ http.Header
9866 }
9867
9868
9869
9870
9871 func (r *StorelayoutpagesService) List(enterpriseId string) *StorelayoutpagesListCall {
9872 c := &StorelayoutpagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9873 c.enterpriseId = enterpriseId
9874 return c
9875 }
9876
9877
9878
9879
9880 func (c *StorelayoutpagesListCall) Fields(s ...googleapi.Field) *StorelayoutpagesListCall {
9881 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9882 return c
9883 }
9884
9885
9886
9887
9888 func (c *StorelayoutpagesListCall) IfNoneMatch(entityTag string) *StorelayoutpagesListCall {
9889 c.ifNoneMatch_ = entityTag
9890 return c
9891 }
9892
9893
9894 func (c *StorelayoutpagesListCall) Context(ctx context.Context) *StorelayoutpagesListCall {
9895 c.ctx_ = ctx
9896 return c
9897 }
9898
9899
9900
9901 func (c *StorelayoutpagesListCall) Header() http.Header {
9902 if c.header_ == nil {
9903 c.header_ = make(http.Header)
9904 }
9905 return c.header_
9906 }
9907
9908 func (c *StorelayoutpagesListCall) doRequest(alt string) (*http.Response, error) {
9909 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9910 if c.ifNoneMatch_ != "" {
9911 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9912 }
9913 var body io.Reader = nil
9914 c.urlParams_.Set("alt", alt)
9915 c.urlParams_.Set("prettyPrint", "false")
9916 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages")
9917 urls += "?" + c.urlParams_.Encode()
9918 req, err := http.NewRequest("GET", urls, body)
9919 if err != nil {
9920 return nil, err
9921 }
9922 req.Header = reqHeaders
9923 googleapi.Expand(req.URL, map[string]string{
9924 "enterpriseId": c.enterpriseId,
9925 })
9926 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9927 }
9928
9929
9930
9931
9932
9933
9934
9935 func (c *StorelayoutpagesListCall) Do(opts ...googleapi.CallOption) (*StoreLayoutPagesListResponse, error) {
9936 gensupport.SetOptions(c.urlParams_, opts...)
9937 res, err := c.doRequest("json")
9938 if res != nil && res.StatusCode == http.StatusNotModified {
9939 if res.Body != nil {
9940 res.Body.Close()
9941 }
9942 return nil, gensupport.WrapError(&googleapi.Error{
9943 Code: res.StatusCode,
9944 Header: res.Header,
9945 })
9946 }
9947 if err != nil {
9948 return nil, err
9949 }
9950 defer googleapi.CloseBody(res)
9951 if err := googleapi.CheckResponse(res); err != nil {
9952 return nil, gensupport.WrapError(err)
9953 }
9954 ret := &StoreLayoutPagesListResponse{
9955 ServerResponse: googleapi.ServerResponse{
9956 Header: res.Header,
9957 HTTPStatusCode: res.StatusCode,
9958 },
9959 }
9960 target := &ret
9961 if err := gensupport.DecodeResponse(target, res); err != nil {
9962 return nil, err
9963 }
9964 return ret, nil
9965 }
9966
9967 type StorelayoutpagesUpdateCall struct {
9968 s *Service
9969 enterpriseId string
9970 pageId string
9971 storepage *StorePage
9972 urlParams_ gensupport.URLParams
9973 ctx_ context.Context
9974 header_ http.Header
9975 }
9976
9977
9978
9979
9980
9981 func (r *StorelayoutpagesService) Update(enterpriseId string, pageId string, storepage *StorePage) *StorelayoutpagesUpdateCall {
9982 c := &StorelayoutpagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9983 c.enterpriseId = enterpriseId
9984 c.pageId = pageId
9985 c.storepage = storepage
9986 return c
9987 }
9988
9989
9990
9991
9992 func (c *StorelayoutpagesUpdateCall) Fields(s ...googleapi.Field) *StorelayoutpagesUpdateCall {
9993 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9994 return c
9995 }
9996
9997
9998 func (c *StorelayoutpagesUpdateCall) Context(ctx context.Context) *StorelayoutpagesUpdateCall {
9999 c.ctx_ = ctx
10000 return c
10001 }
10002
10003
10004
10005 func (c *StorelayoutpagesUpdateCall) Header() http.Header {
10006 if c.header_ == nil {
10007 c.header_ = make(http.Header)
10008 }
10009 return c.header_
10010 }
10011
10012 func (c *StorelayoutpagesUpdateCall) doRequest(alt string) (*http.Response, error) {
10013 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10014 var body io.Reader = nil
10015 body, err := googleapi.WithoutDataWrapper.JSONReader(c.storepage)
10016 if err != nil {
10017 return nil, err
10018 }
10019 c.urlParams_.Set("alt", alt)
10020 c.urlParams_.Set("prettyPrint", "false")
10021 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}")
10022 urls += "?" + c.urlParams_.Encode()
10023 req, err := http.NewRequest("PUT", urls, body)
10024 if err != nil {
10025 return nil, err
10026 }
10027 req.Header = reqHeaders
10028 googleapi.Expand(req.URL, map[string]string{
10029 "enterpriseId": c.enterpriseId,
10030 "pageId": c.pageId,
10031 })
10032 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10033 }
10034
10035
10036
10037
10038
10039
10040 func (c *StorelayoutpagesUpdateCall) Do(opts ...googleapi.CallOption) (*StorePage, error) {
10041 gensupport.SetOptions(c.urlParams_, opts...)
10042 res, err := c.doRequest("json")
10043 if res != nil && res.StatusCode == http.StatusNotModified {
10044 if res.Body != nil {
10045 res.Body.Close()
10046 }
10047 return nil, gensupport.WrapError(&googleapi.Error{
10048 Code: res.StatusCode,
10049 Header: res.Header,
10050 })
10051 }
10052 if err != nil {
10053 return nil, err
10054 }
10055 defer googleapi.CloseBody(res)
10056 if err := googleapi.CheckResponse(res); err != nil {
10057 return nil, gensupport.WrapError(err)
10058 }
10059 ret := &StorePage{
10060 ServerResponse: googleapi.ServerResponse{
10061 Header: res.Header,
10062 HTTPStatusCode: res.StatusCode,
10063 },
10064 }
10065 target := &ret
10066 if err := gensupport.DecodeResponse(target, res); err != nil {
10067 return nil, err
10068 }
10069 return ret, nil
10070 }
10071
10072 type UsersDeleteCall struct {
10073 s *Service
10074 enterpriseId string
10075 userId string
10076 urlParams_ gensupport.URLParams
10077 ctx_ context.Context
10078 header_ http.Header
10079 }
10080
10081
10082
10083
10084
10085 func (r *UsersService) Delete(enterpriseId string, userId string) *UsersDeleteCall {
10086 c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10087 c.enterpriseId = enterpriseId
10088 c.userId = userId
10089 return c
10090 }
10091
10092
10093
10094
10095 func (c *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall {
10096 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10097 return c
10098 }
10099
10100
10101 func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
10102 c.ctx_ = ctx
10103 return c
10104 }
10105
10106
10107
10108 func (c *UsersDeleteCall) Header() http.Header {
10109 if c.header_ == nil {
10110 c.header_ = make(http.Header)
10111 }
10112 return c.header_
10113 }
10114
10115 func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
10116 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10117 var body io.Reader = nil
10118 c.urlParams_.Set("alt", alt)
10119 c.urlParams_.Set("prettyPrint", "false")
10120 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}")
10121 urls += "?" + c.urlParams_.Encode()
10122 req, err := http.NewRequest("DELETE", urls, body)
10123 if err != nil {
10124 return nil, err
10125 }
10126 req.Header = reqHeaders
10127 googleapi.Expand(req.URL, map[string]string{
10128 "enterpriseId": c.enterpriseId,
10129 "userId": c.userId,
10130 })
10131 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10132 }
10133
10134
10135 func (c *UsersDeleteCall) Do(opts ...googleapi.CallOption) error {
10136 gensupport.SetOptions(c.urlParams_, opts...)
10137 res, err := c.doRequest("json")
10138 if err != nil {
10139 return err
10140 }
10141 defer googleapi.CloseBody(res)
10142 if err := googleapi.CheckResponse(res); err != nil {
10143 return gensupport.WrapError(err)
10144 }
10145 return nil
10146 }
10147
10148 type UsersGenerateAuthenticationTokenCall struct {
10149 s *Service
10150 enterpriseId string
10151 userId string
10152 urlParams_ gensupport.URLParams
10153 ctx_ context.Context
10154 header_ http.Header
10155 }
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165 func (r *UsersService) GenerateAuthenticationToken(enterpriseId string, userId string) *UsersGenerateAuthenticationTokenCall {
10166 c := &UsersGenerateAuthenticationTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10167 c.enterpriseId = enterpriseId
10168 c.userId = userId
10169 return c
10170 }
10171
10172
10173
10174
10175 func (c *UsersGenerateAuthenticationTokenCall) Fields(s ...googleapi.Field) *UsersGenerateAuthenticationTokenCall {
10176 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10177 return c
10178 }
10179
10180
10181 func (c *UsersGenerateAuthenticationTokenCall) Context(ctx context.Context) *UsersGenerateAuthenticationTokenCall {
10182 c.ctx_ = ctx
10183 return c
10184 }
10185
10186
10187
10188 func (c *UsersGenerateAuthenticationTokenCall) Header() http.Header {
10189 if c.header_ == nil {
10190 c.header_ = make(http.Header)
10191 }
10192 return c.header_
10193 }
10194
10195 func (c *UsersGenerateAuthenticationTokenCall) doRequest(alt string) (*http.Response, error) {
10196 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10197 var body io.Reader = nil
10198 c.urlParams_.Set("alt", alt)
10199 c.urlParams_.Set("prettyPrint", "false")
10200 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/authenticationToken")
10201 urls += "?" + c.urlParams_.Encode()
10202 req, err := http.NewRequest("POST", urls, body)
10203 if err != nil {
10204 return nil, err
10205 }
10206 req.Header = reqHeaders
10207 googleapi.Expand(req.URL, map[string]string{
10208 "enterpriseId": c.enterpriseId,
10209 "userId": c.userId,
10210 })
10211 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10212 }
10213
10214
10215
10216
10217
10218
10219
10220 func (c *UsersGenerateAuthenticationTokenCall) Do(opts ...googleapi.CallOption) (*AuthenticationToken, error) {
10221 gensupport.SetOptions(c.urlParams_, opts...)
10222 res, err := c.doRequest("json")
10223 if res != nil && res.StatusCode == http.StatusNotModified {
10224 if res.Body != nil {
10225 res.Body.Close()
10226 }
10227 return nil, gensupport.WrapError(&googleapi.Error{
10228 Code: res.StatusCode,
10229 Header: res.Header,
10230 })
10231 }
10232 if err != nil {
10233 return nil, err
10234 }
10235 defer googleapi.CloseBody(res)
10236 if err := googleapi.CheckResponse(res); err != nil {
10237 return nil, gensupport.WrapError(err)
10238 }
10239 ret := &AuthenticationToken{
10240 ServerResponse: googleapi.ServerResponse{
10241 Header: res.Header,
10242 HTTPStatusCode: res.StatusCode,
10243 },
10244 }
10245 target := &ret
10246 if err := gensupport.DecodeResponse(target, res); err != nil {
10247 return nil, err
10248 }
10249 return ret, nil
10250 }
10251
10252 type UsersGetCall struct {
10253 s *Service
10254 enterpriseId string
10255 userId string
10256 urlParams_ gensupport.URLParams
10257 ifNoneMatch_ string
10258 ctx_ context.Context
10259 header_ http.Header
10260 }
10261
10262
10263
10264
10265
10266 func (r *UsersService) Get(enterpriseId string, userId string) *UsersGetCall {
10267 c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10268 c.enterpriseId = enterpriseId
10269 c.userId = userId
10270 return c
10271 }
10272
10273
10274
10275
10276 func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall {
10277 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10278 return c
10279 }
10280
10281
10282
10283
10284 func (c *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall {
10285 c.ifNoneMatch_ = entityTag
10286 return c
10287 }
10288
10289
10290 func (c *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
10291 c.ctx_ = ctx
10292 return c
10293 }
10294
10295
10296
10297 func (c *UsersGetCall) Header() http.Header {
10298 if c.header_ == nil {
10299 c.header_ = make(http.Header)
10300 }
10301 return c.header_
10302 }
10303
10304 func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
10305 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10306 if c.ifNoneMatch_ != "" {
10307 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10308 }
10309 var body io.Reader = nil
10310 c.urlParams_.Set("alt", alt)
10311 c.urlParams_.Set("prettyPrint", "false")
10312 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}")
10313 urls += "?" + c.urlParams_.Encode()
10314 req, err := http.NewRequest("GET", urls, body)
10315 if err != nil {
10316 return nil, err
10317 }
10318 req.Header = reqHeaders
10319 googleapi.Expand(req.URL, map[string]string{
10320 "enterpriseId": c.enterpriseId,
10321 "userId": c.userId,
10322 })
10323 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10324 }
10325
10326
10327
10328
10329
10330
10331 func (c *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) {
10332 gensupport.SetOptions(c.urlParams_, opts...)
10333 res, err := c.doRequest("json")
10334 if res != nil && res.StatusCode == http.StatusNotModified {
10335 if res.Body != nil {
10336 res.Body.Close()
10337 }
10338 return nil, gensupport.WrapError(&googleapi.Error{
10339 Code: res.StatusCode,
10340 Header: res.Header,
10341 })
10342 }
10343 if err != nil {
10344 return nil, err
10345 }
10346 defer googleapi.CloseBody(res)
10347 if err := googleapi.CheckResponse(res); err != nil {
10348 return nil, gensupport.WrapError(err)
10349 }
10350 ret := &User{
10351 ServerResponse: googleapi.ServerResponse{
10352 Header: res.Header,
10353 HTTPStatusCode: res.StatusCode,
10354 },
10355 }
10356 target := &ret
10357 if err := gensupport.DecodeResponse(target, res); err != nil {
10358 return nil, err
10359 }
10360 return ret, nil
10361 }
10362
10363 type UsersGetAvailableProductSetCall struct {
10364 s *Service
10365 enterpriseId string
10366 userId string
10367 urlParams_ gensupport.URLParams
10368 ifNoneMatch_ string
10369 ctx_ context.Context
10370 header_ http.Header
10371 }
10372
10373
10374
10375
10376
10377
10378
10379 func (r *UsersService) GetAvailableProductSet(enterpriseId string, userId string) *UsersGetAvailableProductSetCall {
10380 c := &UsersGetAvailableProductSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10381 c.enterpriseId = enterpriseId
10382 c.userId = userId
10383 return c
10384 }
10385
10386
10387
10388
10389 func (c *UsersGetAvailableProductSetCall) Fields(s ...googleapi.Field) *UsersGetAvailableProductSetCall {
10390 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10391 return c
10392 }
10393
10394
10395
10396
10397 func (c *UsersGetAvailableProductSetCall) IfNoneMatch(entityTag string) *UsersGetAvailableProductSetCall {
10398 c.ifNoneMatch_ = entityTag
10399 return c
10400 }
10401
10402
10403 func (c *UsersGetAvailableProductSetCall) Context(ctx context.Context) *UsersGetAvailableProductSetCall {
10404 c.ctx_ = ctx
10405 return c
10406 }
10407
10408
10409
10410 func (c *UsersGetAvailableProductSetCall) Header() http.Header {
10411 if c.header_ == nil {
10412 c.header_ = make(http.Header)
10413 }
10414 return c.header_
10415 }
10416
10417 func (c *UsersGetAvailableProductSetCall) doRequest(alt string) (*http.Response, error) {
10418 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10419 if c.ifNoneMatch_ != "" {
10420 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10421 }
10422 var body io.Reader = nil
10423 c.urlParams_.Set("alt", alt)
10424 c.urlParams_.Set("prettyPrint", "false")
10425 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/availableProductSet")
10426 urls += "?" + c.urlParams_.Encode()
10427 req, err := http.NewRequest("GET", urls, body)
10428 if err != nil {
10429 return nil, err
10430 }
10431 req.Header = reqHeaders
10432 googleapi.Expand(req.URL, map[string]string{
10433 "enterpriseId": c.enterpriseId,
10434 "userId": c.userId,
10435 })
10436 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10437 }
10438
10439
10440
10441
10442
10443
10444 func (c *UsersGetAvailableProductSetCall) Do(opts ...googleapi.CallOption) (*ProductSet, error) {
10445 gensupport.SetOptions(c.urlParams_, opts...)
10446 res, err := c.doRequest("json")
10447 if res != nil && res.StatusCode == http.StatusNotModified {
10448 if res.Body != nil {
10449 res.Body.Close()
10450 }
10451 return nil, gensupport.WrapError(&googleapi.Error{
10452 Code: res.StatusCode,
10453 Header: res.Header,
10454 })
10455 }
10456 if err != nil {
10457 return nil, err
10458 }
10459 defer googleapi.CloseBody(res)
10460 if err := googleapi.CheckResponse(res); err != nil {
10461 return nil, gensupport.WrapError(err)
10462 }
10463 ret := &ProductSet{
10464 ServerResponse: googleapi.ServerResponse{
10465 Header: res.Header,
10466 HTTPStatusCode: res.StatusCode,
10467 },
10468 }
10469 target := &ret
10470 if err := gensupport.DecodeResponse(target, res); err != nil {
10471 return nil, err
10472 }
10473 return ret, nil
10474 }
10475
10476 type UsersInsertCall struct {
10477 s *Service
10478 enterpriseId string
10479 user *User
10480 urlParams_ gensupport.URLParams
10481 ctx_ context.Context
10482 header_ http.Header
10483 }
10484
10485
10486
10487
10488
10489
10490
10491
10492 func (r *UsersService) Insert(enterpriseId string, user *User) *UsersInsertCall {
10493 c := &UsersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10494 c.enterpriseId = enterpriseId
10495 c.user = user
10496 return c
10497 }
10498
10499
10500
10501
10502 func (c *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall {
10503 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10504 return c
10505 }
10506
10507
10508 func (c *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall {
10509 c.ctx_ = ctx
10510 return c
10511 }
10512
10513
10514
10515 func (c *UsersInsertCall) Header() http.Header {
10516 if c.header_ == nil {
10517 c.header_ = make(http.Header)
10518 }
10519 return c.header_
10520 }
10521
10522 func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) {
10523 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10524 var body io.Reader = nil
10525 body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
10526 if err != nil {
10527 return nil, err
10528 }
10529 c.urlParams_.Set("alt", alt)
10530 c.urlParams_.Set("prettyPrint", "false")
10531 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users")
10532 urls += "?" + c.urlParams_.Encode()
10533 req, err := http.NewRequest("POST", urls, body)
10534 if err != nil {
10535 return nil, err
10536 }
10537 req.Header = reqHeaders
10538 googleapi.Expand(req.URL, map[string]string{
10539 "enterpriseId": c.enterpriseId,
10540 })
10541 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10542 }
10543
10544
10545
10546
10547
10548
10549 func (c *UsersInsertCall) Do(opts ...googleapi.CallOption) (*User, error) {
10550 gensupport.SetOptions(c.urlParams_, opts...)
10551 res, err := c.doRequest("json")
10552 if res != nil && res.StatusCode == http.StatusNotModified {
10553 if res.Body != nil {
10554 res.Body.Close()
10555 }
10556 return nil, gensupport.WrapError(&googleapi.Error{
10557 Code: res.StatusCode,
10558 Header: res.Header,
10559 })
10560 }
10561 if err != nil {
10562 return nil, err
10563 }
10564 defer googleapi.CloseBody(res)
10565 if err := googleapi.CheckResponse(res); err != nil {
10566 return nil, gensupport.WrapError(err)
10567 }
10568 ret := &User{
10569 ServerResponse: googleapi.ServerResponse{
10570 Header: res.Header,
10571 HTTPStatusCode: res.StatusCode,
10572 },
10573 }
10574 target := &ret
10575 if err := gensupport.DecodeResponse(target, res); err != nil {
10576 return nil, err
10577 }
10578 return ret, nil
10579 }
10580
10581 type UsersListCall struct {
10582 s *Service
10583 enterpriseId string
10584 urlParams_ gensupport.URLParams
10585 ifNoneMatch_ string
10586 ctx_ context.Context
10587 header_ http.Header
10588 }
10589
10590
10591
10592
10593
10594
10595
10596 func (r *UsersService) List(enterpriseId string, email string) *UsersListCall {
10597 c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10598 c.enterpriseId = enterpriseId
10599 c.urlParams_.Set("email", email)
10600 return c
10601 }
10602
10603
10604
10605
10606 func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall {
10607 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10608 return c
10609 }
10610
10611
10612
10613
10614 func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall {
10615 c.ifNoneMatch_ = entityTag
10616 return c
10617 }
10618
10619
10620 func (c *UsersListCall) Context(ctx context.Context) *UsersListCall {
10621 c.ctx_ = ctx
10622 return c
10623 }
10624
10625
10626
10627 func (c *UsersListCall) Header() http.Header {
10628 if c.header_ == nil {
10629 c.header_ = make(http.Header)
10630 }
10631 return c.header_
10632 }
10633
10634 func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
10635 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10636 if c.ifNoneMatch_ != "" {
10637 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10638 }
10639 var body io.Reader = nil
10640 c.urlParams_.Set("alt", alt)
10641 c.urlParams_.Set("prettyPrint", "false")
10642 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users")
10643 urls += "?" + c.urlParams_.Encode()
10644 req, err := http.NewRequest("GET", urls, body)
10645 if err != nil {
10646 return nil, err
10647 }
10648 req.Header = reqHeaders
10649 googleapi.Expand(req.URL, map[string]string{
10650 "enterpriseId": c.enterpriseId,
10651 })
10652 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10653 }
10654
10655
10656
10657
10658
10659
10660
10661 func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*UsersListResponse, error) {
10662 gensupport.SetOptions(c.urlParams_, opts...)
10663 res, err := c.doRequest("json")
10664 if res != nil && res.StatusCode == http.StatusNotModified {
10665 if res.Body != nil {
10666 res.Body.Close()
10667 }
10668 return nil, gensupport.WrapError(&googleapi.Error{
10669 Code: res.StatusCode,
10670 Header: res.Header,
10671 })
10672 }
10673 if err != nil {
10674 return nil, err
10675 }
10676 defer googleapi.CloseBody(res)
10677 if err := googleapi.CheckResponse(res); err != nil {
10678 return nil, gensupport.WrapError(err)
10679 }
10680 ret := &UsersListResponse{
10681 ServerResponse: googleapi.ServerResponse{
10682 Header: res.Header,
10683 HTTPStatusCode: res.StatusCode,
10684 },
10685 }
10686 target := &ret
10687 if err := gensupport.DecodeResponse(target, res); err != nil {
10688 return nil, err
10689 }
10690 return ret, nil
10691 }
10692
10693 type UsersRevokeDeviceAccessCall struct {
10694 s *Service
10695 enterpriseId string
10696 userId string
10697 urlParams_ gensupport.URLParams
10698 ctx_ context.Context
10699 header_ http.Header
10700 }
10701
10702
10703
10704
10705
10706
10707
10708
10709 func (r *UsersService) RevokeDeviceAccess(enterpriseId string, userId string) *UsersRevokeDeviceAccessCall {
10710 c := &UsersRevokeDeviceAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10711 c.enterpriseId = enterpriseId
10712 c.userId = userId
10713 return c
10714 }
10715
10716
10717
10718
10719 func (c *UsersRevokeDeviceAccessCall) Fields(s ...googleapi.Field) *UsersRevokeDeviceAccessCall {
10720 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10721 return c
10722 }
10723
10724
10725 func (c *UsersRevokeDeviceAccessCall) Context(ctx context.Context) *UsersRevokeDeviceAccessCall {
10726 c.ctx_ = ctx
10727 return c
10728 }
10729
10730
10731
10732 func (c *UsersRevokeDeviceAccessCall) Header() http.Header {
10733 if c.header_ == nil {
10734 c.header_ = make(http.Header)
10735 }
10736 return c.header_
10737 }
10738
10739 func (c *UsersRevokeDeviceAccessCall) doRequest(alt string) (*http.Response, error) {
10740 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10741 var body io.Reader = nil
10742 c.urlParams_.Set("alt", alt)
10743 c.urlParams_.Set("prettyPrint", "false")
10744 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/deviceAccess")
10745 urls += "?" + c.urlParams_.Encode()
10746 req, err := http.NewRequest("DELETE", urls, body)
10747 if err != nil {
10748 return nil, err
10749 }
10750 req.Header = reqHeaders
10751 googleapi.Expand(req.URL, map[string]string{
10752 "enterpriseId": c.enterpriseId,
10753 "userId": c.userId,
10754 })
10755 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10756 }
10757
10758
10759 func (c *UsersRevokeDeviceAccessCall) Do(opts ...googleapi.CallOption) error {
10760 gensupport.SetOptions(c.urlParams_, opts...)
10761 res, err := c.doRequest("json")
10762 if err != nil {
10763 return err
10764 }
10765 defer googleapi.CloseBody(res)
10766 if err := googleapi.CheckResponse(res); err != nil {
10767 return gensupport.WrapError(err)
10768 }
10769 return nil
10770 }
10771
10772 type UsersSetAvailableProductSetCall struct {
10773 s *Service
10774 enterpriseId string
10775 userId string
10776 productset *ProductSet
10777 urlParams_ gensupport.URLParams
10778 ctx_ context.Context
10779 header_ http.Header
10780 }
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791 func (r *UsersService) SetAvailableProductSet(enterpriseId string, userId string, productset *ProductSet) *UsersSetAvailableProductSetCall {
10792 c := &UsersSetAvailableProductSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10793 c.enterpriseId = enterpriseId
10794 c.userId = userId
10795 c.productset = productset
10796 return c
10797 }
10798
10799
10800
10801
10802 func (c *UsersSetAvailableProductSetCall) Fields(s ...googleapi.Field) *UsersSetAvailableProductSetCall {
10803 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10804 return c
10805 }
10806
10807
10808 func (c *UsersSetAvailableProductSetCall) Context(ctx context.Context) *UsersSetAvailableProductSetCall {
10809 c.ctx_ = ctx
10810 return c
10811 }
10812
10813
10814
10815 func (c *UsersSetAvailableProductSetCall) Header() http.Header {
10816 if c.header_ == nil {
10817 c.header_ = make(http.Header)
10818 }
10819 return c.header_
10820 }
10821
10822 func (c *UsersSetAvailableProductSetCall) doRequest(alt string) (*http.Response, error) {
10823 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10824 var body io.Reader = nil
10825 body, err := googleapi.WithoutDataWrapper.JSONReader(c.productset)
10826 if err != nil {
10827 return nil, err
10828 }
10829 c.urlParams_.Set("alt", alt)
10830 c.urlParams_.Set("prettyPrint", "false")
10831 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/availableProductSet")
10832 urls += "?" + c.urlParams_.Encode()
10833 req, err := http.NewRequest("PUT", urls, body)
10834 if err != nil {
10835 return nil, err
10836 }
10837 req.Header = reqHeaders
10838 googleapi.Expand(req.URL, map[string]string{
10839 "enterpriseId": c.enterpriseId,
10840 "userId": c.userId,
10841 })
10842 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10843 }
10844
10845
10846
10847
10848
10849
10850 func (c *UsersSetAvailableProductSetCall) Do(opts ...googleapi.CallOption) (*ProductSet, error) {
10851 gensupport.SetOptions(c.urlParams_, opts...)
10852 res, err := c.doRequest("json")
10853 if res != nil && res.StatusCode == http.StatusNotModified {
10854 if res.Body != nil {
10855 res.Body.Close()
10856 }
10857 return nil, gensupport.WrapError(&googleapi.Error{
10858 Code: res.StatusCode,
10859 Header: res.Header,
10860 })
10861 }
10862 if err != nil {
10863 return nil, err
10864 }
10865 defer googleapi.CloseBody(res)
10866 if err := googleapi.CheckResponse(res); err != nil {
10867 return nil, gensupport.WrapError(err)
10868 }
10869 ret := &ProductSet{
10870 ServerResponse: googleapi.ServerResponse{
10871 Header: res.Header,
10872 HTTPStatusCode: res.StatusCode,
10873 },
10874 }
10875 target := &ret
10876 if err := gensupport.DecodeResponse(target, res); err != nil {
10877 return nil, err
10878 }
10879 return ret, nil
10880 }
10881
10882 type UsersUpdateCall struct {
10883 s *Service
10884 enterpriseId string
10885 userId string
10886 user *User
10887 urlParams_ gensupport.URLParams
10888 ctx_ context.Context
10889 header_ http.Header
10890 }
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900 func (r *UsersService) Update(enterpriseId string, userId string, user *User) *UsersUpdateCall {
10901 c := &UsersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10902 c.enterpriseId = enterpriseId
10903 c.userId = userId
10904 c.user = user
10905 return c
10906 }
10907
10908
10909
10910
10911 func (c *UsersUpdateCall) Fields(s ...googleapi.Field) *UsersUpdateCall {
10912 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10913 return c
10914 }
10915
10916
10917 func (c *UsersUpdateCall) Context(ctx context.Context) *UsersUpdateCall {
10918 c.ctx_ = ctx
10919 return c
10920 }
10921
10922
10923
10924 func (c *UsersUpdateCall) Header() http.Header {
10925 if c.header_ == nil {
10926 c.header_ = make(http.Header)
10927 }
10928 return c.header_
10929 }
10930
10931 func (c *UsersUpdateCall) doRequest(alt string) (*http.Response, error) {
10932 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10933 var body io.Reader = nil
10934 body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
10935 if err != nil {
10936 return nil, err
10937 }
10938 c.urlParams_.Set("alt", alt)
10939 c.urlParams_.Set("prettyPrint", "false")
10940 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}")
10941 urls += "?" + c.urlParams_.Encode()
10942 req, err := http.NewRequest("PUT", urls, body)
10943 if err != nil {
10944 return nil, err
10945 }
10946 req.Header = reqHeaders
10947 googleapi.Expand(req.URL, map[string]string{
10948 "enterpriseId": c.enterpriseId,
10949 "userId": c.userId,
10950 })
10951 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10952 }
10953
10954
10955
10956
10957
10958
10959 func (c *UsersUpdateCall) Do(opts ...googleapi.CallOption) (*User, error) {
10960 gensupport.SetOptions(c.urlParams_, opts...)
10961 res, err := c.doRequest("json")
10962 if res != nil && res.StatusCode == http.StatusNotModified {
10963 if res.Body != nil {
10964 res.Body.Close()
10965 }
10966 return nil, gensupport.WrapError(&googleapi.Error{
10967 Code: res.StatusCode,
10968 Header: res.Header,
10969 })
10970 }
10971 if err != nil {
10972 return nil, err
10973 }
10974 defer googleapi.CloseBody(res)
10975 if err := googleapi.CheckResponse(res); err != nil {
10976 return nil, gensupport.WrapError(err)
10977 }
10978 ret := &User{
10979 ServerResponse: googleapi.ServerResponse{
10980 Header: res.Header,
10981 HTTPStatusCode: res.StatusCode,
10982 },
10983 }
10984 target := &ret
10985 if err := gensupport.DecodeResponse(target, res); err != nil {
10986 return nil, err
10987 }
10988 return ret, nil
10989 }
10990
10991 type WebappsDeleteCall struct {
10992 s *Service
10993 enterpriseId string
10994 webAppId string
10995 urlParams_ gensupport.URLParams
10996 ctx_ context.Context
10997 header_ http.Header
10998 }
10999
11000
11001
11002
11003
11004 func (r *WebappsService) Delete(enterpriseId string, webAppId string) *WebappsDeleteCall {
11005 c := &WebappsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11006 c.enterpriseId = enterpriseId
11007 c.webAppId = webAppId
11008 return c
11009 }
11010
11011
11012
11013
11014 func (c *WebappsDeleteCall) Fields(s ...googleapi.Field) *WebappsDeleteCall {
11015 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11016 return c
11017 }
11018
11019
11020 func (c *WebappsDeleteCall) Context(ctx context.Context) *WebappsDeleteCall {
11021 c.ctx_ = ctx
11022 return c
11023 }
11024
11025
11026
11027 func (c *WebappsDeleteCall) Header() http.Header {
11028 if c.header_ == nil {
11029 c.header_ = make(http.Header)
11030 }
11031 return c.header_
11032 }
11033
11034 func (c *WebappsDeleteCall) doRequest(alt string) (*http.Response, error) {
11035 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11036 var body io.Reader = nil
11037 c.urlParams_.Set("alt", alt)
11038 c.urlParams_.Set("prettyPrint", "false")
11039 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/webApps/{webAppId}")
11040 urls += "?" + c.urlParams_.Encode()
11041 req, err := http.NewRequest("DELETE", urls, body)
11042 if err != nil {
11043 return nil, err
11044 }
11045 req.Header = reqHeaders
11046 googleapi.Expand(req.URL, map[string]string{
11047 "enterpriseId": c.enterpriseId,
11048 "webAppId": c.webAppId,
11049 })
11050 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11051 }
11052
11053
11054 func (c *WebappsDeleteCall) Do(opts ...googleapi.CallOption) error {
11055 gensupport.SetOptions(c.urlParams_, opts...)
11056 res, err := c.doRequest("json")
11057 if err != nil {
11058 return err
11059 }
11060 defer googleapi.CloseBody(res)
11061 if err := googleapi.CheckResponse(res); err != nil {
11062 return gensupport.WrapError(err)
11063 }
11064 return nil
11065 }
11066
11067 type WebappsGetCall struct {
11068 s *Service
11069 enterpriseId string
11070 webAppId string
11071 urlParams_ gensupport.URLParams
11072 ifNoneMatch_ string
11073 ctx_ context.Context
11074 header_ http.Header
11075 }
11076
11077
11078
11079
11080
11081 func (r *WebappsService) Get(enterpriseId string, webAppId string) *WebappsGetCall {
11082 c := &WebappsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11083 c.enterpriseId = enterpriseId
11084 c.webAppId = webAppId
11085 return c
11086 }
11087
11088
11089
11090
11091 func (c *WebappsGetCall) Fields(s ...googleapi.Field) *WebappsGetCall {
11092 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11093 return c
11094 }
11095
11096
11097
11098
11099 func (c *WebappsGetCall) IfNoneMatch(entityTag string) *WebappsGetCall {
11100 c.ifNoneMatch_ = entityTag
11101 return c
11102 }
11103
11104
11105 func (c *WebappsGetCall) Context(ctx context.Context) *WebappsGetCall {
11106 c.ctx_ = ctx
11107 return c
11108 }
11109
11110
11111
11112 func (c *WebappsGetCall) Header() http.Header {
11113 if c.header_ == nil {
11114 c.header_ = make(http.Header)
11115 }
11116 return c.header_
11117 }
11118
11119 func (c *WebappsGetCall) doRequest(alt string) (*http.Response, error) {
11120 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11121 if c.ifNoneMatch_ != "" {
11122 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11123 }
11124 var body io.Reader = nil
11125 c.urlParams_.Set("alt", alt)
11126 c.urlParams_.Set("prettyPrint", "false")
11127 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/webApps/{webAppId}")
11128 urls += "?" + c.urlParams_.Encode()
11129 req, err := http.NewRequest("GET", urls, body)
11130 if err != nil {
11131 return nil, err
11132 }
11133 req.Header = reqHeaders
11134 googleapi.Expand(req.URL, map[string]string{
11135 "enterpriseId": c.enterpriseId,
11136 "webAppId": c.webAppId,
11137 })
11138 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11139 }
11140
11141
11142
11143
11144
11145
11146 func (c *WebappsGetCall) Do(opts ...googleapi.CallOption) (*WebApp, error) {
11147 gensupport.SetOptions(c.urlParams_, opts...)
11148 res, err := c.doRequest("json")
11149 if res != nil && res.StatusCode == http.StatusNotModified {
11150 if res.Body != nil {
11151 res.Body.Close()
11152 }
11153 return nil, gensupport.WrapError(&googleapi.Error{
11154 Code: res.StatusCode,
11155 Header: res.Header,
11156 })
11157 }
11158 if err != nil {
11159 return nil, err
11160 }
11161 defer googleapi.CloseBody(res)
11162 if err := googleapi.CheckResponse(res); err != nil {
11163 return nil, gensupport.WrapError(err)
11164 }
11165 ret := &WebApp{
11166 ServerResponse: googleapi.ServerResponse{
11167 Header: res.Header,
11168 HTTPStatusCode: res.StatusCode,
11169 },
11170 }
11171 target := &ret
11172 if err := gensupport.DecodeResponse(target, res); err != nil {
11173 return nil, err
11174 }
11175 return ret, nil
11176 }
11177
11178 type WebappsInsertCall struct {
11179 s *Service
11180 enterpriseId string
11181 webapp *WebApp
11182 urlParams_ gensupport.URLParams
11183 ctx_ context.Context
11184 header_ http.Header
11185 }
11186
11187
11188
11189
11190 func (r *WebappsService) Insert(enterpriseId string, webapp *WebApp) *WebappsInsertCall {
11191 c := &WebappsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11192 c.enterpriseId = enterpriseId
11193 c.webapp = webapp
11194 return c
11195 }
11196
11197
11198
11199
11200 func (c *WebappsInsertCall) Fields(s ...googleapi.Field) *WebappsInsertCall {
11201 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11202 return c
11203 }
11204
11205
11206 func (c *WebappsInsertCall) Context(ctx context.Context) *WebappsInsertCall {
11207 c.ctx_ = ctx
11208 return c
11209 }
11210
11211
11212
11213 func (c *WebappsInsertCall) Header() http.Header {
11214 if c.header_ == nil {
11215 c.header_ = make(http.Header)
11216 }
11217 return c.header_
11218 }
11219
11220 func (c *WebappsInsertCall) doRequest(alt string) (*http.Response, error) {
11221 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11222 var body io.Reader = nil
11223 body, err := googleapi.WithoutDataWrapper.JSONReader(c.webapp)
11224 if err != nil {
11225 return nil, err
11226 }
11227 c.urlParams_.Set("alt", alt)
11228 c.urlParams_.Set("prettyPrint", "false")
11229 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/webApps")
11230 urls += "?" + c.urlParams_.Encode()
11231 req, err := http.NewRequest("POST", urls, body)
11232 if err != nil {
11233 return nil, err
11234 }
11235 req.Header = reqHeaders
11236 googleapi.Expand(req.URL, map[string]string{
11237 "enterpriseId": c.enterpriseId,
11238 })
11239 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11240 }
11241
11242
11243
11244
11245
11246
11247 func (c *WebappsInsertCall) Do(opts ...googleapi.CallOption) (*WebApp, error) {
11248 gensupport.SetOptions(c.urlParams_, opts...)
11249 res, err := c.doRequest("json")
11250 if res != nil && res.StatusCode == http.StatusNotModified {
11251 if res.Body != nil {
11252 res.Body.Close()
11253 }
11254 return nil, gensupport.WrapError(&googleapi.Error{
11255 Code: res.StatusCode,
11256 Header: res.Header,
11257 })
11258 }
11259 if err != nil {
11260 return nil, err
11261 }
11262 defer googleapi.CloseBody(res)
11263 if err := googleapi.CheckResponse(res); err != nil {
11264 return nil, gensupport.WrapError(err)
11265 }
11266 ret := &WebApp{
11267 ServerResponse: googleapi.ServerResponse{
11268 Header: res.Header,
11269 HTTPStatusCode: res.StatusCode,
11270 },
11271 }
11272 target := &ret
11273 if err := gensupport.DecodeResponse(target, res); err != nil {
11274 return nil, err
11275 }
11276 return ret, nil
11277 }
11278
11279 type WebappsListCall struct {
11280 s *Service
11281 enterpriseId string
11282 urlParams_ gensupport.URLParams
11283 ifNoneMatch_ string
11284 ctx_ context.Context
11285 header_ http.Header
11286 }
11287
11288
11289
11290
11291 func (r *WebappsService) List(enterpriseId string) *WebappsListCall {
11292 c := &WebappsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11293 c.enterpriseId = enterpriseId
11294 return c
11295 }
11296
11297
11298
11299
11300 func (c *WebappsListCall) Fields(s ...googleapi.Field) *WebappsListCall {
11301 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11302 return c
11303 }
11304
11305
11306
11307
11308 func (c *WebappsListCall) IfNoneMatch(entityTag string) *WebappsListCall {
11309 c.ifNoneMatch_ = entityTag
11310 return c
11311 }
11312
11313
11314 func (c *WebappsListCall) Context(ctx context.Context) *WebappsListCall {
11315 c.ctx_ = ctx
11316 return c
11317 }
11318
11319
11320
11321 func (c *WebappsListCall) Header() http.Header {
11322 if c.header_ == nil {
11323 c.header_ = make(http.Header)
11324 }
11325 return c.header_
11326 }
11327
11328 func (c *WebappsListCall) doRequest(alt string) (*http.Response, error) {
11329 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11330 if c.ifNoneMatch_ != "" {
11331 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11332 }
11333 var body io.Reader = nil
11334 c.urlParams_.Set("alt", alt)
11335 c.urlParams_.Set("prettyPrint", "false")
11336 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/webApps")
11337 urls += "?" + c.urlParams_.Encode()
11338 req, err := http.NewRequest("GET", urls, body)
11339 if err != nil {
11340 return nil, err
11341 }
11342 req.Header = reqHeaders
11343 googleapi.Expand(req.URL, map[string]string{
11344 "enterpriseId": c.enterpriseId,
11345 })
11346 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11347 }
11348
11349
11350
11351
11352
11353
11354
11355 func (c *WebappsListCall) Do(opts ...googleapi.CallOption) (*WebAppsListResponse, error) {
11356 gensupport.SetOptions(c.urlParams_, opts...)
11357 res, err := c.doRequest("json")
11358 if res != nil && res.StatusCode == http.StatusNotModified {
11359 if res.Body != nil {
11360 res.Body.Close()
11361 }
11362 return nil, gensupport.WrapError(&googleapi.Error{
11363 Code: res.StatusCode,
11364 Header: res.Header,
11365 })
11366 }
11367 if err != nil {
11368 return nil, err
11369 }
11370 defer googleapi.CloseBody(res)
11371 if err := googleapi.CheckResponse(res); err != nil {
11372 return nil, gensupport.WrapError(err)
11373 }
11374 ret := &WebAppsListResponse{
11375 ServerResponse: googleapi.ServerResponse{
11376 Header: res.Header,
11377 HTTPStatusCode: res.StatusCode,
11378 },
11379 }
11380 target := &ret
11381 if err := gensupport.DecodeResponse(target, res); err != nil {
11382 return nil, err
11383 }
11384 return ret, nil
11385 }
11386
11387 type WebappsUpdateCall struct {
11388 s *Service
11389 enterpriseId string
11390 webAppId string
11391 webapp *WebApp
11392 urlParams_ gensupport.URLParams
11393 ctx_ context.Context
11394 header_ http.Header
11395 }
11396
11397
11398
11399
11400
11401 func (r *WebappsService) Update(enterpriseId string, webAppId string, webapp *WebApp) *WebappsUpdateCall {
11402 c := &WebappsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11403 c.enterpriseId = enterpriseId
11404 c.webAppId = webAppId
11405 c.webapp = webapp
11406 return c
11407 }
11408
11409
11410
11411
11412 func (c *WebappsUpdateCall) Fields(s ...googleapi.Field) *WebappsUpdateCall {
11413 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11414 return c
11415 }
11416
11417
11418 func (c *WebappsUpdateCall) Context(ctx context.Context) *WebappsUpdateCall {
11419 c.ctx_ = ctx
11420 return c
11421 }
11422
11423
11424
11425 func (c *WebappsUpdateCall) Header() http.Header {
11426 if c.header_ == nil {
11427 c.header_ = make(http.Header)
11428 }
11429 return c.header_
11430 }
11431
11432 func (c *WebappsUpdateCall) doRequest(alt string) (*http.Response, error) {
11433 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11434 var body io.Reader = nil
11435 body, err := googleapi.WithoutDataWrapper.JSONReader(c.webapp)
11436 if err != nil {
11437 return nil, err
11438 }
11439 c.urlParams_.Set("alt", alt)
11440 c.urlParams_.Set("prettyPrint", "false")
11441 urls := googleapi.ResolveRelative(c.s.BasePath, "androidenterprise/v1/enterprises/{enterpriseId}/webApps/{webAppId}")
11442 urls += "?" + c.urlParams_.Encode()
11443 req, err := http.NewRequest("PUT", urls, body)
11444 if err != nil {
11445 return nil, err
11446 }
11447 req.Header = reqHeaders
11448 googleapi.Expand(req.URL, map[string]string{
11449 "enterpriseId": c.enterpriseId,
11450 "webAppId": c.webAppId,
11451 })
11452 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11453 }
11454
11455
11456
11457
11458
11459
11460 func (c *WebappsUpdateCall) Do(opts ...googleapi.CallOption) (*WebApp, error) {
11461 gensupport.SetOptions(c.urlParams_, opts...)
11462 res, err := c.doRequest("json")
11463 if res != nil && res.StatusCode == http.StatusNotModified {
11464 if res.Body != nil {
11465 res.Body.Close()
11466 }
11467 return nil, gensupport.WrapError(&googleapi.Error{
11468 Code: res.StatusCode,
11469 Header: res.Header,
11470 })
11471 }
11472 if err != nil {
11473 return nil, err
11474 }
11475 defer googleapi.CloseBody(res)
11476 if err := googleapi.CheckResponse(res); err != nil {
11477 return nil, gensupport.WrapError(err)
11478 }
11479 ret := &WebApp{
11480 ServerResponse: googleapi.ServerResponse{
11481 Header: res.Header,
11482 HTTPStatusCode: res.StatusCode,
11483 },
11484 }
11485 target := &ret
11486 if err := gensupport.DecodeResponse(target, res); err != nil {
11487 return nil, err
11488 }
11489 return ret, nil
11490 }
11491
View as plain text