/
androiddeviceprovisioning-gen.go
5937 lines (5379 loc) · 215 KB
/
androiddeviceprovisioning-gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2022 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package androiddeviceprovisioning provides access to the Android Device Provisioning Partner API.
//
// For product documentation, see: https://developers.google.com/zero-touch/
//
// Creating a client
//
// Usage example:
//
// import "google.golang.org/api/androiddeviceprovisioning/v1"
// ...
// ctx := context.Background()
// androiddeviceprovisioningService, err := androiddeviceprovisioning.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for authentication.
//
// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// Other authentication options
//
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
//
// androiddeviceprovisioningService, err := androiddeviceprovisioning.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
//
// config := &oauth2.Config{...}
// // ...
// token, err := config.Exchange(ctx, ...)
// androiddeviceprovisioningService, err := androiddeviceprovisioning.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See https://godoc.org/google.golang.org/api/option/ for details on options.
package androiddeviceprovisioning // import "google.golang.org/api/androiddeviceprovisioning/v1"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
googleapi "google.golang.org/api/googleapi"
internal "google.golang.org/api/internal"
gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
const apiId = "androiddeviceprovisioning:v1"
const apiName = "androiddeviceprovisioning"
const apiVersion = "v1"
const basePath = "https://androiddeviceprovisioning.googleapis.com/"
const mtlsBasePath = "https://androiddeviceprovisioning.mtls.googleapis.com/"
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, err
}
s, err := New(client)
if err != nil {
return nil, err
}
if endpoint != "" {
s.BasePath = endpoint
}
return s, nil
}
// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Customers = NewCustomersService(s)
s.Operations = NewOperationsService(s)
s.Partners = NewPartnersService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Customers *CustomersService
Operations *OperationsService
Partners *PartnersService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewCustomersService(s *Service) *CustomersService {
rs := &CustomersService{s: s}
rs.Configurations = NewCustomersConfigurationsService(s)
rs.Devices = NewCustomersDevicesService(s)
rs.Dpcs = NewCustomersDpcsService(s)
return rs
}
type CustomersService struct {
s *Service
Configurations *CustomersConfigurationsService
Devices *CustomersDevicesService
Dpcs *CustomersDpcsService
}
func NewCustomersConfigurationsService(s *Service) *CustomersConfigurationsService {
rs := &CustomersConfigurationsService{s: s}
return rs
}
type CustomersConfigurationsService struct {
s *Service
}
func NewCustomersDevicesService(s *Service) *CustomersDevicesService {
rs := &CustomersDevicesService{s: s}
return rs
}
type CustomersDevicesService struct {
s *Service
}
func NewCustomersDpcsService(s *Service) *CustomersDpcsService {
rs := &CustomersDpcsService{s: s}
return rs
}
type CustomersDpcsService struct {
s *Service
}
func NewOperationsService(s *Service) *OperationsService {
rs := &OperationsService{s: s}
return rs
}
type OperationsService struct {
s *Service
}
func NewPartnersService(s *Service) *PartnersService {
rs := &PartnersService{s: s}
rs.Customers = NewPartnersCustomersService(s)
rs.Devices = NewPartnersDevicesService(s)
rs.Vendors = NewPartnersVendorsService(s)
return rs
}
type PartnersService struct {
s *Service
Customers *PartnersCustomersService
Devices *PartnersDevicesService
Vendors *PartnersVendorsService
}
func NewPartnersCustomersService(s *Service) *PartnersCustomersService {
rs := &PartnersCustomersService{s: s}
return rs
}
type PartnersCustomersService struct {
s *Service
}
func NewPartnersDevicesService(s *Service) *PartnersDevicesService {
rs := &PartnersDevicesService{s: s}
return rs
}
type PartnersDevicesService struct {
s *Service
}
func NewPartnersVendorsService(s *Service) *PartnersVendorsService {
rs := &PartnersVendorsService{s: s}
rs.Customers = NewPartnersVendorsCustomersService(s)
return rs
}
type PartnersVendorsService struct {
s *Service
Customers *PartnersVendorsCustomersService
}
func NewPartnersVendorsCustomersService(s *Service) *PartnersVendorsCustomersService {
rs := &PartnersVendorsCustomersService{s: s}
return rs
}
type PartnersVendorsCustomersService struct {
s *Service
}
// ClaimDeviceRequest: Request message to claim a device on behalf of a
// customer.
type ClaimDeviceRequest struct {
// CustomerId: Required. The ID of the customer for whom the device is
// being claimed.
CustomerId int64 `json:"customerId,omitempty,string"`
// DeviceIdentifier: Required. Required. The device identifier of the
// device to claim.
DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"`
// DeviceMetadata: Optional. The metadata to attach to the device.
DeviceMetadata *DeviceMetadata `json:"deviceMetadata,omitempty"`
// SectionType: Required. The section type of the device's provisioning
// record.
//
// Possible values:
// "SECTION_TYPE_UNSPECIFIED" - Unspecified section type.
// "SECTION_TYPE_SIM_LOCK" - SIM-lock section type.
// "SECTION_TYPE_ZERO_TOUCH" - Zero-touch enrollment section type.
SectionType string `json:"sectionType,omitempty"`
// ForceSendFields is a list of field names (e.g. "CustomerId") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CustomerId") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ClaimDeviceRequest) MarshalJSON() ([]byte, error) {
type NoMethod ClaimDeviceRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ClaimDeviceResponse: Response message containing device id of the
// claim.
type ClaimDeviceResponse struct {
// DeviceId: The device ID of the claimed device.
DeviceId int64 `json:"deviceId,omitempty,string"`
// DeviceName: The resource name of the device in the format
// `partners/[PARTNER_ID]/devices/[DEVICE_ID]`.
DeviceName string `json:"deviceName,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "DeviceId") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DeviceId") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ClaimDeviceResponse) MarshalJSON() ([]byte, error) {
type NoMethod ClaimDeviceResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ClaimDevicesRequest: Request to claim devices asynchronously in
// batch. Claiming a device adds the device to zero-touch enrollment and
// shows the device in the customer's view of the portal.
type ClaimDevicesRequest struct {
// Claims: Required. A list of device claims.
Claims []*PartnerClaim `json:"claims,omitempty"`
// ForceSendFields is a list of field names (e.g. "Claims") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Claims") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ClaimDevicesRequest) MarshalJSON() ([]byte, error) {
type NoMethod ClaimDevicesRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Company: A reseller, vendor, or customer in the zero-touch reseller
// and customer APIs.
type Company struct {
// AdminEmails: Optional. Email address of customer's users in the admin
// role. Each email address must be associated with a Google Account.
AdminEmails []string `json:"adminEmails,omitempty"`
// CompanyId: Output only. The ID of the company. Assigned by the
// server.
CompanyId int64 `json:"companyId,omitempty,string"`
// CompanyName: Required. The name of the company. For example _XYZ
// Corp_. Displayed to the company's employees in the zero-touch
// enrollment portal.
CompanyName string `json:"companyName,omitempty"`
// LanguageCode: Input only. The preferred locale of the customer
// represented as a BCP47 language code. This field is validated on
// input and requests containing unsupported language codes will be
// rejected. Supported language codes: Arabic (ar) Chinese (Hong Kong)
// (zh-HK) Chinese (Simplified) (zh-CN) Chinese (Traditional) (zh-TW)
// Czech (cs) Danish (da) Dutch (nl) English (UK) (en-GB) English (US)
// (en-US) Filipino (fil) Finnish (fi) French (fr) German (de) Hebrew
// (iw) Hindi (hi) Hungarian (hu) Indonesian (id) Italian (it) Japanese
// (ja) Korean (ko) Norwegian (Bokmal) (no) Polish (pl) Portuguese
// (Brazil) (pt-BR) Portuguese (Portugal) (pt-PT) Russian (ru) Spanish
// (es) Spanish (Latin America) (es-419) Swedish (sv) Thai (th) Turkish
// (tr) Ukrainian (uk) Vietnamese (vi)
LanguageCode string `json:"languageCode,omitempty"`
// Name: Output only. The API resource name of the company. The resource
// name is one of the following formats: *
// `partners/[PARTNER_ID]/customers/[CUSTOMER_ID]` *
// `partners/[PARTNER_ID]/vendors/[VENDOR_ID]` *
// `partners/[PARTNER_ID]/vendors/[VENDOR_ID]/customers/[CUSTOMER_ID]`
// Assigned by the server.
Name string `json:"name,omitempty"`
// OwnerEmails: Required. Input only. Email address of customer's users
// in the owner role. At least one `owner_email` is required. Owners
// share the same access as admins but can also add, delete, and edit
// your organization's portal users.
OwnerEmails []string `json:"ownerEmails,omitempty"`
// SkipWelcomeEmail: Input only. If set to true, welcome email will not
// be sent to the customer. It is recommended to skip the welcome email
// if devices will be claimed with additional DEVICE_PROTECTION service,
// as the customer will receive separate emails at device claim time.
// This field is ignored if this is not a Zero-touch customer.
SkipWelcomeEmail bool `json:"skipWelcomeEmail,omitempty"`
// TermsStatus: Output only. Whether any user from the company has
// accepted the latest Terms of Service (ToS). See TermsStatus.
//
// Possible values:
// "TERMS_STATUS_UNSPECIFIED" - Default value. This value should never
// be set if the enum is present.
// "TERMS_STATUS_NOT_ACCEPTED" - None of the company's users have
// accepted the ToS.
// "TERMS_STATUS_ACCEPTED" - One (or more) of the company's users has
// accepted the ToS.
// "TERMS_STATUS_STALE" - None of the company's users has accepted the
// current ToS but at least one user accepted a previous ToS.
TermsStatus string `json:"termsStatus,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AdminEmails") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AdminEmails") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Company) MarshalJSON() ([]byte, error) {
type NoMethod Company
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Configuration: A configuration collects the provisioning options for
// Android devices. Each configuration combines the following: * The EMM
// device policy controller (DPC) installed on the devices. * EMM
// policies enforced on the devices. * Metadata displayed on the device
// to help users during setup. Customers can add as many configurations
// as they need. However, zero-touch enrollment works best when a
// customer sets a default configuration that's applied to any new
// devices the organization purchases.
type Configuration struct {
// CompanyName: Required. The name of the organization. Zero-touch
// enrollment shows this organization name to device users during device
// provisioning.
CompanyName string `json:"companyName,omitempty"`
// ConfigurationId: Output only. The ID of the configuration. Assigned
// by the server.
ConfigurationId int64 `json:"configurationId,omitempty,string"`
// ConfigurationName: Required. A short name that describes the
// configuration's purpose. For example, _Sales team_ or _Temporary
// employees_. The zero-touch enrollment portal displays this name to IT
// admins.
ConfigurationName string `json:"configurationName,omitempty"`
// ContactEmail: Required. The email address that device users can
// contact to get help. Zero-touch enrollment shows this email address
// to device users before device provisioning. The value is validated on
// input.
ContactEmail string `json:"contactEmail,omitempty"`
// ContactPhone: Required. The telephone number that device users can
// call, using another device, to get help. Zero-touch enrollment shows
// this number to device users before device provisioning. Accepts
// numerals, spaces, the plus sign, hyphens, and parentheses.
ContactPhone string `json:"contactPhone,omitempty"`
// CustomMessage: A message, containing one or two sentences, to help
// device users get help or give them more details about what’s
// happening to their device. Zero-touch enrollment shows this message
// before the device is provisioned.
CustomMessage string `json:"customMessage,omitempty"`
// DpcExtras: The JSON-formatted EMM provisioning extras that are passed
// to the DPC.
DpcExtras string `json:"dpcExtras,omitempty"`
// DpcResourcePath: Required. The resource name of the selected DPC
// (device policy controller) in the format
// `customers/[CUSTOMER_ID]/dpcs/*`. To list the supported DPCs, call
// `customers.dpcs.list`.
DpcResourcePath string `json:"dpcResourcePath,omitempty"`
// IsDefault: Required. Whether this is the default configuration that
// zero-touch enrollment applies to any new devices the organization
// purchases in the future. Only one customer configuration can be the
// default. Setting this value to `true`, changes the previous default
// configuration's `isDefault` value to `false`.
IsDefault bool `json:"isDefault,omitempty"`
// Name: Output only. The API resource name in the format
// `customers/[CUSTOMER_ID]/configurations/[CONFIGURATION_ID]`. Assigned
// by the server.
Name string `json:"name,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CompanyName") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CompanyName") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Configuration) MarshalJSON() ([]byte, error) {
type NoMethod Configuration
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CreateCustomerRequest: Request message to create a customer.
type CreateCustomerRequest struct {
// Customer: Required. The company data to populate the new customer.
// Must contain a value for `companyName` and at least one `owner_email`
// that's associated with a Google Account. The values for `companyId`
// and `name` must be empty.
Customer *Company `json:"customer,omitempty"`
// ForceSendFields is a list of field names (e.g. "Customer") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Customer") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CreateCustomerRequest) MarshalJSON() ([]byte, error) {
type NoMethod CreateCustomerRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CustomerApplyConfigurationRequest: Request message for customer to
// assign a configuration to device.
type CustomerApplyConfigurationRequest struct {
// Configuration: Required. The configuration applied to the device in
// the format
// `customers/[CUSTOMER_ID]/configurations/[CONFIGURATION_ID]`.
Configuration string `json:"configuration,omitempty"`
// Device: Required. The device the configuration is applied to. There
// are custom validations in ApplyConfigurationRequestValidator
Device *DeviceReference `json:"device,omitempty"`
// ForceSendFields is a list of field names (e.g. "Configuration") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Configuration") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CustomerApplyConfigurationRequest) MarshalJSON() ([]byte, error) {
type NoMethod CustomerApplyConfigurationRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CustomerListConfigurationsResponse: Response message of customer's
// listing configuration.
type CustomerListConfigurationsResponse struct {
// Configurations: The configurations.
Configurations []*Configuration `json:"configurations,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Configurations") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Configurations") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *CustomerListConfigurationsResponse) MarshalJSON() ([]byte, error) {
type NoMethod CustomerListConfigurationsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CustomerListCustomersResponse: Response message for listing my
// customers.
type CustomerListCustomersResponse struct {
// Customers: The customer accounts the calling user is a member of.
Customers []*Company `json:"customers,omitempty"`
// NextPageToken: A token used to access the next page of results.
// Omitted if no further results are available.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Customers") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Customers") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CustomerListCustomersResponse) MarshalJSON() ([]byte, error) {
type NoMethod CustomerListCustomersResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CustomerListDevicesResponse: Response message of customer's liting
// devices.
type CustomerListDevicesResponse struct {
// Devices: The customer's devices.
Devices []*Device `json:"devices,omitempty"`
// NextPageToken: A token used to access the next page of results.
// Omitted if no further results are available.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Devices") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Devices") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CustomerListDevicesResponse) MarshalJSON() ([]byte, error) {
type NoMethod CustomerListDevicesResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CustomerListDpcsResponse: Response message of customer's listing
// DPCs.
type CustomerListDpcsResponse struct {
// Dpcs: The list of DPCs available to the customer that support
// zero-touch enrollment.
Dpcs []*Dpc `json:"dpcs,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Dpcs") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Dpcs") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CustomerListDpcsResponse) MarshalJSON() ([]byte, error) {
type NoMethod CustomerListDpcsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CustomerRemoveConfigurationRequest: Request message for customer to
// remove the configuration from device.
type CustomerRemoveConfigurationRequest struct {
// Device: Required. The device to remove the configuration from. There
// are custom validations in RemoveConfigurationRequestValidator
Device *DeviceReference `json:"device,omitempty"`
// ForceSendFields is a list of field names (e.g. "Device") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Device") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CustomerRemoveConfigurationRequest) MarshalJSON() ([]byte, error) {
type NoMethod CustomerRemoveConfigurationRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CustomerUnclaimDeviceRequest: Request message for customer to unclaim
// a device.
type CustomerUnclaimDeviceRequest struct {
// Device: Required. The device to unclaim. There are custom validations
// in UnclaimDeviceRequestValidator.
Device *DeviceReference `json:"device,omitempty"`
// ForceSendFields is a list of field names (e.g. "Device") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Device") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CustomerUnclaimDeviceRequest) MarshalJSON() ([]byte, error) {
type NoMethod CustomerUnclaimDeviceRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Device: An Android device registered for zero-touch enrollment.
type Device struct {
// Claims: Output only. The provisioning claims for a device. Devices
// claimed for zero-touch enrollment have a claim with the type
// `SECTION_TYPE_ZERO_TOUCH`. Call `partners.devices.unclaim` or
// `partners.devices.unclaimAsync` to remove the device from zero-touch
// enrollment.
Claims []*DeviceClaim `json:"claims,omitempty"`
// Configuration: Not available to resellers.
Configuration string `json:"configuration,omitempty"`
// DeviceId: Output only. The ID of the device. Assigned by the server.
DeviceId int64 `json:"deviceId,omitempty,string"`
// DeviceIdentifier: The hardware IDs that identify a manufactured
// device. To learn more, read Identifiers
// (https://developers.google.com/zero-touch/guides/identifiers).
DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"`
// DeviceMetadata: The metadata attached to the device. Structured as
// key-value pairs. To learn more, read Device metadata
// (https://developers.google.com/zero-touch/guides/metadata).
DeviceMetadata *DeviceMetadata `json:"deviceMetadata,omitempty"`
// Name: Output only. The API resource name in the format
// `partners/[PARTNER_ID]/devices/[DEVICE_ID]`. Assigned by the server.
Name string `json:"name,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Claims") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Claims") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Device) MarshalJSON() ([]byte, error) {
type NoMethod Device
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DeviceClaim: A record of a device claimed by a reseller for a
// customer. Devices claimed for zero-touch enrollment have a claim with
// the type `SECTION_TYPE_ZERO_TOUCH`. To learn more, read Claim devices
// for customers (/zero-touch/guides/how-it-works#claim).
type DeviceClaim struct {
// AdditionalService: The Additional service registered for the device.
//
// Possible values:
// "ADDITIONAL_SERVICE_UNSPECIFIED" - No additional service.
// "DEVICE_PROTECTION" - Device protection service, also known as
// Android Enterprise Essentials. To claim a device with the device
// protection service you must enroll with the partnership team.
AdditionalService string `json:"additionalService,omitempty"`
// OwnerCompanyId: The ID of the Customer that purchased the device.
OwnerCompanyId int64 `json:"ownerCompanyId,omitempty,string"`
// ResellerId: The ID of the reseller that claimed the device.
ResellerId int64 `json:"resellerId,omitempty,string"`
// SectionType: Output only. The type of claim made on the device.
//
// Possible values:
// "SECTION_TYPE_UNSPECIFIED" - Unspecified section type.
// "SECTION_TYPE_SIM_LOCK" - SIM-lock section type.
// "SECTION_TYPE_ZERO_TOUCH" - Zero-touch enrollment section type.
SectionType string `json:"sectionType,omitempty"`
// VacationModeExpireTime: The timestamp when the device will exit
// ‘vacation mode’. This value is present iff the device is in
// 'vacation mode'.
VacationModeExpireTime string `json:"vacationModeExpireTime,omitempty"`
// VacationModeStartTime: The timestamp when the device was put into
// ‘vacation mode’. This value is present iff the device is in
// 'vacation mode'.
VacationModeStartTime string `json:"vacationModeStartTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "AdditionalService")
// to unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AdditionalService") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *DeviceClaim) MarshalJSON() ([]byte, error) {
type NoMethod DeviceClaim
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DeviceIdentifier: Encapsulates hardware and product IDs to identify a
// manufactured device. To understand requirements on identifier sets,
// read Identifiers
// (https://developers.google.com/zero-touch/guides/identifiers).
type DeviceIdentifier struct {
// Imei: The device’s IMEI number. Validated on input.
Imei string `json:"imei,omitempty"`
// Manufacturer: The device manufacturer’s name. Matches the device's
// built-in value returned from `android.os.Build.MANUFACTURER`. Allowed
// values are listed in manufacturers
// (/zero-touch/resources/manufacturer-names#manufacturers-names).
Manufacturer string `json:"manufacturer,omitempty"`
// Meid: The device’s MEID number.
Meid string `json:"meid,omitempty"`
// Model: The device model's name. Matches the device's built-in value
// returned from `android.os.Build.MODEL`. Allowed values are listed in
// models (/zero-touch/resources/manufacturer-names#model-names).
Model string `json:"model,omitempty"`
// SerialNumber: The manufacturer's serial number for the device. This
// value might not be unique across different device models.
SerialNumber string `json:"serialNumber,omitempty"`
// ForceSendFields is a list of field names (e.g. "Imei") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Imei") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DeviceIdentifier) MarshalJSON() ([]byte, error) {
type NoMethod DeviceIdentifier
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DeviceMetadata: Metadata entries that can be attached to a `Device`.
// To learn more, read Device metadata
// (https://developers.google.com/zero-touch/guides/metadata).
type DeviceMetadata struct {
// Entries: Metadata entries recorded as key-value pairs.
Entries map[string]string `json:"entries,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Entries") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Entries") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.