1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package androidmanagement provides access to the Android Management API.
8//
9// For product documentation, see: https://developers.google.com/android/management
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/androidmanagement/v1"
16//   ...
17//   ctx := context.Background()
18//   androidmanagementService, err := androidmanagement.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   androidmanagementService, err := androidmanagement.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   androidmanagementService, err := androidmanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package androidmanagement // import "google.golang.org/api/androidmanagement/v1"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	googleapi "google.golang.org/api/googleapi"
53	gensupport "google.golang.org/api/internal/gensupport"
54	option "google.golang.org/api/option"
55	htransport "google.golang.org/api/transport/http"
56)
57
58// Always reference these packages, just in case the auto-generated code
59// below doesn't.
60var _ = bytes.NewBuffer
61var _ = strconv.Itoa
62var _ = fmt.Sprintf
63var _ = json.NewDecoder
64var _ = io.Copy
65var _ = url.Parse
66var _ = gensupport.MarshalJSON
67var _ = googleapi.Version
68var _ = errors.New
69var _ = strings.Replace
70var _ = context.Canceled
71
72const apiId = "androidmanagement:v1"
73const apiName = "androidmanagement"
74const apiVersion = "v1"
75const basePath = "https://androidmanagement.googleapis.com/"
76
77// OAuth2 scopes used by this API.
78const (
79	// Manage Android devices and apps for your customers
80	AndroidmanagementScope = "https://www.googleapis.com/auth/androidmanagement"
81)
82
83// NewService creates a new Service.
84func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
85	scopesOption := option.WithScopes(
86		"https://www.googleapis.com/auth/androidmanagement",
87	)
88	// NOTE: prepend, so we don't override user-specified scopes.
89	opts = append([]option.ClientOption{scopesOption}, opts...)
90	client, endpoint, err := htransport.NewClient(ctx, opts...)
91	if err != nil {
92		return nil, err
93	}
94	s, err := New(client)
95	if err != nil {
96		return nil, err
97	}
98	if endpoint != "" {
99		s.BasePath = endpoint
100	}
101	return s, nil
102}
103
104// New creates a new Service. It uses the provided http.Client for requests.
105//
106// Deprecated: please use NewService instead.
107// To provide a custom HTTP client, use option.WithHTTPClient.
108// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
109func New(client *http.Client) (*Service, error) {
110	if client == nil {
111		return nil, errors.New("client is nil")
112	}
113	s := &Service{client: client, BasePath: basePath}
114	s.Enterprises = NewEnterprisesService(s)
115	s.SignupUrls = NewSignupUrlsService(s)
116	return s, nil
117}
118
119type Service struct {
120	client    *http.Client
121	BasePath  string // API endpoint base URL
122	UserAgent string // optional additional User-Agent fragment
123
124	Enterprises *EnterprisesService
125
126	SignupUrls *SignupUrlsService
127}
128
129func (s *Service) userAgent() string {
130	if s.UserAgent == "" {
131		return googleapi.UserAgent
132	}
133	return googleapi.UserAgent + " " + s.UserAgent
134}
135
136func NewEnterprisesService(s *Service) *EnterprisesService {
137	rs := &EnterprisesService{s: s}
138	rs.Applications = NewEnterprisesApplicationsService(s)
139	rs.Devices = NewEnterprisesDevicesService(s)
140	rs.EnrollmentTokens = NewEnterprisesEnrollmentTokensService(s)
141	rs.Policies = NewEnterprisesPoliciesService(s)
142	rs.WebApps = NewEnterprisesWebAppsService(s)
143	rs.WebTokens = NewEnterprisesWebTokensService(s)
144	return rs
145}
146
147type EnterprisesService struct {
148	s *Service
149
150	Applications *EnterprisesApplicationsService
151
152	Devices *EnterprisesDevicesService
153
154	EnrollmentTokens *EnterprisesEnrollmentTokensService
155
156	Policies *EnterprisesPoliciesService
157
158	WebApps *EnterprisesWebAppsService
159
160	WebTokens *EnterprisesWebTokensService
161}
162
163func NewEnterprisesApplicationsService(s *Service) *EnterprisesApplicationsService {
164	rs := &EnterprisesApplicationsService{s: s}
165	return rs
166}
167
168type EnterprisesApplicationsService struct {
169	s *Service
170}
171
172func NewEnterprisesDevicesService(s *Service) *EnterprisesDevicesService {
173	rs := &EnterprisesDevicesService{s: s}
174	rs.Operations = NewEnterprisesDevicesOperationsService(s)
175	return rs
176}
177
178type EnterprisesDevicesService struct {
179	s *Service
180
181	Operations *EnterprisesDevicesOperationsService
182}
183
184func NewEnterprisesDevicesOperationsService(s *Service) *EnterprisesDevicesOperationsService {
185	rs := &EnterprisesDevicesOperationsService{s: s}
186	return rs
187}
188
189type EnterprisesDevicesOperationsService struct {
190	s *Service
191}
192
193func NewEnterprisesEnrollmentTokensService(s *Service) *EnterprisesEnrollmentTokensService {
194	rs := &EnterprisesEnrollmentTokensService{s: s}
195	return rs
196}
197
198type EnterprisesEnrollmentTokensService struct {
199	s *Service
200}
201
202func NewEnterprisesPoliciesService(s *Service) *EnterprisesPoliciesService {
203	rs := &EnterprisesPoliciesService{s: s}
204	return rs
205}
206
207type EnterprisesPoliciesService struct {
208	s *Service
209}
210
211func NewEnterprisesWebAppsService(s *Service) *EnterprisesWebAppsService {
212	rs := &EnterprisesWebAppsService{s: s}
213	return rs
214}
215
216type EnterprisesWebAppsService struct {
217	s *Service
218}
219
220func NewEnterprisesWebTokensService(s *Service) *EnterprisesWebTokensService {
221	rs := &EnterprisesWebTokensService{s: s}
222	return rs
223}
224
225type EnterprisesWebTokensService struct {
226	s *Service
227}
228
229func NewSignupUrlsService(s *Service) *SignupUrlsService {
230	rs := &SignupUrlsService{s: s}
231	return rs
232}
233
234type SignupUrlsService struct {
235	s *Service
236}
237
238// AlwaysOnVpnPackage: Configuration for an always-on VPN connection.
239type AlwaysOnVpnPackage struct {
240	// LockdownEnabled: Disallows networking when the VPN is not connected.
241	LockdownEnabled bool `json:"lockdownEnabled,omitempty"`
242
243	// PackageName: The package name of the VPN app.
244	PackageName string `json:"packageName,omitempty"`
245
246	// ForceSendFields is a list of field names (e.g. "LockdownEnabled") to
247	// unconditionally include in API requests. By default, fields with
248	// empty values are omitted from API requests. However, any non-pointer,
249	// non-interface field appearing in ForceSendFields will be sent to the
250	// server regardless of whether the field is empty or not. This may be
251	// used to include empty fields in Patch requests.
252	ForceSendFields []string `json:"-"`
253
254	// NullFields is a list of field names (e.g. "LockdownEnabled") to
255	// include in API requests with the JSON null value. By default, fields
256	// with empty values are omitted from API requests. However, any field
257	// with an empty value appearing in NullFields will be sent to the
258	// server as null. It is an error if a field in this list has a
259	// non-empty value. This may be used to include null fields in Patch
260	// requests.
261	NullFields []string `json:"-"`
262}
263
264func (s *AlwaysOnVpnPackage) MarshalJSON() ([]byte, error) {
265	type NoMethod AlwaysOnVpnPackage
266	raw := NoMethod(*s)
267	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
268}
269
270// ApiLevelCondition: A compliance rule condition which is satisfied if
271// the Android Framework API level on the device doesn't meet a minimum
272// requirement. There can only be one rule with this type of condition
273// per policy.
274type ApiLevelCondition struct {
275	// MinApiLevel: The minimum desired Android Framework API level. If the
276	// device doesn't meet the minimum requirement, this condition is
277	// satisfied. Must be greater than zero.
278	MinApiLevel int64 `json:"minApiLevel,omitempty"`
279
280	// ForceSendFields is a list of field names (e.g. "MinApiLevel") to
281	// unconditionally include in API requests. By default, fields with
282	// empty values are omitted from API requests. However, any non-pointer,
283	// non-interface field appearing in ForceSendFields will be sent to the
284	// server regardless of whether the field is empty or not. This may be
285	// used to include empty fields in Patch requests.
286	ForceSendFields []string `json:"-"`
287
288	// NullFields is a list of field names (e.g. "MinApiLevel") to include
289	// in API requests with the JSON null value. By default, fields with
290	// empty values are omitted from API requests. However, any field with
291	// an empty value appearing in NullFields will be sent to the server as
292	// null. It is an error if a field in this list has a non-empty value.
293	// This may be used to include null fields in Patch requests.
294	NullFields []string `json:"-"`
295}
296
297func (s *ApiLevelCondition) MarshalJSON() ([]byte, error) {
298	type NoMethod ApiLevelCondition
299	raw := NoMethod(*s)
300	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
301}
302
303// AppTrackInfo: Id to name association of a app track.
304type AppTrackInfo struct {
305	// TrackAlias: The track name associated with the trackId, set in the
306	// Play Console. The name is modifiable from Play Console.
307	TrackAlias string `json:"trackAlias,omitempty"`
308
309	// TrackId: The unmodifiable unique track identifier, taken from the
310	// releaseTrackId in the URL of the Play Console page that displays the
311	// app’s track information.
312	TrackId string `json:"trackId,omitempty"`
313
314	// ForceSendFields is a list of field names (e.g. "TrackAlias") to
315	// unconditionally include in API requests. By default, fields with
316	// empty values are omitted from API requests. However, any non-pointer,
317	// non-interface field appearing in ForceSendFields will be sent to the
318	// server regardless of whether the field is empty or not. This may be
319	// used to include empty fields in Patch requests.
320	ForceSendFields []string `json:"-"`
321
322	// NullFields is a list of field names (e.g. "TrackAlias") to include in
323	// API requests with the JSON null value. By default, fields with empty
324	// values are omitted from API requests. However, any field with an
325	// empty value appearing in NullFields will be sent to the server as
326	// null. It is an error if a field in this list has a non-empty value.
327	// This may be used to include null fields in Patch requests.
328	NullFields []string `json:"-"`
329}
330
331func (s *AppTrackInfo) MarshalJSON() ([]byte, error) {
332	type NoMethod AppTrackInfo
333	raw := NoMethod(*s)
334	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
335}
336
337// Application: Information about an app.
338type Application struct {
339	// AppTracks: Application tracks visible to the enterprise.
340	AppTracks []*AppTrackInfo `json:"appTracks,omitempty"`
341
342	// ManagedProperties: The set of managed properties available to be
343	// pre-configured for the app.
344	ManagedProperties []*ManagedProperty `json:"managedProperties,omitempty"`
345
346	// Name: The name of the app in the form
347	// enterprises/{enterpriseId}/applications/{package_name}.
348	Name string `json:"name,omitempty"`
349
350	// Permissions: The permissions required by the app.
351	Permissions []*ApplicationPermission `json:"permissions,omitempty"`
352
353	// Title: The title of the app. Localized.
354	Title string `json:"title,omitempty"`
355
356	// ServerResponse contains the HTTP response code and headers from the
357	// server.
358	googleapi.ServerResponse `json:"-"`
359
360	// ForceSendFields is a list of field names (e.g. "AppTracks") to
361	// unconditionally include in API requests. By default, fields with
362	// empty values are omitted from API requests. However, any non-pointer,
363	// non-interface field appearing in ForceSendFields will be sent to the
364	// server regardless of whether the field is empty or not. This may be
365	// used to include empty fields in Patch requests.
366	ForceSendFields []string `json:"-"`
367
368	// NullFields is a list of field names (e.g. "AppTracks") to include in
369	// API requests with the JSON null value. By default, fields with empty
370	// values are omitted from API requests. However, any field with an
371	// empty value appearing in NullFields will be sent to the server as
372	// null. It is an error if a field in this list has a non-empty value.
373	// This may be used to include null fields in Patch requests.
374	NullFields []string `json:"-"`
375}
376
377func (s *Application) MarshalJSON() ([]byte, error) {
378	type NoMethod Application
379	raw := NoMethod(*s)
380	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
381}
382
383// ApplicationEvent: An app-related event.
384type ApplicationEvent struct {
385	// CreateTime: The creation time of the event.
386	CreateTime string `json:"createTime,omitempty"`
387
388	// EventType: App event type.
389	//
390	// Possible values:
391	//   "APPLICATION_EVENT_TYPE_UNSPECIFIED" - This value is disallowed.
392	//   "INSTALLED" - The app was installed.
393	//   "CHANGED" - The app was changed, for example, a component was
394	// enabled or disabled.
395	//   "DATA_CLEARED" - The app data was cleared.
396	//   "REMOVED" - The app was removed.
397	//   "REPLACED" - A new version of the app has been installed, replacing
398	// the old version.
399	//   "RESTARTED" - The app was restarted.
400	//   "PINNED" - The app was pinned to the foreground.
401	//   "UNPINNED" - The app was unpinned.
402	EventType string `json:"eventType,omitempty"`
403
404	// ForceSendFields is a list of field names (e.g. "CreateTime") to
405	// unconditionally include in API requests. By default, fields with
406	// empty values are omitted from API requests. However, any non-pointer,
407	// non-interface field appearing in ForceSendFields will be sent to the
408	// server regardless of whether the field is empty or not. This may be
409	// used to include empty fields in Patch requests.
410	ForceSendFields []string `json:"-"`
411
412	// NullFields is a list of field names (e.g. "CreateTime") to include in
413	// API requests with the JSON null value. By default, fields with empty
414	// values are omitted from API requests. However, any field with an
415	// empty value appearing in NullFields will be sent to the server as
416	// null. It is an error if a field in this list has a non-empty value.
417	// This may be used to include null fields in Patch requests.
418	NullFields []string `json:"-"`
419}
420
421func (s *ApplicationEvent) MarshalJSON() ([]byte, error) {
422	type NoMethod ApplicationEvent
423	raw := NoMethod(*s)
424	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
425}
426
427// ApplicationPermission: A permission required by the app.
428type ApplicationPermission struct {
429	// Description: A longer description of the permission, providing more
430	// detail on what it affects. Localized.
431	Description string `json:"description,omitempty"`
432
433	// Name: The name of the permission. Localized.
434	Name string `json:"name,omitempty"`
435
436	// PermissionId: An opaque string uniquely identifying the permission.
437	// Not localized.
438	PermissionId string `json:"permissionId,omitempty"`
439
440	// ForceSendFields is a list of field names (e.g. "Description") to
441	// unconditionally include in API requests. By default, fields with
442	// empty values are omitted from API requests. However, any non-pointer,
443	// non-interface field appearing in ForceSendFields will be sent to the
444	// server regardless of whether the field is empty or not. This may be
445	// used to include empty fields in Patch requests.
446	ForceSendFields []string `json:"-"`
447
448	// NullFields is a list of field names (e.g. "Description") to include
449	// in API requests with the JSON null value. By default, fields with
450	// empty values are omitted from API requests. However, any field with
451	// an empty value appearing in NullFields will be sent to the server as
452	// null. It is an error if a field in this list has a non-empty value.
453	// This may be used to include null fields in Patch requests.
454	NullFields []string `json:"-"`
455}
456
457func (s *ApplicationPermission) MarshalJSON() ([]byte, error) {
458	type NoMethod ApplicationPermission
459	raw := NoMethod(*s)
460	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
461}
462
463// ApplicationPolicy: Policy for an individual app.
464type ApplicationPolicy struct {
465	// AccessibleTrackIds: List of the app’s track IDs that a device
466	// belonging to the enterprise can access. If the list contains multiple
467	// track IDs, devices receive the latest version among all accessible
468	// tracks. If the list contains no track IDs, devices only have access
469	// to the app’s production track. More details about each track are
470	// available in AppTrackInfo.
471	AccessibleTrackIds []string `json:"accessibleTrackIds,omitempty"`
472
473	// DefaultPermissionPolicy: The default policy for all permissions
474	// requested by the app. If specified, this overrides the policy-level
475	// default_permission_policy which applies to all apps. It does not
476	// override the permission_grants which applies to all apps.
477	//
478	// Possible values:
479	//   "PERMISSION_POLICY_UNSPECIFIED" - Policy not specified. If no
480	// policy is specified for a permission at any level, then the PROMPT
481	// behavior is used by default.
482	//   "PROMPT" - Prompt the user to grant a permission.
483	//   "GRANT" - Automatically grant a permission.
484	//   "DENY" - Automatically deny a permission.
485	DefaultPermissionPolicy string `json:"defaultPermissionPolicy,omitempty"`
486
487	// DelegatedScopes: The scopes delegated to the app from Android Device
488	// Policy.
489	//
490	// Possible values:
491	//   "DELEGATED_SCOPE_UNSPECIFIED" - No delegation scope specified.
492	//   "CERT_INSTALL" - Grants access to certificate installation and
493	// management.
494	//   "MANAGED_CONFIGURATIONS" - Grants access to managed configurations
495	// management.
496	//   "BLOCK_UNINSTALL" - Grants access to blocking uninstallation.
497	//   "PERMISSION_GRANT" - Grants access to permission policy and
498	// permission grant state.
499	//   "PACKAGE_ACCESS" - Grants access to package access state.
500	//   "ENABLE_SYSTEM_APP" - Grants access for enabling system apps.
501	DelegatedScopes []string `json:"delegatedScopes,omitempty"`
502
503	// Disabled: Whether the app is disabled. When disabled, the app data is
504	// still preserved.
505	Disabled bool `json:"disabled,omitempty"`
506
507	// InstallType: The type of installation to perform.
508	//
509	// Possible values:
510	//   "INSTALL_TYPE_UNSPECIFIED" - Unspecified. Defaults to AVAILABLE.
511	//   "PREINSTALLED" - The app is automatically installed and can be
512	// removed by the user.
513	//   "FORCE_INSTALLED" - The app is automatically installed and can't be
514	// removed by the user.
515	//   "BLOCKED" - The app is blocked and can't be installed. If the app
516	// was installed under a previous policy, it will be uninstalled.
517	//   "AVAILABLE" - The app is available to install.
518	//   "REQUIRED_FOR_SETUP" - The app is automatically installed and can't
519	// be removed by the user and will prevent setup from completion until
520	// installation is complete.
521	//   "KIOSK" - The app is automatically installed in kiosk mode: it's
522	// set as the preferred home intent and whitelisted for lock task mode.
523	// Device setup won't complete until the app is installed. After
524	// installation, users won't be able to remove the app. You can only set
525	// this installType for one app per policy. When this is present in the
526	// policy, status bar will be automatically disabled.
527	InstallType string `json:"installType,omitempty"`
528
529	// LockTaskAllowed: Whether the app is allowed to lock itself in
530	// full-screen mode. DEPRECATED. Use InstallType KIOSK or
531	// kioskCustomLauncherEnabled to to configure a dedicated device.
532	LockTaskAllowed bool `json:"lockTaskAllowed,omitempty"`
533
534	// ManagedConfiguration: Managed configuration applied to the app. The
535	// format for the configuration is dictated by the ManagedProperty
536	// values supported by the app. Each field name in the managed
537	// configuration must match the key field of the ManagedProperty. The
538	// field value must be compatible with the type of the ManagedProperty:
539	// <table> <tr><td><i>type</i></td><td><i>JSON value</i></td></tr>
540	// <tr><td>BOOL</td><td>true or false</td></tr>
541	// <tr><td>STRING</td><td>string</td></tr>
542	// <tr><td>INTEGER</td><td>number</td></tr>
543	// <tr><td>CHOICE</td><td>string</td></tr>
544	// <tr><td>MULTISELECT</td><td>array of strings</td></tr>
545	// <tr><td>HIDDEN</td><td>string</td></tr>
546	// <tr><td>BUNDLE_ARRAY</td><td>array of objects</td></tr> </table>
547	ManagedConfiguration googleapi.RawMessage `json:"managedConfiguration,omitempty"`
548
549	// ManagedConfigurationTemplate: The managed configurations template for
550	// the app, saved from the managed configurations iframe. This field is
551	// ignored if managed_configuration is set.
552	ManagedConfigurationTemplate *ManagedConfigurationTemplate `json:"managedConfigurationTemplate,omitempty"`
553
554	// MinimumVersionCode: The minimum version of the app that runs on the
555	// device. If set, the device attempts to update the app to at least
556	// this version code. If the app is not up-to-date, the device will
557	// contain a NonComplianceDetail with non_compliance_reason set to
558	// APP_NOT_UPDATED. The app must already be published to Google Play
559	// with a version code greater than or equal to this value. At most 20
560	// apps may specify a minimum version code per policy.
561	MinimumVersionCode int64 `json:"minimumVersionCode,omitempty"`
562
563	// PackageName: The package name of the app. For example,
564	// com.google.android.youtube for the YouTube app.
565	PackageName string `json:"packageName,omitempty"`
566
567	// PermissionGrants: Explicit permission grants or denials for the app.
568	// These values override the default_permission_policy and
569	// permission_grants which apply to all apps.
570	PermissionGrants []*PermissionGrant `json:"permissionGrants,omitempty"`
571
572	// ForceSendFields is a list of field names (e.g. "AccessibleTrackIds")
573	// to unconditionally include in API requests. By default, fields with
574	// empty values are omitted from API requests. However, any non-pointer,
575	// non-interface field appearing in ForceSendFields will be sent to the
576	// server regardless of whether the field is empty or not. This may be
577	// used to include empty fields in Patch requests.
578	ForceSendFields []string `json:"-"`
579
580	// NullFields is a list of field names (e.g. "AccessibleTrackIds") to
581	// include in API requests with the JSON null value. By default, fields
582	// with empty values are omitted from API requests. However, any field
583	// with an empty value appearing in NullFields will be sent to the
584	// server as null. It is an error if a field in this list has a
585	// non-empty value. This may be used to include null fields in Patch
586	// requests.
587	NullFields []string `json:"-"`
588}
589
590func (s *ApplicationPolicy) MarshalJSON() ([]byte, error) {
591	type NoMethod ApplicationPolicy
592	raw := NoMethod(*s)
593	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
594}
595
596// ApplicationReport: Information reported about an installed app.
597type ApplicationReport struct {
598	// ApplicationSource: The source of the package.
599	//
600	// Possible values:
601	//   "APPLICATION_SOURCE_UNSPECIFIED" - The app was sideloaded from an
602	// unspecified source.
603	//   "SYSTEM_APP_FACTORY_VERSION" - This is a system app from the
604	// device's factory image.
605	//   "SYSTEM_APP_UPDATED_VERSION" - This is an updated system app.
606	//   "INSTALLED_FROM_PLAY_STORE" - The app was installed from the Google
607	// Play Store.
608	ApplicationSource string `json:"applicationSource,omitempty"`
609
610	// DisplayName: The display name of the app.
611	DisplayName string `json:"displayName,omitempty"`
612
613	// Events: List of app events. The most recent 20 events are stored in
614	// the list.
615	Events []*ApplicationEvent `json:"events,omitempty"`
616
617	// InstallerPackageName: The package name of the app that installed this
618	// app.
619	InstallerPackageName string `json:"installerPackageName,omitempty"`
620
621	// KeyedAppStates: List of keyed app states reported by the app.
622	KeyedAppStates []*KeyedAppState `json:"keyedAppStates,omitempty"`
623
624	// PackageName: Package name of the app.
625	PackageName string `json:"packageName,omitempty"`
626
627	// PackageSha256Hash: The SHA-256 hash of the app's APK file, which can
628	// be used to verify the app hasn't been modified. Each byte of the hash
629	// value is represented as a two-digit hexadecimal number.
630	PackageSha256Hash string `json:"packageSha256Hash,omitempty"`
631
632	// SigningKeyCertFingerprints: The SHA-1 hash of each
633	// android.content.pm.Signature
634	// (https://developer.android.com/reference/android/content/pm/Signature.
635	// html) associated with the app package. Each byte of each hash value
636	// is represented as a two-digit hexadecimal number.
637	SigningKeyCertFingerprints []string `json:"signingKeyCertFingerprints,omitempty"`
638
639	// State: Application state.
640	//
641	// Possible values:
642	//   "INSTALLED" - App is installed on the device
643	//   "REMOVED" - App was removed from the device
644	State string `json:"state,omitempty"`
645
646	// VersionCode: The app version code, which can be used to determine
647	// whether one version is more recent than another.
648	VersionCode int64 `json:"versionCode,omitempty"`
649
650	// VersionName: The app version as displayed to the user.
651	VersionName string `json:"versionName,omitempty"`
652
653	// ForceSendFields is a list of field names (e.g. "ApplicationSource")
654	// to unconditionally include in API requests. By default, fields with
655	// empty values are omitted from API requests. However, any non-pointer,
656	// non-interface field appearing in ForceSendFields will be sent to the
657	// server regardless of whether the field is empty or not. This may be
658	// used to include empty fields in Patch requests.
659	ForceSendFields []string `json:"-"`
660
661	// NullFields is a list of field names (e.g. "ApplicationSource") to
662	// include in API requests with the JSON null value. By default, fields
663	// with empty values are omitted from API requests. However, any field
664	// with an empty value appearing in NullFields will be sent to the
665	// server as null. It is an error if a field in this list has a
666	// non-empty value. This may be used to include null fields in Patch
667	// requests.
668	NullFields []string `json:"-"`
669}
670
671func (s *ApplicationReport) MarshalJSON() ([]byte, error) {
672	type NoMethod ApplicationReport
673	raw := NoMethod(*s)
674	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
675}
676
677// ApplicationReportingSettings: Settings controlling the behavior of
678// application reports.
679type ApplicationReportingSettings struct {
680	// IncludeRemovedApps: Whether removed apps are included in application
681	// reports.
682	IncludeRemovedApps bool `json:"includeRemovedApps,omitempty"`
683
684	// ForceSendFields is a list of field names (e.g. "IncludeRemovedApps")
685	// to unconditionally include in API requests. By default, fields with
686	// empty values are omitted from API requests. However, any non-pointer,
687	// non-interface field appearing in ForceSendFields will be sent to the
688	// server regardless of whether the field is empty or not. This may be
689	// used to include empty fields in Patch requests.
690	ForceSendFields []string `json:"-"`
691
692	// NullFields is a list of field names (e.g. "IncludeRemovedApps") to
693	// include in API requests with the JSON null value. By default, fields
694	// with empty values are omitted from API requests. However, any field
695	// with an empty value appearing in NullFields will be sent to the
696	// server as null. It is an error if a field in this list has a
697	// non-empty value. This may be used to include null fields in Patch
698	// requests.
699	NullFields []string `json:"-"`
700}
701
702func (s *ApplicationReportingSettings) MarshalJSON() ([]byte, error) {
703	type NoMethod ApplicationReportingSettings
704	raw := NoMethod(*s)
705	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
706}
707
708// BlockAction: An action to block access to apps and data on a fully
709// managed device or in a work profile. This action also triggers a
710// device or work profile to displays a user-facing notification with
711// information (where possible) on how to correct the compliance issue.
712// Note: wipeAction must also be specified.
713type BlockAction struct {
714	// BlockAfterDays: Number of days the policy is non-compliant before the
715	// device or work profile is blocked. To block access immediately, set
716	// to 0. blockAfterDays must be less than wipeAfterDays.
717	BlockAfterDays int64 `json:"blockAfterDays,omitempty"`
718
719	// ForceSendFields is a list of field names (e.g. "BlockAfterDays") to
720	// unconditionally include in API requests. By default, fields with
721	// empty values are omitted from API requests. However, any non-pointer,
722	// non-interface field appearing in ForceSendFields will be sent to the
723	// server regardless of whether the field is empty or not. This may be
724	// used to include empty fields in Patch requests.
725	ForceSendFields []string `json:"-"`
726
727	// NullFields is a list of field names (e.g. "BlockAfterDays") to
728	// include in API requests with the JSON null value. By default, fields
729	// with empty values are omitted from API requests. However, any field
730	// with an empty value appearing in NullFields will be sent to the
731	// server as null. It is an error if a field in this list has a
732	// non-empty value. This may be used to include null fields in Patch
733	// requests.
734	NullFields []string `json:"-"`
735}
736
737func (s *BlockAction) MarshalJSON() ([]byte, error) {
738	type NoMethod BlockAction
739	raw := NoMethod(*s)
740	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
741}
742
743// ChoosePrivateKeyRule: A rule for automatically choosing a private key
744// and certificate to authenticate the device to a server.
745type ChoosePrivateKeyRule struct {
746	// PackageNames: The package names for which outgoing requests are
747	// subject to this rule. If no package names are specified, then the
748	// rule applies to all packages. For each package name listed, the rule
749	// applies to that package and all other packages that shared the same
750	// Android UID. The SHA256 hash of the signing key signatures of each
751	// package_name will be verified against those provided by Play
752	PackageNames []string `json:"packageNames,omitempty"`
753
754	// PrivateKeyAlias: The alias of the private key to be used.
755	PrivateKeyAlias string `json:"privateKeyAlias,omitempty"`
756
757	// UrlPattern: The URL pattern to match against the URL of the outgoing
758	// request. The pattern may contain asterisk (*) wildcards. Any URL is
759	// matched if unspecified.
760	UrlPattern string `json:"urlPattern,omitempty"`
761
762	// ForceSendFields is a list of field names (e.g. "PackageNames") to
763	// unconditionally include in API requests. By default, fields with
764	// empty values are omitted from API requests. However, any non-pointer,
765	// non-interface field appearing in ForceSendFields will be sent to the
766	// server regardless of whether the field is empty or not. This may be
767	// used to include empty fields in Patch requests.
768	ForceSendFields []string `json:"-"`
769
770	// NullFields is a list of field names (e.g. "PackageNames") to include
771	// in API requests with the JSON null value. By default, fields with
772	// empty values are omitted from API requests. However, any field with
773	// an empty value appearing in NullFields will be sent to the server as
774	// null. It is an error if a field in this list has a non-empty value.
775	// This may be used to include null fields in Patch requests.
776	NullFields []string `json:"-"`
777}
778
779func (s *ChoosePrivateKeyRule) MarshalJSON() ([]byte, error) {
780	type NoMethod ChoosePrivateKeyRule
781	raw := NoMethod(*s)
782	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
783}
784
785// Command: A command.
786type Command struct {
787	// CreateTime: The timestamp at which the command was created. The
788	// timestamp is automatically generated by the server.
789	CreateTime string `json:"createTime,omitempty"`
790
791	// Duration: The duration for which the command is valid. The command
792	// will expire if not executed by the device during this time. The
793	// default duration if unspecified is ten minutes. There is no maximum
794	// duration.
795	Duration string `json:"duration,omitempty"`
796
797	// ErrorCode: If the command failed, an error code explaining the
798	// failure. This is not set when the command is cancelled by the caller.
799	//
800	// Possible values:
801	//   "COMMAND_ERROR_CODE_UNSPECIFIED" - There was no error.
802	//   "UNKNOWN" - An unknown error occurred.
803	//   "API_LEVEL" - The API level of the device does not support this
804	// command.
805	//   "MANAGEMENT_MODE" - The management mode (profile owner, device
806	// owner, etc.) does not support the command.
807	//   "INVALID_VALUE" - The command has an invalid parameter value.
808	//   "UNSUPPORTED" - The device doesn't support the command. Updating
809	// Android Device Policy to the latest version may resolve the issue.
810	ErrorCode string `json:"errorCode,omitempty"`
811
812	// NewPassword: For commands of type RESET_PASSWORD, optionally
813	// specifies the new password.
814	NewPassword string `json:"newPassword,omitempty"`
815
816	// ResetPasswordFlags: For commands of type RESET_PASSWORD, optionally
817	// specifies flags.
818	//
819	// Possible values:
820	//   "RESET_PASSWORD_FLAG_UNSPECIFIED" - This value is ignored.
821	//   "REQUIRE_ENTRY" - Don't allow other admins to change the password
822	// again until the user has entered it.
823	//   "DO_NOT_ASK_CREDENTIALS_ON_BOOT" - Don't ask for user credentials
824	// on device boot.
825	//   "LOCK_NOW" - Lock the device after password reset.
826	ResetPasswordFlags []string `json:"resetPasswordFlags,omitempty"`
827
828	// Type: The type of the command.
829	//
830	// Possible values:
831	//   "COMMAND_TYPE_UNSPECIFIED" - This value is disallowed.
832	//   "LOCK" - Lock the device, as if the lock screen timeout had
833	// expired.
834	//   "RESET_PASSWORD" - Reset the user's password.
835	//   "REBOOT" - Reboot the device. Only supported on API level 24+.
836	Type string `json:"type,omitempty"`
837
838	// UserName: The resource name of the user that owns the device in the
839	// form enterprises/{enterpriseId}/users/{userId}. This is automatically
840	// generated by the server based on the device the command is sent to.
841	UserName string `json:"userName,omitempty"`
842
843	// ForceSendFields is a list of field names (e.g. "CreateTime") to
844	// unconditionally include in API requests. By default, fields with
845	// empty values are omitted from API requests. However, any non-pointer,
846	// non-interface field appearing in ForceSendFields will be sent to the
847	// server regardless of whether the field is empty or not. This may be
848	// used to include empty fields in Patch requests.
849	ForceSendFields []string `json:"-"`
850
851	// NullFields is a list of field names (e.g. "CreateTime") to include in
852	// API requests with the JSON null value. By default, fields with empty
853	// values are omitted from API requests. However, any field with an
854	// empty value appearing in NullFields will be sent to the server as
855	// null. It is an error if a field in this list has a non-empty value.
856	// This may be used to include null fields in Patch requests.
857	NullFields []string `json:"-"`
858}
859
860func (s *Command) MarshalJSON() ([]byte, error) {
861	type NoMethod Command
862	raw := NoMethod(*s)
863	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
864}
865
866// ComplianceRule: A rule declaring which mitigating actions to take
867// when a device is not compliant with its policy. For every rule, there
868// is always an implicit mitigating action to set policy_compliant to
869// false for the Device resource, and display a message on the device
870// indicating that the device is not compliant with its policy. Other
871// mitigating actions may optionally be taken as well, depending on the
872// field values in the rule.
873type ComplianceRule struct {
874	// ApiLevelCondition: A condition which is satisfied if the Android
875	// Framework API level on the device doesn't meet a minimum requirement.
876	ApiLevelCondition *ApiLevelCondition `json:"apiLevelCondition,omitempty"`
877
878	// DisableApps: If set to true, the rule includes a mitigating action to
879	// disable apps so that the device is effectively disabled, but app data
880	// is preserved. If the device is running an app in locked task mode,
881	// the app will be closed and a UI showing the reason for non-compliance
882	// will be displayed.
883	DisableApps bool `json:"disableApps,omitempty"`
884
885	// NonComplianceDetailCondition: A condition which is satisfied if there
886	// exists any matching NonComplianceDetail for the device.
887	NonComplianceDetailCondition *NonComplianceDetailCondition `json:"nonComplianceDetailCondition,omitempty"`
888
889	// PackageNamesToDisable: If set, the rule includes a mitigating action
890	// to disable apps specified in the list, but app data is preserved.
891	PackageNamesToDisable []string `json:"packageNamesToDisable,omitempty"`
892
893	// ForceSendFields is a list of field names (e.g. "ApiLevelCondition")
894	// to unconditionally include in API requests. By default, fields with
895	// empty values are omitted from API requests. However, any non-pointer,
896	// non-interface field appearing in ForceSendFields will be sent to the
897	// server regardless of whether the field is empty or not. This may be
898	// used to include empty fields in Patch requests.
899	ForceSendFields []string `json:"-"`
900
901	// NullFields is a list of field names (e.g. "ApiLevelCondition") to
902	// include in API requests with the JSON null value. By default, fields
903	// with empty values are omitted from API requests. However, any field
904	// with an empty value appearing in NullFields will be sent to the
905	// server as null. It is an error if a field in this list has a
906	// non-empty value. This may be used to include null fields in Patch
907	// requests.
908	NullFields []string `json:"-"`
909}
910
911func (s *ComplianceRule) MarshalJSON() ([]byte, error) {
912	type NoMethod ComplianceRule
913	raw := NoMethod(*s)
914	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
915}
916
917// Device: A device owned by an enterprise. Unless otherwise noted, all
918// fields are read-only and can't be modified by
919// enterprises.devices.patch.
920type Device struct {
921	// ApiLevel: The API level of the Android platform version running on
922	// the device.
923	ApiLevel int64 `json:"apiLevel,omitempty"`
924
925	// ApplicationReports: Reports for apps installed on the device. This
926	// information is only available when application_reports_enabled is
927	// true in the device's policy.
928	ApplicationReports []*ApplicationReport `json:"applicationReports,omitempty"`
929
930	// AppliedPolicyName: The name of the policy currently applied to the
931	// device.
932	AppliedPolicyName string `json:"appliedPolicyName,omitempty"`
933
934	// AppliedPolicyVersion: The version of the policy currently applied to
935	// the device.
936	AppliedPolicyVersion int64 `json:"appliedPolicyVersion,omitempty,string"`
937
938	// AppliedState: The state currently applied to the device.
939	//
940	// Possible values:
941	//   "DEVICE_STATE_UNSPECIFIED" - This value is disallowed.
942	//   "ACTIVE" - The device is active.
943	//   "DISABLED" - The device is disabled.
944	//   "DELETED" - The device was deleted. This state will never be
945	// returned by an API call, but is used in the final status report
946	// published to Cloud Pub/Sub when the device acknowledges the deletion.
947	//   "PROVISIONING" - The device is being provisioned. Newly enrolled
948	// devices are in this state until they have a policy applied.
949	AppliedState string `json:"appliedState,omitempty"`
950
951	// DeviceSettings: Device settings information. This information is only
952	// available if deviceSettingsEnabled is true in the device's policy.
953	DeviceSettings *DeviceSettings `json:"deviceSettings,omitempty"`
954
955	// DisabledReason: If the device state is DISABLED, an optional message
956	// that is displayed on the device indicating the reason the device is
957	// disabled. This field can be modified by a patch request.
958	DisabledReason *UserFacingMessage `json:"disabledReason,omitempty"`
959
960	// Displays: Detailed information about displays on the device. This
961	// information is only available if displayInfoEnabled is true in the
962	// device's policy.
963	Displays []*Display `json:"displays,omitempty"`
964
965	// EnrollmentTime: The time of device enrollment.
966	EnrollmentTime string `json:"enrollmentTime,omitempty"`
967
968	// EnrollmentTokenData: If the device was enrolled with an enrollment
969	// token with additional data provided, this field contains that data.
970	EnrollmentTokenData string `json:"enrollmentTokenData,omitempty"`
971
972	// EnrollmentTokenName: If the device was enrolled with an enrollment
973	// token, this field contains the name of the token.
974	EnrollmentTokenName string `json:"enrollmentTokenName,omitempty"`
975
976	// HardwareInfo: Detailed information about the device hardware.
977	HardwareInfo *HardwareInfo `json:"hardwareInfo,omitempty"`
978
979	// HardwareStatusSamples: Hardware status samples in chronological
980	// order. This information is only available if hardwareStatusEnabled is
981	// true in the device's policy.
982	HardwareStatusSamples []*HardwareStatus `json:"hardwareStatusSamples,omitempty"`
983
984	// LastPolicyComplianceReportTime: Deprecated.
985	LastPolicyComplianceReportTime string `json:"lastPolicyComplianceReportTime,omitempty"`
986
987	// LastPolicySyncTime: The last time the device fetched its policy.
988	LastPolicySyncTime string `json:"lastPolicySyncTime,omitempty"`
989
990	// LastStatusReportTime: The last time the device sent a status report.
991	LastStatusReportTime string `json:"lastStatusReportTime,omitempty"`
992
993	// ManagementMode: The type of management mode Android Device Policy
994	// takes on the device. This influences which policy settings are
995	// supported.
996	//
997	// Possible values:
998	//   "MANAGEMENT_MODE_UNSPECIFIED" - This value is disallowed.
999	//   "DEVICE_OWNER" - Device owner. Android Device Policy has full
1000	// control over the device.
1001	//   "PROFILE_OWNER" - Profile owner. Android Device Policy has control
1002	// over a managed profile on the device.
1003	ManagementMode string `json:"managementMode,omitempty"`
1004
1005	// MemoryEvents: Events related to memory and storage measurements in
1006	// chronological order. This information is only available if
1007	// memoryInfoEnabled is true in the device's policy.
1008	MemoryEvents []*MemoryEvent `json:"memoryEvents,omitempty"`
1009
1010	// MemoryInfo: Memory information. This information is only available if
1011	// memoryInfoEnabled is true in the device's policy.
1012	MemoryInfo *MemoryInfo `json:"memoryInfo,omitempty"`
1013
1014	// Name: The name of the device in the form
1015	// enterprises/{enterpriseId}/devices/{deviceId}.
1016	Name string `json:"name,omitempty"`
1017
1018	// NetworkInfo: Device network information. This information is only
1019	// available if networkInfoEnabled is true in the device's policy.
1020	NetworkInfo *NetworkInfo `json:"networkInfo,omitempty"`
1021
1022	// NonComplianceDetails: Details about policy settings that the device
1023	// is not compliant with.
1024	NonComplianceDetails []*NonComplianceDetail `json:"nonComplianceDetails,omitempty"`
1025
1026	// PolicyCompliant: Whether the device is compliant with its policy.
1027	PolicyCompliant bool `json:"policyCompliant,omitempty"`
1028
1029	// PolicyName: The name of the policy applied to the device, in the form
1030	// enterprises/{enterpriseId}/policies/{policyId}. If not specified, the
1031	// policy_name for the device's user is applied. This field can be
1032	// modified by a patch request. You can specify only the policyId when
1033	// calling enterprises.devices.patch, as long as the policyId doesn’t
1034	// contain any slashes. The rest of the policy name is inferred.
1035	PolicyName string `json:"policyName,omitempty"`
1036
1037	// PowerManagementEvents: Power management events on the device in
1038	// chronological order. This information is only available if
1039	// powerManagementEventsEnabled is true in the device's policy.
1040	PowerManagementEvents []*PowerManagementEvent `json:"powerManagementEvents,omitempty"`
1041
1042	// PreviousDeviceNames: If the same physical device has been enrolled
1043	// multiple times, this field contains its previous device names. The
1044	// serial number is used as the unique identifier to determine if the
1045	// same physical device has enrolled previously. The names are in
1046	// chronological order.
1047	PreviousDeviceNames []string `json:"previousDeviceNames,omitempty"`
1048
1049	// SecurityPosture: Device's security posture value that reflects how
1050	// secure the device is.
1051	SecurityPosture *SecurityPosture `json:"securityPosture,omitempty"`
1052
1053	// SoftwareInfo: Detailed information about the device software. This
1054	// information is only available if softwareInfoEnabled is true in the
1055	// device's policy.
1056	SoftwareInfo *SoftwareInfo `json:"softwareInfo,omitempty"`
1057
1058	// State: The state to be applied to the device. This field can be
1059	// modified by a patch request. Note that when calling
1060	// enterprises.devices.patch, ACTIVE and DISABLED are the only allowable
1061	// values. To enter the device into a DELETED state, call
1062	// enterprises.devices.delete.
1063	//
1064	// Possible values:
1065	//   "DEVICE_STATE_UNSPECIFIED" - This value is disallowed.
1066	//   "ACTIVE" - The device is active.
1067	//   "DISABLED" - The device is disabled.
1068	//   "DELETED" - The device was deleted. This state will never be
1069	// returned by an API call, but is used in the final status report
1070	// published to Cloud Pub/Sub when the device acknowledges the deletion.
1071	//   "PROVISIONING" - The device is being provisioned. Newly enrolled
1072	// devices are in this state until they have a policy applied.
1073	State string `json:"state,omitempty"`
1074
1075	// SystemProperties: Map of selected system properties name and value
1076	// related to the device. This information is only available if
1077	// systemPropertiesEnabled is true in the device's policy.
1078	SystemProperties map[string]string `json:"systemProperties,omitempty"`
1079
1080	// User: The user who owns the device.
1081	User *User `json:"user,omitempty"`
1082
1083	// UserName: The resource name of the user that owns this device in the
1084	// form enterprises/{enterpriseId}/users/{userId}.
1085	UserName string `json:"userName,omitempty"`
1086
1087	// ServerResponse contains the HTTP response code and headers from the
1088	// server.
1089	googleapi.ServerResponse `json:"-"`
1090
1091	// ForceSendFields is a list of field names (e.g. "ApiLevel") to
1092	// unconditionally include in API requests. By default, fields with
1093	// empty values are omitted from API requests. However, any non-pointer,
1094	// non-interface field appearing in ForceSendFields will be sent to the
1095	// server regardless of whether the field is empty or not. This may be
1096	// used to include empty fields in Patch requests.
1097	ForceSendFields []string `json:"-"`
1098
1099	// NullFields is a list of field names (e.g. "ApiLevel") to include in
1100	// API requests with the JSON null value. By default, fields with empty
1101	// values are omitted from API requests. However, any field with an
1102	// empty value appearing in NullFields will be sent to the server as
1103	// null. It is an error if a field in this list has a non-empty value.
1104	// This may be used to include null fields in Patch requests.
1105	NullFields []string `json:"-"`
1106}
1107
1108func (s *Device) MarshalJSON() ([]byte, error) {
1109	type NoMethod Device
1110	raw := NoMethod(*s)
1111	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1112}
1113
1114// DeviceSettings: Information about security related device settings on
1115// device.
1116type DeviceSettings struct {
1117	// AdbEnabled: Whether ADB
1118	// (https://developer.android.com/studio/command-line/adb.html) is
1119	// enabled on the device.
1120	AdbEnabled bool `json:"adbEnabled,omitempty"`
1121
1122	// DevelopmentSettingsEnabled: Whether developer mode is enabled on the
1123	// device.
1124	DevelopmentSettingsEnabled bool `json:"developmentSettingsEnabled,omitempty"`
1125
1126	// EncryptionStatus: Encryption status from DevicePolicyManager.
1127	//
1128	// Possible values:
1129	//   "ENCRYPTION_STATUS_UNSPECIFIED" - Unspecified. No device should
1130	// have this type.
1131	//   "UNSUPPORTED" - Encryption is not supported by the device.
1132	//   "INACTIVE" - Encryption is supported by the device, but is not
1133	// currently active.
1134	//   "ACTIVATING" - Encryption is not currently active, but is currently
1135	// being activated.
1136	//   "ACTIVE" - Encryption is active.
1137	//   "ACTIVE_DEFAULT_KEY" - Encryption is active, but an encryption key
1138	// is not set by the user.
1139	//   "ACTIVE_PER_USER" - Encryption is active, and the encryption key is
1140	// tied to the user profile.
1141	EncryptionStatus string `json:"encryptionStatus,omitempty"`
1142
1143	// IsDeviceSecure: Whether the device is secured with PIN/password.
1144	IsDeviceSecure bool `json:"isDeviceSecure,omitempty"`
1145
1146	// IsEncrypted: Whether the storage encryption is enabled.
1147	IsEncrypted bool `json:"isEncrypted,omitempty"`
1148
1149	// UnknownSourcesEnabled: Whether installing apps from unknown sources
1150	// is enabled.
1151	UnknownSourcesEnabled bool `json:"unknownSourcesEnabled,omitempty"`
1152
1153	// VerifyAppsEnabled: Whether Verify Apps (Google Play Protect
1154	// (https://support.google.com/googleplay/answer/2812853)) is enabled on
1155	// the device.
1156	VerifyAppsEnabled bool `json:"verifyAppsEnabled,omitempty"`
1157
1158	// ForceSendFields is a list of field names (e.g. "AdbEnabled") to
1159	// unconditionally include in API requests. By default, fields with
1160	// empty values are omitted from API requests. However, any non-pointer,
1161	// non-interface field appearing in ForceSendFields will be sent to the
1162	// server regardless of whether the field is empty or not. This may be
1163	// used to include empty fields in Patch requests.
1164	ForceSendFields []string `json:"-"`
1165
1166	// NullFields is a list of field names (e.g. "AdbEnabled") to include in
1167	// API requests with the JSON null value. By default, fields with empty
1168	// values are omitted from API requests. However, any field with an
1169	// empty value appearing in NullFields will be sent to the server as
1170	// null. It is an error if a field in this list has a non-empty value.
1171	// This may be used to include null fields in Patch requests.
1172	NullFields []string `json:"-"`
1173}
1174
1175func (s *DeviceSettings) MarshalJSON() ([]byte, error) {
1176	type NoMethod DeviceSettings
1177	raw := NoMethod(*s)
1178	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1179}
1180
1181// Display: Device display information.
1182type Display struct {
1183	// Density: Display density expressed as dots-per-inch.
1184	Density int64 `json:"density,omitempty"`
1185
1186	// DisplayId: Unique display id.
1187	DisplayId int64 `json:"displayId,omitempty"`
1188
1189	// Height: Display height in pixels.
1190	Height int64 `json:"height,omitempty"`
1191
1192	// Name: Name of the display.
1193	Name string `json:"name,omitempty"`
1194
1195	// RefreshRate: Refresh rate of the display in frames per second.
1196	RefreshRate int64 `json:"refreshRate,omitempty"`
1197
1198	// State: State of the display.
1199	//
1200	// Possible values:
1201	//   "DISPLAY_STATE_UNSPECIFIED" - This value is disallowed.
1202	//   "OFF" - Display is off.
1203	//   "ON" - Display is on.
1204	//   "DOZE" - Display is dozing in a low power state
1205	//   "SUSPENDED" - Display is dozing in a suspended low power state.
1206	State string `json:"state,omitempty"`
1207
1208	// Width: Display width in pixels.
1209	Width int64 `json:"width,omitempty"`
1210
1211	// ForceSendFields is a list of field names (e.g. "Density") to
1212	// unconditionally include in API requests. By default, fields with
1213	// empty values are omitted from API requests. However, any non-pointer,
1214	// non-interface field appearing in ForceSendFields will be sent to the
1215	// server regardless of whether the field is empty or not. This may be
1216	// used to include empty fields in Patch requests.
1217	ForceSendFields []string `json:"-"`
1218
1219	// NullFields is a list of field names (e.g. "Density") to include in
1220	// API requests with the JSON null value. By default, fields with empty
1221	// values are omitted from API requests. However, any field with an
1222	// empty value appearing in NullFields will be sent to the server as
1223	// null. It is an error if a field in this list has a non-empty value.
1224	// This may be used to include null fields in Patch requests.
1225	NullFields []string `json:"-"`
1226}
1227
1228func (s *Display) MarshalJSON() ([]byte, error) {
1229	type NoMethod Display
1230	raw := NoMethod(*s)
1231	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1232}
1233
1234// Empty: A generic empty message that you can re-use to avoid defining
1235// duplicated empty messages in your APIs. A typical example is to use
1236// it as the request or the response type of an API method. For
1237// instance:
1238// service Foo {
1239//   rpc Bar(google.protobuf.Empty) returns
1240// (google.protobuf.Empty);
1241// }
1242// The JSON representation for Empty is empty JSON object {}.
1243type Empty struct {
1244	// ServerResponse contains the HTTP response code and headers from the
1245	// server.
1246	googleapi.ServerResponse `json:"-"`
1247}
1248
1249// EnrollmentToken: An enrollment token.
1250type EnrollmentToken struct {
1251	// AdditionalData: Optional, arbitrary data associated with the
1252	// enrollment token. This could contain, for example, the ID of an org
1253	// unit the device is assigned to after enrollment. After a device
1254	// enrolls with the token, this data will be exposed in the
1255	// enrollment_token_data field of the Device resource. The data must be
1256	// 1024 characters or less; otherwise, the creation request will fail.
1257	AdditionalData string `json:"additionalData,omitempty"`
1258
1259	// Duration: The length of time the enrollment token is valid, ranging
1260	// from 1 minute to 30 days. If not specified, the default duration is 1
1261	// hour.
1262	Duration string `json:"duration,omitempty"`
1263
1264	// ExpirationTimestamp: The expiration time of the token. This is a
1265	// read-only field generated by the server.
1266	ExpirationTimestamp string `json:"expirationTimestamp,omitempty"`
1267
1268	// Name: The name of the enrollment token, which is generated by the
1269	// server during creation, in the form
1270	// enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}.
1271	Name string `json:"name,omitempty"`
1272
1273	// OneTimeOnly: Whether the enrollment token is for one time use only.
1274	// If the flag is set to true, only one device can use it for
1275	// registration.
1276	OneTimeOnly bool `json:"oneTimeOnly,omitempty"`
1277
1278	// PolicyName: The name of the policy initially applied to the enrolled
1279	// device, in the form enterprises/{enterpriseId}/policies/{policyId}.
1280	// If not specified, the policy_name for the device’s user is applied.
1281	// If user_name is also not specified,
1282	// enterprises/{enterpriseId}/policies/default is applied by default.
1283	// When updating this field, you can specify only the policyId as long
1284	// as the policyId doesn’t contain any slashes. The rest of the policy
1285	// name will be inferred.
1286	PolicyName string `json:"policyName,omitempty"`
1287
1288	// QrCode: A JSON string whose UTF-8 representation can be used to
1289	// generate a QR code to enroll a device with this enrollment token. To
1290	// enroll a device using NFC, the NFC record must contain a serialized
1291	// java.util.Properties representation of the properties in the JSON.
1292	QrCode string `json:"qrCode,omitempty"`
1293
1294	// User: The user associated with this enrollment token. If it's
1295	// specified when the enrollment token is created and the user does not
1296	// exist, the user will be created. This field must not contain
1297	// personally identifiable information. Only the account_identifier
1298	// field needs to be set.
1299	User *User `json:"user,omitempty"`
1300
1301	// Value: The token value that's passed to the device and authorizes the
1302	// device to enroll. This is a read-only field generated by the server.
1303	Value string `json:"value,omitempty"`
1304
1305	// ServerResponse contains the HTTP response code and headers from the
1306	// server.
1307	googleapi.ServerResponse `json:"-"`
1308
1309	// ForceSendFields is a list of field names (e.g. "AdditionalData") to
1310	// unconditionally include in API requests. By default, fields with
1311	// empty values are omitted from API requests. However, any non-pointer,
1312	// non-interface field appearing in ForceSendFields will be sent to the
1313	// server regardless of whether the field is empty or not. This may be
1314	// used to include empty fields in Patch requests.
1315	ForceSendFields []string `json:"-"`
1316
1317	// NullFields is a list of field names (e.g. "AdditionalData") to
1318	// include in API requests with the JSON null value. By default, fields
1319	// with empty values are omitted from API requests. However, any field
1320	// with an empty value appearing in NullFields will be sent to the
1321	// server as null. It is an error if a field in this list has a
1322	// non-empty value. This may be used to include null fields in Patch
1323	// requests.
1324	NullFields []string `json:"-"`
1325}
1326
1327func (s *EnrollmentToken) MarshalJSON() ([]byte, error) {
1328	type NoMethod EnrollmentToken
1329	raw := NoMethod(*s)
1330	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1331}
1332
1333// Enterprise: The configuration applied to an enterprise.
1334type Enterprise struct {
1335	// AppAutoApprovalEnabled: Deprecated and unused.
1336	AppAutoApprovalEnabled bool `json:"appAutoApprovalEnabled,omitempty"`
1337
1338	// EnabledNotificationTypes: The types of Google Pub/Sub notifications
1339	// enabled for the enterprise.
1340	//
1341	// Possible values:
1342	//   "NOTIFICATION_TYPE_UNSPECIFIED" - This value is ignored.
1343	//   "ENROLLMENT" - A notification sent when a device enrolls.
1344	//   "COMPLIANCE_REPORT" - Deprecated.
1345	//   "STATUS_REPORT" - A notification sent when a device issues a status
1346	// report.
1347	//   "COMMAND" - A notification sent when a device command has
1348	// completed.
1349	EnabledNotificationTypes []string `json:"enabledNotificationTypes,omitempty"`
1350
1351	// EnterpriseDisplayName: The name of the enterprise displayed to users.
1352	EnterpriseDisplayName string `json:"enterpriseDisplayName,omitempty"`
1353
1354	// Logo: An image displayed as a logo during device provisioning.
1355	// Supported types are: image/bmp, image/gif, image/x-ico, image/jpeg,
1356	// image/png, image/webp, image/vnd.wap.wbmp, image/x-adobe-dng.
1357	Logo *ExternalData `json:"logo,omitempty"`
1358
1359	// Name: The name of the enterprise which is generated by the server
1360	// during creation, in the form enterprises/{enterpriseId}.
1361	Name string `json:"name,omitempty"`
1362
1363	// PrimaryColor: A color in RGB format that indicates the predominant
1364	// color to display in the device management app UI. The color
1365	// components are stored as follows: (red << 16) | (green << 8) | blue,
1366	// where the value of each component is between 0 and 255, inclusive.
1367	PrimaryColor int64 `json:"primaryColor,omitempty"`
1368
1369	// PubsubTopic: The topic that Cloud Pub/Sub notifications are published
1370	// to, in the form projects/{project}/topics/{topic}. This field is only
1371	// required if Pub/Sub notifications are enabled.
1372	PubsubTopic string `json:"pubsubTopic,omitempty"`
1373
1374	// SigninDetails: Sign-in details of the enterprise. Maximum of 1
1375	// SigninDetail is supported.
1376	SigninDetails []*SigninDetail `json:"signinDetails,omitempty"`
1377
1378	// TermsAndConditions: Terms and conditions that must be accepted when
1379	// provisioning a device for this enterprise. A page of terms is
1380	// generated for each value in this list.
1381	TermsAndConditions []*TermsAndConditions `json:"termsAndConditions,omitempty"`
1382
1383	// ServerResponse contains the HTTP response code and headers from the
1384	// server.
1385	googleapi.ServerResponse `json:"-"`
1386
1387	// ForceSendFields is a list of field names (e.g.
1388	// "AppAutoApprovalEnabled") to unconditionally include in API requests.
1389	// By default, fields with empty values are omitted from API requests.
1390	// However, any non-pointer, non-interface field appearing in
1391	// ForceSendFields will be sent to the server regardless of whether the
1392	// field is empty or not. This may be used to include empty fields in
1393	// Patch requests.
1394	ForceSendFields []string `json:"-"`
1395
1396	// NullFields is a list of field names (e.g. "AppAutoApprovalEnabled")
1397	// to include in API requests with the JSON null value. By default,
1398	// fields with empty values are omitted from API requests. However, any
1399	// field with an empty value appearing in NullFields will be sent to the
1400	// server as null. It is an error if a field in this list has a
1401	// non-empty value. This may be used to include null fields in Patch
1402	// requests.
1403	NullFields []string `json:"-"`
1404}
1405
1406func (s *Enterprise) MarshalJSON() ([]byte, error) {
1407	type NoMethod Enterprise
1408	raw := NoMethod(*s)
1409	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1410}
1411
1412// ExternalData: Data hosted at an external location. The data is to be
1413// downloaded by Android Device Policy and verified against the hash.
1414type ExternalData struct {
1415	// Sha256Hash: The base-64 encoded SHA-256 hash of the content hosted at
1416	// url. If the content doesn't match this hash, Android Device Policy
1417	// won't use the data.
1418	Sha256Hash string `json:"sha256Hash,omitempty"`
1419
1420	// Url: The absolute URL to the data, which must use either the http or
1421	// https scheme. Android Device Policy doesn't provide any credentials
1422	// in the GET request, so the URL must be publicly accessible. Including
1423	// a long, random component in the URL may be used to prevent attackers
1424	// from discovering the URL.
1425	Url string `json:"url,omitempty"`
1426
1427	// ForceSendFields is a list of field names (e.g. "Sha256Hash") to
1428	// unconditionally include in API requests. By default, fields with
1429	// empty values are omitted from API requests. However, any non-pointer,
1430	// non-interface field appearing in ForceSendFields will be sent to the
1431	// server regardless of whether the field is empty or not. This may be
1432	// used to include empty fields in Patch requests.
1433	ForceSendFields []string `json:"-"`
1434
1435	// NullFields is a list of field names (e.g. "Sha256Hash") to include in
1436	// API requests with the JSON null value. By default, fields with empty
1437	// values are omitted from API requests. However, any field with an
1438	// empty value appearing in NullFields will be sent to the server as
1439	// null. It is an error if a field in this list has a non-empty value.
1440	// This may be used to include null fields in Patch requests.
1441	NullFields []string `json:"-"`
1442}
1443
1444func (s *ExternalData) MarshalJSON() ([]byte, error) {
1445	type NoMethod ExternalData
1446	raw := NoMethod(*s)
1447	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1448}
1449
1450// HardwareInfo: Information about device hardware. The fields related
1451// to temperature thresholds are only available if hardwareStatusEnabled
1452// is true in the device's policy.
1453type HardwareInfo struct {
1454	// BatteryShutdownTemperatures: Battery shutdown temperature thresholds
1455	// in Celsius for each battery on the device.
1456	BatteryShutdownTemperatures []float64 `json:"batteryShutdownTemperatures,omitempty"`
1457
1458	// BatteryThrottlingTemperatures: Battery throttling temperature
1459	// thresholds in Celsius for each battery on the device.
1460	BatteryThrottlingTemperatures []float64 `json:"batteryThrottlingTemperatures,omitempty"`
1461
1462	// Brand: Brand of the device. For example, Google.
1463	Brand string `json:"brand,omitempty"`
1464
1465	// CpuShutdownTemperatures: CPU shutdown temperature thresholds in
1466	// Celsius for each CPU on the device.
1467	CpuShutdownTemperatures []float64 `json:"cpuShutdownTemperatures,omitempty"`
1468
1469	// CpuThrottlingTemperatures: CPU throttling temperature thresholds in
1470	// Celsius for each CPU on the device.
1471	CpuThrottlingTemperatures []float64 `json:"cpuThrottlingTemperatures,omitempty"`
1472
1473	// DeviceBasebandVersion: Baseband version. For example,
1474	// MDM9625_104662.22.05.34p.
1475	DeviceBasebandVersion string `json:"deviceBasebandVersion,omitempty"`
1476
1477	// GpuShutdownTemperatures: GPU shutdown temperature thresholds in
1478	// Celsius for each GPU on the device.
1479	GpuShutdownTemperatures []float64 `json:"gpuShutdownTemperatures,omitempty"`
1480
1481	// GpuThrottlingTemperatures: GPU throttling temperature thresholds in
1482	// Celsius for each GPU on the device.
1483	GpuThrottlingTemperatures []float64 `json:"gpuThrottlingTemperatures,omitempty"`
1484
1485	// Hardware: Name of the hardware. For example, Angler.
1486	Hardware string `json:"hardware,omitempty"`
1487
1488	// Manufacturer: Manufacturer. For example, Motorola.
1489	Manufacturer string `json:"manufacturer,omitempty"`
1490
1491	// Model: The model of the device. For example, Asus Nexus 7.
1492	Model string `json:"model,omitempty"`
1493
1494	// SerialNumber: The device serial number.
1495	SerialNumber string `json:"serialNumber,omitempty"`
1496
1497	// SkinShutdownTemperatures: Device skin shutdown temperature thresholds
1498	// in Celsius.
1499	SkinShutdownTemperatures []float64 `json:"skinShutdownTemperatures,omitempty"`
1500
1501	// SkinThrottlingTemperatures: Device skin throttling temperature
1502	// thresholds in Celsius.
1503	SkinThrottlingTemperatures []float64 `json:"skinThrottlingTemperatures,omitempty"`
1504
1505	// ForceSendFields is a list of field names (e.g.
1506	// "BatteryShutdownTemperatures") to unconditionally include in API
1507	// requests. By default, fields with empty values are omitted from API
1508	// requests. However, any non-pointer, non-interface field appearing in
1509	// ForceSendFields will be sent to the server regardless of whether the
1510	// field is empty or not. This may be used to include empty fields in
1511	// Patch requests.
1512	ForceSendFields []string `json:"-"`
1513
1514	// NullFields is a list of field names (e.g.
1515	// "BatteryShutdownTemperatures") to include in API requests with the
1516	// JSON null value. By default, fields with empty values are omitted
1517	// from API requests. However, any field with an empty value appearing
1518	// in NullFields will be sent to the server as null. It is an error if a
1519	// field in this list has a non-empty value. This may be used to include
1520	// null fields in Patch requests.
1521	NullFields []string `json:"-"`
1522}
1523
1524func (s *HardwareInfo) MarshalJSON() ([]byte, error) {
1525	type NoMethod HardwareInfo
1526	raw := NoMethod(*s)
1527	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1528}
1529
1530// HardwareStatus: Hardware status. Temperatures may be compared to the
1531// temperature thresholds available in hardwareInfo to determine
1532// hardware health.
1533type HardwareStatus struct {
1534	// BatteryTemperatures: Current battery temperatures in Celsius for each
1535	// battery on the device.
1536	BatteryTemperatures []float64 `json:"batteryTemperatures,omitempty"`
1537
1538	// CpuTemperatures: Current CPU temperatures in Celsius for each CPU on
1539	// the device.
1540	CpuTemperatures []float64 `json:"cpuTemperatures,omitempty"`
1541
1542	// CpuUsages: CPU usages in percentage for each core available on the
1543	// device. Usage is 0 for each unplugged core. Empty array implies that
1544	// CPU usage is not supported in the system.
1545	CpuUsages []float64 `json:"cpuUsages,omitempty"`
1546
1547	// CreateTime: The time the measurements were taken.
1548	CreateTime string `json:"createTime,omitempty"`
1549
1550	// FanSpeeds: Fan speeds in RPM for each fan on the device. Empty array
1551	// means that there are no fans or fan speed is not supported on the
1552	// system.
1553	FanSpeeds []float64 `json:"fanSpeeds,omitempty"`
1554
1555	// GpuTemperatures: Current GPU temperatures in Celsius for each GPU on
1556	// the device.
1557	GpuTemperatures []float64 `json:"gpuTemperatures,omitempty"`
1558
1559	// SkinTemperatures: Current device skin temperatures in Celsius.
1560	SkinTemperatures []float64 `json:"skinTemperatures,omitempty"`
1561
1562	// ForceSendFields is a list of field names (e.g. "BatteryTemperatures")
1563	// to unconditionally include in API requests. By default, fields with
1564	// empty values are omitted from API requests. However, any non-pointer,
1565	// non-interface field appearing in ForceSendFields will be sent to the
1566	// server regardless of whether the field is empty or not. This may be
1567	// used to include empty fields in Patch requests.
1568	ForceSendFields []string `json:"-"`
1569
1570	// NullFields is a list of field names (e.g. "BatteryTemperatures") to
1571	// include in API requests with the JSON null value. By default, fields
1572	// with empty values are omitted from API requests. However, any field
1573	// with an empty value appearing in NullFields will be sent to the
1574	// server as null. It is an error if a field in this list has a
1575	// non-empty value. This may be used to include null fields in Patch
1576	// requests.
1577	NullFields []string `json:"-"`
1578}
1579
1580func (s *HardwareStatus) MarshalJSON() ([]byte, error) {
1581	type NoMethod HardwareStatus
1582	raw := NoMethod(*s)
1583	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1584}
1585
1586// KeyedAppState: Keyed app state reported by the app.
1587type KeyedAppState struct {
1588	// CreateTime: The creation time of the app state on the device.
1589	CreateTime string `json:"createTime,omitempty"`
1590
1591	// Data: Optionally, a machine-readable value to be read by the EMM. For
1592	// example, setting values that the admin can choose to query against in
1593	// the EMM console (e.g. “notify me if the battery_warning data <
1594	// 10”).
1595	Data string `json:"data,omitempty"`
1596
1597	// Key: The key for the app state. Acts as a point of reference for what
1598	// the app is providing state for. For example, when providing managed
1599	// configuration feedback, this key could be the managed configuration
1600	// key.
1601	Key string `json:"key,omitempty"`
1602
1603	// LastUpdateTime: The time the app state was most recently updated.
1604	LastUpdateTime string `json:"lastUpdateTime,omitempty"`
1605
1606	// Message: Optionally, a free-form message string to explain the app
1607	// state. If the state was triggered by a particular value (e.g. a
1608	// managed configuration value), it should be included in the message.
1609	Message string `json:"message,omitempty"`
1610
1611	// Severity: The severity of the app state.
1612	//
1613	// Possible values:
1614	//   "SEVERITY_UNSPECIFIED" - Unspecified severity level.
1615	//   "INFO" - Information severity level.
1616	//   "ERROR" - Error severity level. This should only be set for genuine
1617	// error conditions that a management organization needs to take action
1618	// to fix.
1619	Severity string `json:"severity,omitempty"`
1620
1621	// ForceSendFields is a list of field names (e.g. "CreateTime") to
1622	// unconditionally include in API requests. By default, fields with
1623	// empty values are omitted from API requests. However, any non-pointer,
1624	// non-interface field appearing in ForceSendFields will be sent to the
1625	// server regardless of whether the field is empty or not. This may be
1626	// used to include empty fields in Patch requests.
1627	ForceSendFields []string `json:"-"`
1628
1629	// NullFields is a list of field names (e.g. "CreateTime") to include in
1630	// API requests with the JSON null value. By default, fields with empty
1631	// values are omitted from API requests. However, any field with an
1632	// empty value appearing in NullFields will be sent to the server as
1633	// null. It is an error if a field in this list has a non-empty value.
1634	// This may be used to include null fields in Patch requests.
1635	NullFields []string `json:"-"`
1636}
1637
1638func (s *KeyedAppState) MarshalJSON() ([]byte, error) {
1639	type NoMethod KeyedAppState
1640	raw := NoMethod(*s)
1641	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1642}
1643
1644// LaunchAppAction: An action to launch an app.
1645type LaunchAppAction struct {
1646	// PackageName: Package name of app to be launched
1647	PackageName string `json:"packageName,omitempty"`
1648
1649	// ForceSendFields is a list of field names (e.g. "PackageName") to
1650	// unconditionally include in API requests. By default, fields with
1651	// empty values are omitted from API requests. However, any non-pointer,
1652	// non-interface field appearing in ForceSendFields will be sent to the
1653	// server regardless of whether the field is empty or not. This may be
1654	// used to include empty fields in Patch requests.
1655	ForceSendFields []string `json:"-"`
1656
1657	// NullFields is a list of field names (e.g. "PackageName") to include
1658	// in API requests with the JSON null value. By default, fields with
1659	// empty values are omitted from API requests. However, any field with
1660	// an empty value appearing in NullFields will be sent to the server as
1661	// null. It is an error if a field in this list has a non-empty value.
1662	// This may be used to include null fields in Patch requests.
1663	NullFields []string `json:"-"`
1664}
1665
1666func (s *LaunchAppAction) MarshalJSON() ([]byte, error) {
1667	type NoMethod LaunchAppAction
1668	raw := NoMethod(*s)
1669	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1670}
1671
1672// ListDevicesResponse: Response to a request to list devices for a
1673// given enterprise.
1674type ListDevicesResponse struct {
1675	// Devices: The list of devices.
1676	Devices []*Device `json:"devices,omitempty"`
1677
1678	// NextPageToken: If there are more results, a token to retrieve next
1679	// page of results.
1680	NextPageToken string `json:"nextPageToken,omitempty"`
1681
1682	// ServerResponse contains the HTTP response code and headers from the
1683	// server.
1684	googleapi.ServerResponse `json:"-"`
1685
1686	// ForceSendFields is a list of field names (e.g. "Devices") to
1687	// unconditionally include in API requests. By default, fields with
1688	// empty values are omitted from API requests. However, any non-pointer,
1689	// non-interface field appearing in ForceSendFields will be sent to the
1690	// server regardless of whether the field is empty or not. This may be
1691	// used to include empty fields in Patch requests.
1692	ForceSendFields []string `json:"-"`
1693
1694	// NullFields is a list of field names (e.g. "Devices") to include in
1695	// API requests with the JSON null value. By default, fields with empty
1696	// values are omitted from API requests. However, any field with an
1697	// empty value appearing in NullFields will be sent to the server as
1698	// null. It is an error if a field in this list has a non-empty value.
1699	// This may be used to include null fields in Patch requests.
1700	NullFields []string `json:"-"`
1701}
1702
1703func (s *ListDevicesResponse) MarshalJSON() ([]byte, error) {
1704	type NoMethod ListDevicesResponse
1705	raw := NoMethod(*s)
1706	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1707}
1708
1709// ListOperationsResponse: The response message for
1710// Operations.ListOperations.
1711type ListOperationsResponse struct {
1712	// NextPageToken: The standard List next-page token.
1713	NextPageToken string `json:"nextPageToken,omitempty"`
1714
1715	// Operations: A list of operations that matches the specified filter in
1716	// the request.
1717	Operations []*Operation `json:"operations,omitempty"`
1718
1719	// ServerResponse contains the HTTP response code and headers from the
1720	// server.
1721	googleapi.ServerResponse `json:"-"`
1722
1723	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1724	// unconditionally include in API requests. By default, fields with
1725	// empty values are omitted from API requests. However, any non-pointer,
1726	// non-interface field appearing in ForceSendFields will be sent to the
1727	// server regardless of whether the field is empty or not. This may be
1728	// used to include empty fields in Patch requests.
1729	ForceSendFields []string `json:"-"`
1730
1731	// NullFields is a list of field names (e.g. "NextPageToken") to include
1732	// in API requests with the JSON null value. By default, fields with
1733	// empty values are omitted from API requests. However, any field with
1734	// an empty value appearing in NullFields will be sent to the server as
1735	// null. It is an error if a field in this list has a non-empty value.
1736	// This may be used to include null fields in Patch requests.
1737	NullFields []string `json:"-"`
1738}
1739
1740func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
1741	type NoMethod ListOperationsResponse
1742	raw := NoMethod(*s)
1743	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1744}
1745
1746// ListPoliciesResponse: Response to a request to list policies for a
1747// given enterprise.
1748type ListPoliciesResponse struct {
1749	// NextPageToken: If there are more results, a token to retrieve next
1750	// page of results.
1751	NextPageToken string `json:"nextPageToken,omitempty"`
1752
1753	// Policies: The list of policies.
1754	Policies []*Policy `json:"policies,omitempty"`
1755
1756	// ServerResponse contains the HTTP response code and headers from the
1757	// server.
1758	googleapi.ServerResponse `json:"-"`
1759
1760	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1761	// unconditionally include in API requests. By default, fields with
1762	// empty values are omitted from API requests. However, any non-pointer,
1763	// non-interface field appearing in ForceSendFields will be sent to the
1764	// server regardless of whether the field is empty or not. This may be
1765	// used to include empty fields in Patch requests.
1766	ForceSendFields []string `json:"-"`
1767
1768	// NullFields is a list of field names (e.g. "NextPageToken") to include
1769	// in API requests with the JSON null value. By default, fields with
1770	// empty values are omitted from API requests. However, any field with
1771	// an empty value appearing in NullFields will be sent to the server as
1772	// null. It is an error if a field in this list has a non-empty value.
1773	// This may be used to include null fields in Patch requests.
1774	NullFields []string `json:"-"`
1775}
1776
1777func (s *ListPoliciesResponse) MarshalJSON() ([]byte, error) {
1778	type NoMethod ListPoliciesResponse
1779	raw := NoMethod(*s)
1780	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1781}
1782
1783// ListWebAppsResponse: Response to a request to list web apps for a
1784// given enterprise.
1785type ListWebAppsResponse struct {
1786	// NextPageToken: If there are more results, a token to retrieve next
1787	// page of results.
1788	NextPageToken string `json:"nextPageToken,omitempty"`
1789
1790	// WebApps: The list of web apps.
1791	WebApps []*WebApp `json:"webApps,omitempty"`
1792
1793	// ServerResponse contains the HTTP response code and headers from the
1794	// server.
1795	googleapi.ServerResponse `json:"-"`
1796
1797	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1798	// unconditionally include in API requests. By default, fields with
1799	// empty values are omitted from API requests. However, any non-pointer,
1800	// non-interface field appearing in ForceSendFields will be sent to the
1801	// server regardless of whether the field is empty or not. This may be
1802	// used to include empty fields in Patch requests.
1803	ForceSendFields []string `json:"-"`
1804
1805	// NullFields is a list of field names (e.g. "NextPageToken") to include
1806	// in API requests with the JSON null value. By default, fields with
1807	// empty values are omitted from API requests. However, any field with
1808	// an empty value appearing in NullFields will be sent to the server as
1809	// null. It is an error if a field in this list has a non-empty value.
1810	// This may be used to include null fields in Patch requests.
1811	NullFields []string `json:"-"`
1812}
1813
1814func (s *ListWebAppsResponse) MarshalJSON() ([]byte, error) {
1815	type NoMethod ListWebAppsResponse
1816	raw := NoMethod(*s)
1817	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1818}
1819
1820// ManagedConfigurationTemplate: The managed configurations template for
1821// the app, saved from the managed configurations iframe.
1822type ManagedConfigurationTemplate struct {
1823	// ConfigurationVariables: Optional, a map containing <key, value>
1824	// configuration variables defined for the configuration.
1825	ConfigurationVariables map[string]string `json:"configurationVariables,omitempty"`
1826
1827	// TemplateId: The ID of the managed configurations template.
1828	TemplateId string `json:"templateId,omitempty"`
1829
1830	// ForceSendFields is a list of field names (e.g.
1831	// "ConfigurationVariables") to unconditionally include in API requests.
1832	// By default, fields with empty values are omitted from API requests.
1833	// However, any non-pointer, non-interface field appearing in
1834	// ForceSendFields will be sent to the server regardless of whether the
1835	// field is empty or not. This may be used to include empty fields in
1836	// Patch requests.
1837	ForceSendFields []string `json:"-"`
1838
1839	// NullFields is a list of field names (e.g. "ConfigurationVariables")
1840	// to include in API requests with the JSON null value. By default,
1841	// fields with empty values are omitted from API requests. However, any
1842	// field with an empty value appearing in NullFields will be sent to the
1843	// server as null. It is an error if a field in this list has a
1844	// non-empty value. This may be used to include null fields in Patch
1845	// requests.
1846	NullFields []string `json:"-"`
1847}
1848
1849func (s *ManagedConfigurationTemplate) MarshalJSON() ([]byte, error) {
1850	type NoMethod ManagedConfigurationTemplate
1851	raw := NoMethod(*s)
1852	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1853}
1854
1855// ManagedProperty: Managed property.
1856type ManagedProperty struct {
1857	// DefaultValue: The default value of the property. BUNDLE_ARRAY
1858	// properties don't have a default value.
1859	DefaultValue interface{} `json:"defaultValue,omitempty"`
1860
1861	// Description: A longer description of the property, providing more
1862	// detail of what it affects. Localized.
1863	Description string `json:"description,omitempty"`
1864
1865	// Entries: For CHOICE or MULTISELECT properties, the list of possible
1866	// entries.
1867	Entries []*ManagedPropertyEntry `json:"entries,omitempty"`
1868
1869	// Key: The unique key that the app uses to identify the property, e.g.
1870	// "com.google.android.gm.fieldname".
1871	Key string `json:"key,omitempty"`
1872
1873	// NestedProperties: For BUNDLE_ARRAY properties, the list of nested
1874	// properties. A BUNDLE_ARRAY property is at most two levels deep.
1875	NestedProperties []*ManagedProperty `json:"nestedProperties,omitempty"`
1876
1877	// Title: The name of the property. Localized.
1878	Title string `json:"title,omitempty"`
1879
1880	// Type: The type of the property.
1881	//
1882	// Possible values:
1883	//   "MANAGED_PROPERTY_TYPE_UNSPECIFIED" - Not used.
1884	//   "BOOL" - A property of boolean type.
1885	//   "STRING" - A property of string type.
1886	//   "INTEGER" - A property of integer type.
1887	//   "CHOICE" - A choice of one item from a set.
1888	//   "MULTISELECT" - A choice of multiple items from a set.
1889	//   "HIDDEN" - A hidden restriction of string type (the default value
1890	// can be used to pass along information that can't be modified, such as
1891	// a version code).
1892	//   "BUNDLE" - A bundle of properties
1893	//   "BUNDLE_ARRAY" - An array of property bundles.
1894	Type string `json:"type,omitempty"`
1895
1896	// ForceSendFields is a list of field names (e.g. "DefaultValue") to
1897	// unconditionally include in API requests. By default, fields with
1898	// empty values are omitted from API requests. However, any non-pointer,
1899	// non-interface field appearing in ForceSendFields will be sent to the
1900	// server regardless of whether the field is empty or not. This may be
1901	// used to include empty fields in Patch requests.
1902	ForceSendFields []string `json:"-"`
1903
1904	// NullFields is a list of field names (e.g. "DefaultValue") to include
1905	// in API requests with the JSON null value. By default, fields with
1906	// empty values are omitted from API requests. However, any field with
1907	// an empty value appearing in NullFields will be sent to the server as
1908	// null. It is an error if a field in this list has a non-empty value.
1909	// This may be used to include null fields in Patch requests.
1910	NullFields []string `json:"-"`
1911}
1912
1913func (s *ManagedProperty) MarshalJSON() ([]byte, error) {
1914	type NoMethod ManagedProperty
1915	raw := NoMethod(*s)
1916	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1917}
1918
1919// ManagedPropertyEntry: An entry of a managed property.
1920type ManagedPropertyEntry struct {
1921	// Name: The human-readable name of the value. Localized.
1922	Name string `json:"name,omitempty"`
1923
1924	// Value: The machine-readable value of the entry, which should be used
1925	// in the configuration. Not localized.
1926	Value string `json:"value,omitempty"`
1927
1928	// ForceSendFields is a list of field names (e.g. "Name") to
1929	// unconditionally include in API requests. By default, fields with
1930	// empty values are omitted from API requests. However, any non-pointer,
1931	// non-interface field appearing in ForceSendFields will be sent to the
1932	// server regardless of whether the field is empty or not. This may be
1933	// used to include empty fields in Patch requests.
1934	ForceSendFields []string `json:"-"`
1935
1936	// NullFields is a list of field names (e.g. "Name") to include in API
1937	// requests with the JSON null value. By default, fields with empty
1938	// values are omitted from API requests. However, any field with an
1939	// empty value appearing in NullFields will be sent to the server as
1940	// null. It is an error if a field in this list has a non-empty value.
1941	// This may be used to include null fields in Patch requests.
1942	NullFields []string `json:"-"`
1943}
1944
1945func (s *ManagedPropertyEntry) MarshalJSON() ([]byte, error) {
1946	type NoMethod ManagedPropertyEntry
1947	raw := NoMethod(*s)
1948	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1949}
1950
1951// MemoryEvent: An event related to memory and storage measurements.
1952type MemoryEvent struct {
1953	// ByteCount: The number of free bytes in the medium, or for
1954	// EXTERNAL_STORAGE_DETECTED, the total capacity in bytes of the storage
1955	// medium.
1956	ByteCount int64 `json:"byteCount,omitempty,string"`
1957
1958	// CreateTime: The creation time of the event.
1959	CreateTime string `json:"createTime,omitempty"`
1960
1961	// EventType: Event type.
1962	//
1963	// Possible values:
1964	//   "MEMORY_EVENT_TYPE_UNSPECIFIED" - Unspecified. No events have this
1965	// type.
1966	//   "RAM_MEASURED" - Free space in RAM was measured.
1967	//   "INTERNAL_STORAGE_MEASURED" - Free space in internal storage was
1968	// measured.
1969	//   "EXTERNAL_STORAGE_DETECTED" - A new external storage medium was
1970	// detected. The reported byte count is the total capacity of the
1971	// storage medium.
1972	//   "EXTERNAL_STORAGE_REMOVED" - An external storage medium was
1973	// removed. The reported byte count is zero.
1974	//   "EXTERNAL_STORAGE_MEASURED" - Free space in an external storage
1975	// medium was measured.
1976	EventType string `json:"eventType,omitempty"`
1977
1978	// ForceSendFields is a list of field names (e.g. "ByteCount") to
1979	// unconditionally include in API requests. By default, fields with
1980	// empty values are omitted from API requests. However, any non-pointer,
1981	// non-interface field appearing in ForceSendFields will be sent to the
1982	// server regardless of whether the field is empty or not. This may be
1983	// used to include empty fields in Patch requests.
1984	ForceSendFields []string `json:"-"`
1985
1986	// NullFields is a list of field names (e.g. "ByteCount") to include in
1987	// API requests with the JSON null value. By default, fields with empty
1988	// values are omitted from API requests. However, any field with an
1989	// empty value appearing in NullFields will be sent to the server as
1990	// null. It is an error if a field in this list has a non-empty value.
1991	// This may be used to include null fields in Patch requests.
1992	NullFields []string `json:"-"`
1993}
1994
1995func (s *MemoryEvent) MarshalJSON() ([]byte, error) {
1996	type NoMethod MemoryEvent
1997	raw := NoMethod(*s)
1998	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1999}
2000
2001// MemoryInfo: Information about device memory and storage.
2002type MemoryInfo struct {
2003	// TotalInternalStorage: Total internal storage on device in bytes.
2004	TotalInternalStorage int64 `json:"totalInternalStorage,omitempty,string"`
2005
2006	// TotalRam: Total RAM on device in bytes.
2007	TotalRam int64 `json:"totalRam,omitempty,string"`
2008
2009	// ForceSendFields is a list of field names (e.g.
2010	// "TotalInternalStorage") to unconditionally include in API requests.
2011	// By default, fields with empty values are omitted from API requests.
2012	// However, any non-pointer, non-interface field appearing in
2013	// ForceSendFields will be sent to the server regardless of whether the
2014	// field is empty or not. This may be used to include empty fields in
2015	// Patch requests.
2016	ForceSendFields []string `json:"-"`
2017
2018	// NullFields is a list of field names (e.g. "TotalInternalStorage") to
2019	// include in API requests with the JSON null value. By default, fields
2020	// with empty values are omitted from API requests. However, any field
2021	// with an empty value appearing in NullFields will be sent to the
2022	// server as null. It is an error if a field in this list has a
2023	// non-empty value. This may be used to include null fields in Patch
2024	// requests.
2025	NullFields []string `json:"-"`
2026}
2027
2028func (s *MemoryInfo) MarshalJSON() ([]byte, error) {
2029	type NoMethod MemoryInfo
2030	raw := NoMethod(*s)
2031	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2032}
2033
2034// NetworkInfo: Device network info.
2035type NetworkInfo struct {
2036	// Imei: IMEI number of the GSM device. For example, A1000031212.
2037	Imei string `json:"imei,omitempty"`
2038
2039	// Meid: MEID number of the CDMA device. For example, A00000292788E1.
2040	Meid string `json:"meid,omitempty"`
2041
2042	// NetworkOperatorName: Alphabetic name of current registered operator.
2043	// For example, Vodafone.
2044	NetworkOperatorName string `json:"networkOperatorName,omitempty"`
2045
2046	// WifiMacAddress: Wi-Fi MAC address of the device. For example,
2047	// 7c:11:11:11:11:11.
2048	WifiMacAddress string `json:"wifiMacAddress,omitempty"`
2049
2050	// ForceSendFields is a list of field names (e.g. "Imei") to
2051	// unconditionally include in API requests. By default, fields with
2052	// empty values are omitted from API requests. However, any non-pointer,
2053	// non-interface field appearing in ForceSendFields will be sent to the
2054	// server regardless of whether the field is empty or not. This may be
2055	// used to include empty fields in Patch requests.
2056	ForceSendFields []string `json:"-"`
2057
2058	// NullFields is a list of field names (e.g. "Imei") to include in API
2059	// requests with the JSON null value. By default, fields with empty
2060	// values are omitted from API requests. However, any field with an
2061	// empty value appearing in NullFields will be sent to the server as
2062	// null. It is an error if a field in this list has a non-empty value.
2063	// This may be used to include null fields in Patch requests.
2064	NullFields []string `json:"-"`
2065}
2066
2067func (s *NetworkInfo) MarshalJSON() ([]byte, error) {
2068	type NoMethod NetworkInfo
2069	raw := NoMethod(*s)
2070	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2071}
2072
2073// NonComplianceDetail: Provides detail about non-compliance with a
2074// policy setting.
2075type NonComplianceDetail struct {
2076	// CurrentValue: If the policy setting could not be applied, the current
2077	// value of the setting on the device.
2078	CurrentValue interface{} `json:"currentValue,omitempty"`
2079
2080	// FieldPath: For settings with nested fields, if a particular nested
2081	// field is out of compliance, this specifies the full path to the
2082	// offending field. The path is formatted in the same way the policy
2083	// JSON field would be referenced in JavaScript, that is: 1) For
2084	// object-typed fields, the field name is followed by a dot then by a
2085	// subfield name. 2) For array-typed fields, the field name is followed
2086	// by the array index  enclosed in brackets. For example, to indicate a
2087	// problem with the url field in the externalData field in the 3rd
2088	// application, the path would be applications[2].externalData.url
2089	FieldPath string `json:"fieldPath,omitempty"`
2090
2091	// InstallationFailureReason: If package_name is set and the
2092	// non-compliance reason is APP_NOT_INSTALLED or APP_NOT_UPDATED, the
2093	// detailed reason the app can't be installed or updated.
2094	//
2095	// Possible values:
2096	//   "INSTALLATION_FAILURE_REASON_UNSPECIFIED" - This value is
2097	// disallowed.
2098	//   "INSTALLATION_FAILURE_REASON_UNKNOWN" - An unknown condition is
2099	// preventing the app from being installed. Some potential reasons are
2100	// that the device doesn't have enough storage, the device network
2101	// connection is unreliable, or the installation is taking longer than
2102	// expected. The installation will be retried automatically.
2103	//   "IN_PROGRESS" - The installation is still in progress.
2104	//   "NOT_FOUND" - The app was not found in Play.
2105	//   "NOT_COMPATIBLE_WITH_DEVICE" - The app is incompatible with the
2106	// device.
2107	//   "NOT_APPROVED" - The app has not been approved by the admin.
2108	//   "PERMISSIONS_NOT_ACCEPTED" - The app has new permissions that have
2109	// not been accepted by the admin.
2110	//   "NOT_AVAILABLE_IN_COUNTRY" - The app is not available in the user's
2111	// country.
2112	//   "NO_LICENSES_REMAINING" - There are no licenses available to assign
2113	// to the user.
2114	//   "NOT_ENROLLED" - The enterprise is no longer enrolled with managed
2115	// Play or the admin has not accepted the latest managed Play terms of
2116	// service.
2117	//   "USER_INVALID" - The user is no longer valid. The user may have
2118	// been deleted or disabled.
2119	InstallationFailureReason string `json:"installationFailureReason,omitempty"`
2120
2121	// NonComplianceReason: The reason the device is not in compliance with
2122	// the setting.
2123	//
2124	// Possible values:
2125	//   "NON_COMPLIANCE_REASON_UNSPECIFIED" - This value is disallowed.
2126	//   "API_LEVEL" - The setting is not supported in the API level of the
2127	// Android version running on the device.
2128	//   "MANAGEMENT_MODE" - The management mode (profile owner, device
2129	// owner, etc.) doesn't support the setting.
2130	//   "USER_ACTION" - The user has not taken required action to comply
2131	// with the setting.
2132	//   "INVALID_VALUE" - The setting has an invalid value.
2133	//   "APP_NOT_INSTALLED" - The app required to implement the policy is
2134	// not installed.
2135	//   "UNSUPPORTED" - The policy is not supported by the version of
2136	// Android Device Policy on the device.
2137	//   "APP_INSTALLED" - A blocked app is installed.
2138	//   "PENDING" - The setting hasn't been applied at the time of the
2139	// report, but is expected to be applied shortly.
2140	//   "APP_INCOMPATIBLE" - The setting can't be applied to the app
2141	// because the app doesn't support it, for example because its target
2142	// SDK version is not high enough.
2143	//   "APP_NOT_UPDATED" - The app is installed, but it hasn't been
2144	// updated to the minimum version code specified by policy.
2145	NonComplianceReason string `json:"nonComplianceReason,omitempty"`
2146
2147	// PackageName: The package name indicating which app is out of
2148	// compliance, if applicable.
2149	PackageName string `json:"packageName,omitempty"`
2150
2151	// SettingName: The name of the policy setting. This is the JSON field
2152	// name of a top-level Policy  field.
2153	SettingName string `json:"settingName,omitempty"`
2154
2155	// ForceSendFields is a list of field names (e.g. "CurrentValue") to
2156	// unconditionally include in API requests. By default, fields with
2157	// empty values are omitted from API requests. However, any non-pointer,
2158	// non-interface field appearing in ForceSendFields will be sent to the
2159	// server regardless of whether the field is empty or not. This may be
2160	// used to include empty fields in Patch requests.
2161	ForceSendFields []string `json:"-"`
2162
2163	// NullFields is a list of field names (e.g. "CurrentValue") to include
2164	// in API requests with the JSON null value. By default, fields with
2165	// empty values are omitted from API requests. However, any field with
2166	// an empty value appearing in NullFields will be sent to the server as
2167	// null. It is an error if a field in this list has a non-empty value.
2168	// This may be used to include null fields in Patch requests.
2169	NullFields []string `json:"-"`
2170}
2171
2172func (s *NonComplianceDetail) MarshalJSON() ([]byte, error) {
2173	type NoMethod NonComplianceDetail
2174	raw := NoMethod(*s)
2175	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2176}
2177
2178// NonComplianceDetailCondition: A compliance rule condition which is
2179// satisfied if there exists any matching NonComplianceDetail for the
2180// device. A NonComplianceDetail matches a NonComplianceDetailCondition
2181// if all the fields which are set within the
2182// NonComplianceDetailCondition match the corresponding
2183// NonComplianceDetail fields.
2184type NonComplianceDetailCondition struct {
2185	// NonComplianceReason: The reason the device is not in compliance with
2186	// the setting. If not set, then this condition matches any reason.
2187	//
2188	// Possible values:
2189	//   "NON_COMPLIANCE_REASON_UNSPECIFIED" - This value is disallowed.
2190	//   "API_LEVEL" - The setting is not supported in the API level of the
2191	// Android version running on the device.
2192	//   "MANAGEMENT_MODE" - The management mode (profile owner, device
2193	// owner, etc.) doesn't support the setting.
2194	//   "USER_ACTION" - The user has not taken required action to comply
2195	// with the setting.
2196	//   "INVALID_VALUE" - The setting has an invalid value.
2197	//   "APP_NOT_INSTALLED" - The app required to implement the policy is
2198	// not installed.
2199	//   "UNSUPPORTED" - The policy is not supported by the version of
2200	// Android Device Policy on the device.
2201	//   "APP_INSTALLED" - A blocked app is installed.
2202	//   "PENDING" - The setting hasn't been applied at the time of the
2203	// report, but is expected to be applied shortly.
2204	//   "APP_INCOMPATIBLE" - The setting can't be applied to the app
2205	// because the app doesn't support it, for example because its target
2206	// SDK version is not high enough.
2207	//   "APP_NOT_UPDATED" - The app is installed, but it hasn't been
2208	// updated to the minimum version code specified by policy.
2209	NonComplianceReason string `json:"nonComplianceReason,omitempty"`
2210
2211	// PackageName: The package name of the app that's out of compliance. If
2212	// not set, then this condition matches any package name.
2213	PackageName string `json:"packageName,omitempty"`
2214
2215	// SettingName: The name of the policy setting. This is the JSON field
2216	// name of a top-level Policy field. If not set, then this condition
2217	// matches any setting name.
2218	SettingName string `json:"settingName,omitempty"`
2219
2220	// ForceSendFields is a list of field names (e.g. "NonComplianceReason")
2221	// to unconditionally include in API requests. By default, fields with
2222	// empty values are omitted from API requests. However, any non-pointer,
2223	// non-interface field appearing in ForceSendFields will be sent to the
2224	// server regardless of whether the field is empty or not. This may be
2225	// used to include empty fields in Patch requests.
2226	ForceSendFields []string `json:"-"`
2227
2228	// NullFields is a list of field names (e.g. "NonComplianceReason") to
2229	// include in API requests with the JSON null value. By default, fields
2230	// with empty values are omitted from API requests. However, any field
2231	// with an empty value appearing in NullFields will be sent to the
2232	// server as null. It is an error if a field in this list has a
2233	// non-empty value. This may be used to include null fields in Patch
2234	// requests.
2235	NullFields []string `json:"-"`
2236}
2237
2238func (s *NonComplianceDetailCondition) MarshalJSON() ([]byte, error) {
2239	type NoMethod NonComplianceDetailCondition
2240	raw := NoMethod(*s)
2241	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2242}
2243
2244// Operation: This resource represents a long-running operation that is
2245// the result of a network API call.
2246type Operation struct {
2247	// Done: If the value is false, it means the operation is still in
2248	// progress. If true, the operation is completed, and either error or
2249	// response is available.
2250	Done bool `json:"done,omitempty"`
2251
2252	// Error: The error result of the operation in case of failure or
2253	// cancellation.
2254	Error *Status `json:"error,omitempty"`
2255
2256	// Metadata: Service-specific metadata associated with the operation. It
2257	// typically contains progress information and common metadata such as
2258	// create time. Some services might not provide such metadata. Any
2259	// method that returns a long-running operation should document the
2260	// metadata type, if any.
2261	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2262
2263	// Name: The server-assigned name, which is only unique within the same
2264	// service that originally returns it. If you use the default HTTP
2265	// mapping, the name should be a resource name ending with
2266	// operations/{unique_id}.
2267	Name string `json:"name,omitempty"`
2268
2269	// Response: The normal response of the operation in case of success. If
2270	// the original method returns no data on success, such as Delete, the
2271	// response is google.protobuf.Empty. If the original method is standard
2272	// Get/Create/Update, the response should be the resource. For other
2273	// methods, the response should have the type XxxResponse, where Xxx is
2274	// the original method name. For example, if the original method name is
2275	// TakeSnapshot(), the inferred response type is TakeSnapshotResponse.
2276	Response googleapi.RawMessage `json:"response,omitempty"`
2277
2278	// ServerResponse contains the HTTP response code and headers from the
2279	// server.
2280	googleapi.ServerResponse `json:"-"`
2281
2282	// ForceSendFields is a list of field names (e.g. "Done") to
2283	// unconditionally include in API requests. By default, fields with
2284	// empty values are omitted from API requests. However, any non-pointer,
2285	// non-interface field appearing in ForceSendFields will be sent to the
2286	// server regardless of whether the field is empty or not. This may be
2287	// used to include empty fields in Patch requests.
2288	ForceSendFields []string `json:"-"`
2289
2290	// NullFields is a list of field names (e.g. "Done") to include in API
2291	// requests with the JSON null value. By default, fields with empty
2292	// values are omitted from API requests. However, any field with an
2293	// empty value appearing in NullFields will be sent to the server as
2294	// null. It is an error if a field in this list has a non-empty value.
2295	// This may be used to include null fields in Patch requests.
2296	NullFields []string `json:"-"`
2297}
2298
2299func (s *Operation) MarshalJSON() ([]byte, error) {
2300	type NoMethod Operation
2301	raw := NoMethod(*s)
2302	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2303}
2304
2305// PackageNameList: A list of package names.
2306type PackageNameList struct {
2307	// PackageNames: A list of package names.
2308	PackageNames []string `json:"packageNames,omitempty"`
2309
2310	// ForceSendFields is a list of field names (e.g. "PackageNames") to
2311	// unconditionally include in API requests. By default, fields with
2312	// empty values are omitted from API requests. However, any non-pointer,
2313	// non-interface field appearing in ForceSendFields will be sent to the
2314	// server regardless of whether the field is empty or not. This may be
2315	// used to include empty fields in Patch requests.
2316	ForceSendFields []string `json:"-"`
2317
2318	// NullFields is a list of field names (e.g. "PackageNames") to include
2319	// in API requests with the JSON null value. By default, fields with
2320	// empty values are omitted from API requests. However, any field with
2321	// an empty value appearing in NullFields will be sent to the server as
2322	// null. It is an error if a field in this list has a non-empty value.
2323	// This may be used to include null fields in Patch requests.
2324	NullFields []string `json:"-"`
2325}
2326
2327func (s *PackageNameList) MarshalJSON() ([]byte, error) {
2328	type NoMethod PackageNameList
2329	raw := NoMethod(*s)
2330	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2331}
2332
2333// PasswordRequirements: Requirements for the password used to unlock a
2334// device.
2335type PasswordRequirements struct {
2336	// MaximumFailedPasswordsForWipe: Number of incorrect device-unlock
2337	// passwords that can be entered before a device is wiped. A value of 0
2338	// means there is no restriction.
2339	MaximumFailedPasswordsForWipe int64 `json:"maximumFailedPasswordsForWipe,omitempty"`
2340
2341	// PasswordExpirationTimeout: Password expiration timeout.
2342	PasswordExpirationTimeout string `json:"passwordExpirationTimeout,omitempty"`
2343
2344	// PasswordHistoryLength: The length of the password history. After
2345	// setting this field, the user won't be able to enter a new password
2346	// that is the same as any password in the history. A value of 0 means
2347	// there is no restriction.
2348	PasswordHistoryLength int64 `json:"passwordHistoryLength,omitempty"`
2349
2350	// PasswordMinimumLength: The minimum allowed password length. A value
2351	// of 0 means there is no restriction. Only enforced when
2352	// password_quality is NUMERIC, NUMERIC_COMPLEX, ALPHABETIC,
2353	// ALPHANUMERIC, or COMPLEX.
2354	PasswordMinimumLength int64 `json:"passwordMinimumLength,omitempty"`
2355
2356	// PasswordMinimumLetters: Minimum number of letters required in the
2357	// password. Only enforced when password_quality is COMPLEX.
2358	PasswordMinimumLetters int64 `json:"passwordMinimumLetters,omitempty"`
2359
2360	// PasswordMinimumLowerCase: Minimum number of lower case letters
2361	// required in the password. Only enforced when password_quality is
2362	// COMPLEX.
2363	PasswordMinimumLowerCase int64 `json:"passwordMinimumLowerCase,omitempty"`
2364
2365	// PasswordMinimumNonLetter: Minimum number of non-letter characters
2366	// (numerical digits or symbols) required in the password. Only enforced
2367	// when password_quality is COMPLEX.
2368	PasswordMinimumNonLetter int64 `json:"passwordMinimumNonLetter,omitempty"`
2369
2370	// PasswordMinimumNumeric: Minimum number of numerical digits required
2371	// in the password. Only enforced when password_quality is COMPLEX.
2372	PasswordMinimumNumeric int64 `json:"passwordMinimumNumeric,omitempty"`
2373
2374	// PasswordMinimumSymbols: Minimum number of symbols required in the
2375	// password. Only enforced when password_quality is COMPLEX.
2376	PasswordMinimumSymbols int64 `json:"passwordMinimumSymbols,omitempty"`
2377
2378	// PasswordMinimumUpperCase: Minimum number of upper case letters
2379	// required in the password. Only enforced when password_quality is
2380	// COMPLEX.
2381	PasswordMinimumUpperCase int64 `json:"passwordMinimumUpperCase,omitempty"`
2382
2383	// PasswordQuality: The required password quality.
2384	//
2385	// Possible values:
2386	//   "PASSWORD_QUALITY_UNSPECIFIED" - There are no password
2387	// requirements.
2388	//   "BIOMETRIC_WEAK" - The device must be secured with a low-security
2389	// biometric recognition technology, at minimum. This includes
2390	// technologies that can recognize the identity of an individual that
2391	// are roughly equivalent to a 3-digit PIN (false detection is less than
2392	// 1 in 1,000).
2393	//   "SOMETHING" - A password is required, but there are no restrictions
2394	// on what the password must contain.
2395	//   "NUMERIC" - The password must contain numeric characters.
2396	//   "NUMERIC_COMPLEX" - The password must contain numeric characters
2397	// with no repeating (4444) or ordered (1234, 4321, 2468) sequences.
2398	//   "ALPHABETIC" - The password must contain alphabetic (or symbol)
2399	// characters.
2400	//   "ALPHANUMERIC" - The password must contain both numeric and
2401	// alphabetic (or symbol) characters.
2402	//   "COMPLEX" - The password must meet the minimum requirements
2403	// specified in passwordMinimumLength, passwordMinimumLetters,
2404	// passwordMinimumSymbols, etc. For example, if passwordMinimumSymbols
2405	// is 2, the password must contain at least two symbols.
2406	PasswordQuality string `json:"passwordQuality,omitempty"`
2407
2408	// PasswordScope: The scope that the password requirement applies to.
2409	//
2410	// Possible values:
2411	//   "SCOPE_UNSPECIFIED" - The scope is unspecified. The password
2412	// requirements are applied to the work profile for work profile devices
2413	// and the whole device for fully managed or dedicated devices.
2414	//   "SCOPE_DEVICE" - The password requirements are only applied to the
2415	// device.
2416	//   "SCOPE_PROFILE" - The password requirements are only applied to the
2417	// work profile.
2418	PasswordScope string `json:"passwordScope,omitempty"`
2419
2420	// ForceSendFields is a list of field names (e.g.
2421	// "MaximumFailedPasswordsForWipe") to unconditionally include in API
2422	// requests. By default, fields with empty values are omitted from API
2423	// requests. However, any non-pointer, non-interface field appearing in
2424	// ForceSendFields will be sent to the server regardless of whether the
2425	// field is empty or not. This may be used to include empty fields in
2426	// Patch requests.
2427	ForceSendFields []string `json:"-"`
2428
2429	// NullFields is a list of field names (e.g.
2430	// "MaximumFailedPasswordsForWipe") to include in API requests with the
2431	// JSON null value. By default, fields with empty values are omitted
2432	// from API requests. However, any field with an empty value appearing
2433	// in NullFields will be sent to the server as null. It is an error if a
2434	// field in this list has a non-empty value. This may be used to include
2435	// null fields in Patch requests.
2436	NullFields []string `json:"-"`
2437}
2438
2439func (s *PasswordRequirements) MarshalJSON() ([]byte, error) {
2440	type NoMethod PasswordRequirements
2441	raw := NoMethod(*s)
2442	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2443}
2444
2445// PermissionGrant: Configuration for an Android permission and its
2446// grant state.
2447type PermissionGrant struct {
2448	// Permission: The Android permission or group, e.g.
2449	// android.permission.READ_CALENDAR or
2450	// android.permission_group.CALENDAR.
2451	Permission string `json:"permission,omitempty"`
2452
2453	// Policy: The policy for granting the permission.
2454	//
2455	// Possible values:
2456	//   "PERMISSION_POLICY_UNSPECIFIED" - Policy not specified. If no
2457	// policy is specified for a permission at any level, then the PROMPT
2458	// behavior is used by default.
2459	//   "PROMPT" - Prompt the user to grant a permission.
2460	//   "GRANT" - Automatically grant a permission.
2461	//   "DENY" - Automatically deny a permission.
2462	Policy string `json:"policy,omitempty"`
2463
2464	// ForceSendFields is a list of field names (e.g. "Permission") to
2465	// unconditionally include in API requests. By default, fields with
2466	// empty values are omitted from API requests. However, any non-pointer,
2467	// non-interface field appearing in ForceSendFields will be sent to the
2468	// server regardless of whether the field is empty or not. This may be
2469	// used to include empty fields in Patch requests.
2470	ForceSendFields []string `json:"-"`
2471
2472	// NullFields is a list of field names (e.g. "Permission") to include in
2473	// API requests with the JSON null value. By default, fields with empty
2474	// values are omitted from API requests. However, any field with an
2475	// empty value appearing in NullFields will be sent to the server as
2476	// null. It is an error if a field in this list has a non-empty value.
2477	// This may be used to include null fields in Patch requests.
2478	NullFields []string `json:"-"`
2479}
2480
2481func (s *PermissionGrant) MarshalJSON() ([]byte, error) {
2482	type NoMethod PermissionGrant
2483	raw := NoMethod(*s)
2484	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2485}
2486
2487// PersistentPreferredActivity: A default activity for handling intents
2488// that match a particular intent filter. Note: To set up a kiosk, use
2489// InstallType to KIOSK rather than use persistent preferred activities.
2490type PersistentPreferredActivity struct {
2491	// Actions: The intent actions to match in the filter. If any actions
2492	// are included in the filter, then an intent's action must be one of
2493	// those values for it to match. If no actions are included, the intent
2494	// action is ignored.
2495	Actions []string `json:"actions,omitempty"`
2496
2497	// Categories: The intent categories to match in the filter. An intent
2498	// includes the categories that it requires, all of which must be
2499	// included in the filter in order to match. In other words, adding a
2500	// category to the filter has no impact on matching unless that category
2501	// is specified in the intent.
2502	Categories []string `json:"categories,omitempty"`
2503
2504	// ReceiverActivity: The activity that should be the default intent
2505	// handler. This should be an Android component name, e.g.
2506	// com.android.enterprise.app/.MainActivity. Alternatively, the value
2507	// may be the package name of an app, which causes Android Device Policy
2508	// to choose an appropriate activity from the app to handle the intent.
2509	ReceiverActivity string `json:"receiverActivity,omitempty"`
2510
2511	// ForceSendFields is a list of field names (e.g. "Actions") to
2512	// unconditionally include in API requests. By default, fields with
2513	// empty values are omitted from API requests. However, any non-pointer,
2514	// non-interface field appearing in ForceSendFields will be sent to the
2515	// server regardless of whether the field is empty or not. This may be
2516	// used to include empty fields in Patch requests.
2517	ForceSendFields []string `json:"-"`
2518
2519	// NullFields is a list of field names (e.g. "Actions") to include in
2520	// API requests with the JSON null value. By default, fields with empty
2521	// values are omitted from API requests. However, any field with an
2522	// empty value appearing in NullFields will be sent to the server as
2523	// null. It is an error if a field in this list has a non-empty value.
2524	// This may be used to include null fields in Patch requests.
2525	NullFields []string `json:"-"`
2526}
2527
2528func (s *PersistentPreferredActivity) MarshalJSON() ([]byte, error) {
2529	type NoMethod PersistentPreferredActivity
2530	raw := NoMethod(*s)
2531	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2532}
2533
2534// Policy: A policy resource represents a group of settings that govern
2535// the behavior of a managed device and the apps installed on it.
2536type Policy struct {
2537	// AccountTypesWithManagementDisabled: Account types that can't be
2538	// managed by the user.
2539	AccountTypesWithManagementDisabled []string `json:"accountTypesWithManagementDisabled,omitempty"`
2540
2541	// AddUserDisabled: Whether adding new users and profiles is disabled.
2542	AddUserDisabled bool `json:"addUserDisabled,omitempty"`
2543
2544	// AdjustVolumeDisabled: Whether adjusting the master volume is
2545	// disabled.
2546	AdjustVolumeDisabled bool `json:"adjustVolumeDisabled,omitempty"`
2547
2548	// AlwaysOnVpnPackage: Configuration for an always-on VPN connection.
2549	// Use with vpn_config_disabled to prevent modification of this setting.
2550	AlwaysOnVpnPackage *AlwaysOnVpnPackage `json:"alwaysOnVpnPackage,omitempty"`
2551
2552	// AndroidDevicePolicyTracks: The app tracks for Android Device Policy
2553	// the device can access. The device receives the latest version among
2554	// all accessible tracks. If no tracks are specified, then the device
2555	// only uses the production track.
2556	//
2557	// Possible values:
2558	//   "APP_TRACK_UNSPECIFIED" - This value is ignored.
2559	//   "PRODUCTION" - The production track, which provides the latest
2560	// stable release.
2561	//   "BETA" - The beta track, which provides the latest beta release.
2562	AndroidDevicePolicyTracks []string `json:"androidDevicePolicyTracks,omitempty"`
2563
2564	// AppAutoUpdatePolicy: The app auto update policy, which controls when
2565	// automatic app updates can be applied.
2566	//
2567	// Possible values:
2568	//   "APP_AUTO_UPDATE_POLICY_UNSPECIFIED" - The auto-update policy is
2569	// not set. Equivalent to CHOICE_TO_THE_USER.
2570	//   "CHOICE_TO_THE_USER" - The user can control auto-updates.
2571	//   "NEVER" - Apps are never auto-updated.
2572	//   "WIFI_ONLY" - Apps are auto-updated over Wi-Fi only.
2573	//   "ALWAYS" - Apps are auto-updated at any time. Data charges may
2574	// apply.
2575	AppAutoUpdatePolicy string `json:"appAutoUpdatePolicy,omitempty"`
2576
2577	// Applications: Policy applied to apps.
2578	Applications []*ApplicationPolicy `json:"applications,omitempty"`
2579
2580	// AutoTimeRequired: Whether auto time is required, which prevents the
2581	// user from manually setting the date and time.
2582	AutoTimeRequired bool `json:"autoTimeRequired,omitempty"`
2583
2584	// BlockApplicationsEnabled: Whether applications other than the ones
2585	// configured in applications are blocked from being installed. When
2586	// set, applications that were installed under a previous policy but no
2587	// longer appear in the policy are automatically uninstalled.
2588	BlockApplicationsEnabled bool `json:"blockApplicationsEnabled,omitempty"`
2589
2590	// BluetoothConfigDisabled: Whether configuring bluetooth is disabled.
2591	BluetoothConfigDisabled bool `json:"bluetoothConfigDisabled,omitempty"`
2592
2593	// BluetoothContactSharingDisabled: Whether bluetooth contact sharing is
2594	// disabled.
2595	BluetoothContactSharingDisabled bool `json:"bluetoothContactSharingDisabled,omitempty"`
2596
2597	// BluetoothDisabled: Whether bluetooth is disabled. Prefer this setting
2598	// over bluetooth_config_disabled because bluetooth_config_disabled can
2599	// be bypassed by the user.
2600	BluetoothDisabled bool `json:"bluetoothDisabled,omitempty"`
2601
2602	// CameraDisabled: Whether all cameras on the device are disabled.
2603	CameraDisabled bool `json:"cameraDisabled,omitempty"`
2604
2605	// CellBroadcastsConfigDisabled: Whether configuring cell broadcast is
2606	// disabled.
2607	CellBroadcastsConfigDisabled bool `json:"cellBroadcastsConfigDisabled,omitempty"`
2608
2609	// ChoosePrivateKeyRules: Rules for automatically choosing a private key
2610	// and certificate to authenticate the device to a server. The rules are
2611	// ordered by increasing precedence, so if an outgoing request matches
2612	// more than one rule, the last rule defines which private key to use.
2613	ChoosePrivateKeyRules []*ChoosePrivateKeyRule `json:"choosePrivateKeyRules,omitempty"`
2614
2615	// ComplianceRules: Rules declaring which mitigating actions to take
2616	// when a device is not compliant with its policy. When the conditions
2617	// for multiple rules are satisfied, all of the mitigating actions for
2618	// the rules are taken. There is a maximum limit of 100 rules. Use
2619	// policy enforcement rules instead.
2620	ComplianceRules []*ComplianceRule `json:"complianceRules,omitempty"`
2621
2622	// CreateWindowsDisabled: Whether creating windows besides app windows
2623	// is disabled.
2624	CreateWindowsDisabled bool `json:"createWindowsDisabled,omitempty"`
2625
2626	// CredentialsConfigDisabled: Whether configuring user credentials is
2627	// disabled.
2628	CredentialsConfigDisabled bool `json:"credentialsConfigDisabled,omitempty"`
2629
2630	// DataRoamingDisabled: Whether roaming data services are disabled.
2631	DataRoamingDisabled bool `json:"dataRoamingDisabled,omitempty"`
2632
2633	// DebuggingFeaturesAllowed: Whether the user is allowed to enable
2634	// debugging features.
2635	DebuggingFeaturesAllowed bool `json:"debuggingFeaturesAllowed,omitempty"`
2636
2637	// DefaultPermissionPolicy: The default permission policy for runtime
2638	// permission requests.
2639	//
2640	// Possible values:
2641	//   "PERMISSION_POLICY_UNSPECIFIED" - Policy not specified. If no
2642	// policy is specified for a permission at any level, then the PROMPT
2643	// behavior is used by default.
2644	//   "PROMPT" - Prompt the user to grant a permission.
2645	//   "GRANT" - Automatically grant a permission.
2646	//   "DENY" - Automatically deny a permission.
2647	DefaultPermissionPolicy string `json:"defaultPermissionPolicy,omitempty"`
2648
2649	// DeviceOwnerLockScreenInfo: The device owner information to be shown
2650	// on the lock screen.
2651	DeviceOwnerLockScreenInfo *UserFacingMessage `json:"deviceOwnerLockScreenInfo,omitempty"`
2652
2653	// EncryptionPolicy: Whether encryption is enabled
2654	//
2655	// Possible values:
2656	//   "ENCRYPTION_POLICY_UNSPECIFIED" - This value is ignored, i.e. no
2657	// encryption required
2658	//   "ENABLED_WITHOUT_PASSWORD" - Encryption required but no password
2659	// required to boot
2660	//   "ENABLED_WITH_PASSWORD" - Encryption required with password
2661	// required to boot
2662	EncryptionPolicy string `json:"encryptionPolicy,omitempty"`
2663
2664	// EnsureVerifyAppsEnabled: Whether app verification is force-enabled.
2665	EnsureVerifyAppsEnabled bool `json:"ensureVerifyAppsEnabled,omitempty"`
2666
2667	// FactoryResetDisabled: Whether factory resetting from settings is
2668	// disabled.
2669	FactoryResetDisabled bool `json:"factoryResetDisabled,omitempty"`
2670
2671	// FrpAdminEmails: Email addresses of device administrators for factory
2672	// reset protection. When the device is factory reset, it will require
2673	// one of these admins to log in with the Google account email and
2674	// password to unlock the device. If no admins are specified, the device
2675	// won't provide factory reset protection.
2676	FrpAdminEmails []string `json:"frpAdminEmails,omitempty"`
2677
2678	// FunDisabled: Whether the user is allowed to have fun. Controls
2679	// whether the Easter egg game in Settings is disabled.
2680	FunDisabled bool `json:"funDisabled,omitempty"`
2681
2682	// InstallAppsDisabled: Whether user installation of apps is disabled.
2683	InstallAppsDisabled bool `json:"installAppsDisabled,omitempty"`
2684
2685	// InstallUnknownSourcesAllowed: Whether the user is allowed to enable
2686	// the "Unknown Sources" setting, which allows installation of apps from
2687	// unknown sources.
2688	InstallUnknownSourcesAllowed bool `json:"installUnknownSourcesAllowed,omitempty"`
2689
2690	// KeyguardDisabled: Whether the keyguard is disabled.
2691	KeyguardDisabled bool `json:"keyguardDisabled,omitempty"`
2692
2693	// KeyguardDisabledFeatures: Disabled keyguard customizations, such as
2694	// widgets.
2695	//
2696	// Possible values:
2697	//   "KEYGUARD_DISABLED_FEATURE_UNSPECIFIED" - This value is ignored.
2698	//   "CAMERA" - Disable the camera on secure keyguard screens (e.g.
2699	// PIN).
2700	//   "NOTIFICATIONS" - Disable showing all notifications on secure
2701	// keyguard screens.
2702	//   "UNREDACTED_NOTIFICATIONS" - Disable unredacted notifications on
2703	// secure keyguard screens.
2704	//   "TRUST_AGENTS" - Ignore trust agent state on secure keyguard
2705	// screens.
2706	//   "DISABLE_FINGERPRINT" - Disable fingerprint sensor on secure
2707	// keyguard screens.
2708	//   "DISABLE_REMOTE_INPUT" - Disable text entry into notifications on
2709	// secure keyguard screens.
2710	//   "FACE" - Disable face authentication on secure keyguard screens.
2711	//   "IRIS" - Disable iris authentication on secure keyguard screens.
2712	//   "BIOMETRICS" - Disable all biometric authentication on secure
2713	// keyguard screens.
2714	//   "ALL_FEATURES" - Disable all current and future keyguard
2715	// customizations.
2716	KeyguardDisabledFeatures []string `json:"keyguardDisabledFeatures,omitempty"`
2717
2718	// KioskCustomLauncherEnabled: Whether the kiosk custom launcher is
2719	// enabled. This replaces the home screen with a launcher that locks
2720	// down the device to the apps installed via the applications setting.
2721	// Apps appear on a single page in alphabetical order. The status bar is
2722	// disabled when this is set.
2723	KioskCustomLauncherEnabled bool `json:"kioskCustomLauncherEnabled,omitempty"`
2724
2725	// LocationMode: The degree of location detection enabled. The user may
2726	// change the value unless the user is otherwise blocked from accessing
2727	// device settings.
2728	//
2729	// Possible values:
2730	//   "LOCATION_MODE_UNSPECIFIED" - The current device value is not
2731	// modified.
2732	//   "HIGH_ACCURACY" - All location detection methods are enabled,
2733	// including GPS, networks, and other sensors.
2734	//   "SENSORS_ONLY" - Only GPS and other sensors are enabled.
2735	//   "BATTERY_SAVING" - Only the network location provider is enabled.
2736	//   "OFF" - Location detection is disabled.
2737	LocationMode string `json:"locationMode,omitempty"`
2738
2739	// LongSupportMessage: A message displayed to the user in the device
2740	// administators settings screen.
2741	LongSupportMessage *UserFacingMessage `json:"longSupportMessage,omitempty"`
2742
2743	// MaximumTimeToLock: Maximum time in milliseconds for user activity
2744	// until the device locks. A value of 0 means there is no restriction.
2745	MaximumTimeToLock int64 `json:"maximumTimeToLock,omitempty,string"`
2746
2747	// MinimumApiLevel: The minimum allowed Android API level.
2748	MinimumApiLevel int64 `json:"minimumApiLevel,omitempty"`
2749
2750	// MobileNetworksConfigDisabled: Whether configuring mobile networks is
2751	// disabled.
2752	MobileNetworksConfigDisabled bool `json:"mobileNetworksConfigDisabled,omitempty"`
2753
2754	// ModifyAccountsDisabled: Whether adding or removing accounts is
2755	// disabled.
2756	ModifyAccountsDisabled bool `json:"modifyAccountsDisabled,omitempty"`
2757
2758	// MountPhysicalMediaDisabled: Whether the user mounting physical
2759	// external media is disabled.
2760	MountPhysicalMediaDisabled bool `json:"mountPhysicalMediaDisabled,omitempty"`
2761
2762	// Name: The name of the policy in the form
2763	// enterprises/{enterpriseId}/policies/{policyId}.
2764	Name string `json:"name,omitempty"`
2765
2766	// NetworkEscapeHatchEnabled: Whether the network escape hatch is
2767	// enabled. If a network connection can't be made at boot time, the
2768	// escape hatch prompts the user to temporarily connect to a network in
2769	// order to refresh the device policy. After applying policy, the
2770	// temporary network will be forgotten and the device will continue
2771	// booting. This prevents being unable to connect to a network if there
2772	// is no suitable network in the last policy and the device boots into
2773	// an app in lock task mode, or the user is otherwise unable to reach
2774	// device settings.
2775	NetworkEscapeHatchEnabled bool `json:"networkEscapeHatchEnabled,omitempty"`
2776
2777	// NetworkResetDisabled: Whether resetting network settings is disabled.
2778	NetworkResetDisabled bool `json:"networkResetDisabled,omitempty"`
2779
2780	// OpenNetworkConfiguration: Network configuration for the device. See
2781	// configure networks for more information.
2782	OpenNetworkConfiguration googleapi.RawMessage `json:"openNetworkConfiguration,omitempty"`
2783
2784	// OutgoingBeamDisabled: Whether using NFC to beam data from apps is
2785	// disabled.
2786	OutgoingBeamDisabled bool `json:"outgoingBeamDisabled,omitempty"`
2787
2788	// OutgoingCallsDisabled: Whether outgoing calls are disabled.
2789	OutgoingCallsDisabled bool `json:"outgoingCallsDisabled,omitempty"`
2790
2791	// PasswordPolicies: Password requirement policies. Different policies
2792	// can be set for work profile or fully managed devices by setting the
2793	// password_scope field in the policy.
2794	PasswordPolicies []*PasswordRequirements `json:"passwordPolicies,omitempty"`
2795
2796	// PasswordRequirements: Password requirements. The field
2797	// password_requirements.require_password_unlock must not be set.
2798	// DEPRECATED - Use password_policies.
2799	PasswordRequirements *PasswordRequirements `json:"passwordRequirements,omitempty"`
2800
2801	// PermissionGrants: Explicit permission or group grants or denials for
2802	// all apps. These values override the default_permission_policy.
2803	PermissionGrants []*PermissionGrant `json:"permissionGrants,omitempty"`
2804
2805	// PermittedAccessibilityServices: Specifies permitted accessibility
2806	// services. If the field is not set, any accessibility service can be
2807	// used. If the field is set, only the accessibility services in this
2808	// list and the system's built-in accessibility service can be used. In
2809	// particular, if the field is set to empty, only the system's built-in
2810	// accessibility servicess can be used.
2811	PermittedAccessibilityServices *PackageNameList `json:"permittedAccessibilityServices,omitempty"`
2812
2813	// PermittedInputMethods: If present, only the input methods provided by
2814	// packages in this list are permitted. If this field is present, but
2815	// the list is empty, then only system input methods are permitted.
2816	PermittedInputMethods *PackageNameList `json:"permittedInputMethods,omitempty"`
2817
2818	// PersistentPreferredActivities: Default intent handler activities.
2819	PersistentPreferredActivities []*PersistentPreferredActivity `json:"persistentPreferredActivities,omitempty"`
2820
2821	// PlayStoreMode: This mode controls which apps are available to the
2822	// user in the Play Store and the behavior on the device when apps are
2823	// removed from the policy.
2824	//
2825	// Possible values:
2826	//   "PLAY_STORE_MODE_UNSPECIFIED" - Unspecified. Defaults to WHITELIST.
2827	//   "WHITELIST" - Only apps that are in the policy are available and
2828	// any app not in the policy will be automatically uninstalled from the
2829	// device.
2830	//   "BLACKLIST" - All apps are available and any app that should not be
2831	// on the device should be explicitly marked as 'BLOCKED' in the
2832	// applications policy.
2833	PlayStoreMode string `json:"playStoreMode,omitempty"`
2834
2835	// PolicyEnforcementRules: Rules that define the behavior when a
2836	// particular policy can not be applied on device
2837	PolicyEnforcementRules []*PolicyEnforcementRule `json:"policyEnforcementRules,omitempty"`
2838
2839	// PrivateKeySelectionEnabled: Allows showing UI on a device for a user
2840	// to choose a private key alias if there are no matching rules in
2841	// ChoosePrivateKeyRules. For devices below Android P, setting this may
2842	// leave enterprise keys vulnerable.
2843	PrivateKeySelectionEnabled bool `json:"privateKeySelectionEnabled,omitempty"`
2844
2845	// RecommendedGlobalProxy: The network-independent global HTTP proxy.
2846	// Typically proxies should be configured per-network in
2847	// open_network_configuration. However for unusual configurations like
2848	// general internal filtering a global HTTP proxy may be useful. If the
2849	// proxy is not accessible, network access may break. The global proxy
2850	// is only a recommendation and some apps may ignore it.
2851	RecommendedGlobalProxy *ProxyInfo `json:"recommendedGlobalProxy,omitempty"`
2852
2853	// RemoveUserDisabled: Whether removing other users is disabled.
2854	RemoveUserDisabled bool `json:"removeUserDisabled,omitempty"`
2855
2856	// SafeBootDisabled: Whether rebooting the device into safe boot is
2857	// disabled.
2858	SafeBootDisabled bool `json:"safeBootDisabled,omitempty"`
2859
2860	// ScreenCaptureDisabled: Whether screen capture is disabled.
2861	ScreenCaptureDisabled bool `json:"screenCaptureDisabled,omitempty"`
2862
2863	// SetUserIconDisabled: Whether changing the user icon is disabled.
2864	SetUserIconDisabled bool `json:"setUserIconDisabled,omitempty"`
2865
2866	// SetWallpaperDisabled: Whether changing the wallpaper is disabled.
2867	SetWallpaperDisabled bool `json:"setWallpaperDisabled,omitempty"`
2868
2869	// SetupActions: Actions to take during the setup process.
2870	SetupActions []*SetupAction `json:"setupActions,omitempty"`
2871
2872	// ShareLocationDisabled: Whether location sharing is disabled.
2873	ShareLocationDisabled bool `json:"shareLocationDisabled,omitempty"`
2874
2875	// ShortSupportMessage: A message displayed to the user in the settings
2876	// screen wherever functionality has been disabled by the admin.
2877	ShortSupportMessage *UserFacingMessage `json:"shortSupportMessage,omitempty"`
2878
2879	// SkipFirstUseHintsEnabled: Flag to skip hints on the first use.
2880	// Enterprise admin can enable the system recommendation for apps to
2881	// skip their user tutorial and other introductory hints on first
2882	// start-up.
2883	SkipFirstUseHintsEnabled bool `json:"skipFirstUseHintsEnabled,omitempty"`
2884
2885	// SmsDisabled: Whether sending and receiving SMS messages is disabled.
2886	SmsDisabled bool `json:"smsDisabled,omitempty"`
2887
2888	// StatusBarDisabled: Whether the status bar is disabled. This disables
2889	// notifications, quick settings, and other screen overlays that allow
2890	// escape from full-screen mode. DEPRECATED. To disable the status bar
2891	// on a kiosk device, use InstallType KIOSK or
2892	// kioskCustomLauncherEnabled.
2893	StatusBarDisabled bool `json:"statusBarDisabled,omitempty"`
2894
2895	// StatusReportingSettings: Status reporting settings
2896	StatusReportingSettings *StatusReportingSettings `json:"statusReportingSettings,omitempty"`
2897
2898	// StayOnPluggedModes: The battery plugged in modes for which the device
2899	// stays on. When using this setting, it is recommended to clear
2900	// maximum_time_to_lock so that the device doesn't lock itself while it
2901	// stays on.
2902	//
2903	// Possible values:
2904	//   "BATTERY_PLUGGED_MODE_UNSPECIFIED" - This value is ignored.
2905	//   "AC" - Power source is an AC charger.
2906	//   "USB" - Power source is a USB port.
2907	//   "WIRELESS" - Power source is wireless.
2908	StayOnPluggedModes []string `json:"stayOnPluggedModes,omitempty"`
2909
2910	// SystemUpdate: The system update policy, which controls how OS updates
2911	// are applied. If the update type is WINDOWED, the update window will
2912	// automatically apply to Play app updates as well.
2913	SystemUpdate *SystemUpdate `json:"systemUpdate,omitempty"`
2914
2915	// TetheringConfigDisabled: Whether configuring tethering and portable
2916	// hotspots is disabled.
2917	TetheringConfigDisabled bool `json:"tetheringConfigDisabled,omitempty"`
2918
2919	// UninstallAppsDisabled: Whether user uninstallation of applications is
2920	// disabled.
2921	UninstallAppsDisabled bool `json:"uninstallAppsDisabled,omitempty"`
2922
2923	// UnmuteMicrophoneDisabled: Whether the microphone is muted and
2924	// adjusting microphone volume is disabled.
2925	UnmuteMicrophoneDisabled bool `json:"unmuteMicrophoneDisabled,omitempty"`
2926
2927	// UsbFileTransferDisabled: Whether transferring files over USB is
2928	// disabled.
2929	UsbFileTransferDisabled bool `json:"usbFileTransferDisabled,omitempty"`
2930
2931	// UsbMassStorageEnabled: Whether USB storage is enabled. Deprecated.
2932	UsbMassStorageEnabled bool `json:"usbMassStorageEnabled,omitempty"`
2933
2934	// Version: The version of the policy. This is a read-only field. The
2935	// version is incremented each time the policy is updated.
2936	Version int64 `json:"version,omitempty,string"`
2937
2938	// VpnConfigDisabled: Whether configuring VPN is disabled.
2939	VpnConfigDisabled bool `json:"vpnConfigDisabled,omitempty"`
2940
2941	// WifiConfigDisabled: Whether configuring Wi-Fi access points is
2942	// disabled.
2943	WifiConfigDisabled bool `json:"wifiConfigDisabled,omitempty"`
2944
2945	// WifiConfigsLockdownEnabled: DEPRECATED - Use wifi_config_disabled.
2946	WifiConfigsLockdownEnabled bool `json:"wifiConfigsLockdownEnabled,omitempty"`
2947
2948	// ServerResponse contains the HTTP response code and headers from the
2949	// server.
2950	googleapi.ServerResponse `json:"-"`
2951
2952	// ForceSendFields is a list of field names (e.g.
2953	// "AccountTypesWithManagementDisabled") to unconditionally include in
2954	// API requests. By default, fields with empty values are omitted from
2955	// API requests. However, any non-pointer, non-interface field appearing
2956	// in ForceSendFields will be sent to the server regardless of whether
2957	// the field is empty or not. This may be used to include empty fields
2958	// in Patch requests.
2959	ForceSendFields []string `json:"-"`
2960
2961	// NullFields is a list of field names (e.g.
2962	// "AccountTypesWithManagementDisabled") to include in API requests with
2963	// the JSON null value. By default, fields with empty values are omitted
2964	// from API requests. However, any field with an empty value appearing
2965	// in NullFields will be sent to the server as null. It is an error if a
2966	// field in this list has a non-empty value. This may be used to include
2967	// null fields in Patch requests.
2968	NullFields []string `json:"-"`
2969}
2970
2971func (s *Policy) MarshalJSON() ([]byte, error) {
2972	type NoMethod Policy
2973	raw := NoMethod(*s)
2974	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2975}
2976
2977// PolicyEnforcementRule: A rule that defines the actions to take if a
2978// device or work profile is not compliant with the policy specified in
2979// settingName.
2980type PolicyEnforcementRule struct {
2981	// BlockAction: An action to block access to apps and data on a fully
2982	// managed device or in a work profile. This action also triggers a
2983	// user-facing notification with information (where possible) on how to
2984	// correct the compliance issue. Note: wipeAction must also be
2985	// specified.
2986	BlockAction *BlockAction `json:"blockAction,omitempty"`
2987
2988	// SettingName: The top-level policy to enforce. For example,
2989	// applications or passwordPolicies.
2990	SettingName string `json:"settingName,omitempty"`
2991
2992	// WipeAction: An action to reset a fully managed device or delete a
2993	// work profile. Note: blockAction must also be specified.
2994	WipeAction *WipeAction `json:"wipeAction,omitempty"`
2995
2996	// ForceSendFields is a list of field names (e.g. "BlockAction") to
2997	// unconditionally include in API requests. By default, fields with
2998	// empty values are omitted from API requests. However, any non-pointer,
2999	// non-interface field appearing in ForceSendFields will be sent to the
3000	// server regardless of whether the field is empty or not. This may be
3001	// used to include empty fields in Patch requests.
3002	ForceSendFields []string `json:"-"`
3003
3004	// NullFields is a list of field names (e.g. "BlockAction") to include
3005	// in API requests with the JSON null value. By default, fields with
3006	// empty values are omitted from API requests. However, any field with
3007	// an empty value appearing in NullFields will be sent to the server as
3008	// null. It is an error if a field in this list has a non-empty value.
3009	// This may be used to include null fields in Patch requests.
3010	NullFields []string `json:"-"`
3011}
3012
3013func (s *PolicyEnforcementRule) MarshalJSON() ([]byte, error) {
3014	type NoMethod PolicyEnforcementRule
3015	raw := NoMethod(*s)
3016	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3017}
3018
3019// PostureDetail: Additional details regarding the security posture of
3020// the device.
3021type PostureDetail struct {
3022	// Advice: Corresponding admin-facing advice to mitigate this security
3023	// risk and improve the security posture of the device.
3024	Advice []*UserFacingMessage `json:"advice,omitempty"`
3025
3026	// SecurityRisk: A specific security risk that negatively affects the
3027	// security posture of the device.
3028	//
3029	// Possible values:
3030	//   "SECURITY_RISK_UNSPECIFIED" - Unspecified.
3031	//   "UNKNOWN_OS" - SafetyNet detects that the device is running an
3032	// unknown OS (basicIntegrity check succeeds but ctsProfileMatch fails).
3033	//   "COMPROMISED_OS" - SafetyNet detects that the device is running a
3034	// compromised OS (basicIntegrity check fails).
3035	SecurityRisk string `json:"securityRisk,omitempty"`
3036
3037	// ForceSendFields is a list of field names (e.g. "Advice") to
3038	// unconditionally include in API requests. By default, fields with
3039	// empty values are omitted from API requests. However, any non-pointer,
3040	// non-interface field appearing in ForceSendFields will be sent to the
3041	// server regardless of whether the field is empty or not. This may be
3042	// used to include empty fields in Patch requests.
3043	ForceSendFields []string `json:"-"`
3044
3045	// NullFields is a list of field names (e.g. "Advice") to include in API
3046	// requests with the JSON null value. By default, fields with empty
3047	// values are omitted from API requests. However, any field with an
3048	// empty value appearing in NullFields will be sent to the server as
3049	// null. It is an error if a field in this list has a non-empty value.
3050	// This may be used to include null fields in Patch requests.
3051	NullFields []string `json:"-"`
3052}
3053
3054func (s *PostureDetail) MarshalJSON() ([]byte, error) {
3055	type NoMethod PostureDetail
3056	raw := NoMethod(*s)
3057	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3058}
3059
3060// PowerManagementEvent: A power management event.
3061type PowerManagementEvent struct {
3062	// BatteryLevel: For BATTERY_LEVEL_COLLECTED events, the battery level
3063	// as a percentage.
3064	BatteryLevel float64 `json:"batteryLevel,omitempty"`
3065
3066	// CreateTime: The creation time of the event.
3067	CreateTime string `json:"createTime,omitempty"`
3068
3069	// EventType: Event type.
3070	//
3071	// Possible values:
3072	//   "POWER_MANAGEMENT_EVENT_TYPE_UNSPECIFIED" - Unspecified. No events
3073	// have this type.
3074	//   "BATTERY_LEVEL_COLLECTED" - Battery level was measured.
3075	//   "POWER_CONNECTED" - The device started charging.
3076	//   "POWER_DISCONNECTED" - The device stopped charging.
3077	//   "BATTERY_LOW" - The device entered low-power mode.
3078	//   "BATTERY_OKAY" - The device exited low-power mode.
3079	//   "BOOT_COMPLETED" - The device booted.
3080	//   "SHUTDOWN" - The device shut down.
3081	EventType string `json:"eventType,omitempty"`
3082
3083	// ForceSendFields is a list of field names (e.g. "BatteryLevel") to
3084	// unconditionally include in API requests. By default, fields with
3085	// empty values are omitted from API requests. However, any non-pointer,
3086	// non-interface field appearing in ForceSendFields will be sent to the
3087	// server regardless of whether the field is empty or not. This may be
3088	// used to include empty fields in Patch requests.
3089	ForceSendFields []string `json:"-"`
3090
3091	// NullFields is a list of field names (e.g. "BatteryLevel") to include
3092	// in API requests with the JSON null value. By default, fields with
3093	// empty values are omitted from API requests. However, any field with
3094	// an empty value appearing in NullFields will be sent to the server as
3095	// null. It is an error if a field in this list has a non-empty value.
3096	// This may be used to include null fields in Patch requests.
3097	NullFields []string `json:"-"`
3098}
3099
3100func (s *PowerManagementEvent) MarshalJSON() ([]byte, error) {
3101	type NoMethod PowerManagementEvent
3102	raw := NoMethod(*s)
3103	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3104}
3105
3106func (s *PowerManagementEvent) UnmarshalJSON(data []byte) error {
3107	type NoMethod PowerManagementEvent
3108	var s1 struct {
3109		BatteryLevel gensupport.JSONFloat64 `json:"batteryLevel"`
3110		*NoMethod
3111	}
3112	s1.NoMethod = (*NoMethod)(s)
3113	if err := json.Unmarshal(data, &s1); err != nil {
3114		return err
3115	}
3116	s.BatteryLevel = float64(s1.BatteryLevel)
3117	return nil
3118}
3119
3120// ProxyInfo: Configuration info for an HTTP proxy. For a direct proxy,
3121// set the host, port, and excluded_hosts fields. For a PAC script
3122// proxy, set the pac_uri field.
3123type ProxyInfo struct {
3124	// ExcludedHosts: For a direct proxy, the hosts for which the proxy is
3125	// bypassed. The host names may contain wildcards such as *.example.com.
3126	ExcludedHosts []string `json:"excludedHosts,omitempty"`
3127
3128	// Host: The host of the direct proxy.
3129	Host string `json:"host,omitempty"`
3130
3131	// PacUri: The URI of the PAC script used to configure the proxy.
3132	PacUri string `json:"pacUri,omitempty"`
3133
3134	// Port: The port of the direct proxy.
3135	Port int64 `json:"port,omitempty"`
3136
3137	// ForceSendFields is a list of field names (e.g. "ExcludedHosts") to
3138	// unconditionally include in API requests. By default, fields with
3139	// empty values are omitted from API requests. However, any non-pointer,
3140	// non-interface field appearing in ForceSendFields will be sent to the
3141	// server regardless of whether the field is empty or not. This may be
3142	// used to include empty fields in Patch requests.
3143	ForceSendFields []string `json:"-"`
3144
3145	// NullFields is a list of field names (e.g. "ExcludedHosts") to include
3146	// in API requests with the JSON null value. By default, fields with
3147	// empty values are omitted from API requests. However, any field with
3148	// an empty value appearing in NullFields will be sent to the server as
3149	// null. It is an error if a field in this list has a non-empty value.
3150	// This may be used to include null fields in Patch requests.
3151	NullFields []string `json:"-"`
3152}
3153
3154func (s *ProxyInfo) MarshalJSON() ([]byte, error) {
3155	type NoMethod ProxyInfo
3156	raw := NoMethod(*s)
3157	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3158}
3159
3160// SecurityPosture: The security posture of the device, as determined by
3161// the current device state and the policies applied.
3162type SecurityPosture struct {
3163	// DevicePosture: Device's security posture value.
3164	//
3165	// Possible values:
3166	//   "POSTURE_UNSPECIFIED" - Unspecified. There is no posture detail for
3167	// this posture value.
3168	//   "SECURE" - This device is secure.
3169	//   "AT_RISK" - This device may be more vulnerable to malicious actors
3170	// than is recommended for use with corporate data.
3171	//   "POTENTIALLY_COMPROMISED" - This device may be compromised and
3172	// corporate data may be accessible to unauthorized actors.
3173	DevicePosture string `json:"devicePosture,omitempty"`
3174
3175	// PostureDetails: Additional details regarding the security posture of
3176	// the device.
3177	PostureDetails []*PostureDetail `json:"postureDetails,omitempty"`
3178
3179	// ForceSendFields is a list of field names (e.g. "DevicePosture") to
3180	// unconditionally include in API requests. By default, fields with
3181	// empty values are omitted from API requests. However, any non-pointer,
3182	// non-interface field appearing in ForceSendFields will be sent to the
3183	// server regardless of whether the field is empty or not. This may be
3184	// used to include empty fields in Patch requests.
3185	ForceSendFields []string `json:"-"`
3186
3187	// NullFields is a list of field names (e.g. "DevicePosture") to include
3188	// in API requests with the JSON null value. By default, fields with
3189	// empty values are omitted from API requests. However, any field with
3190	// an empty value appearing in NullFields will be sent to the server as
3191	// null. It is an error if a field in this list has a non-empty value.
3192	// This may be used to include null fields in Patch requests.
3193	NullFields []string `json:"-"`
3194}
3195
3196func (s *SecurityPosture) MarshalJSON() ([]byte, error) {
3197	type NoMethod SecurityPosture
3198	raw := NoMethod(*s)
3199	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3200}
3201
3202// SetupAction: An action executed during setup.
3203type SetupAction struct {
3204	// Description: Description of this action.
3205	Description *UserFacingMessage `json:"description,omitempty"`
3206
3207	// LaunchApp: An action to launch an app.
3208	LaunchApp *LaunchAppAction `json:"launchApp,omitempty"`
3209
3210	// Title: Title of this action.
3211	Title *UserFacingMessage `json:"title,omitempty"`
3212
3213	// ForceSendFields is a list of field names (e.g. "Description") to
3214	// unconditionally include in API requests. By default, fields with
3215	// empty values are omitted from API requests. However, any non-pointer,
3216	// non-interface field appearing in ForceSendFields will be sent to the
3217	// server regardless of whether the field is empty or not. This may be
3218	// used to include empty fields in Patch requests.
3219	ForceSendFields []string `json:"-"`
3220
3221	// NullFields is a list of field names (e.g. "Description") to include
3222	// in API requests with the JSON null value. By default, fields with
3223	// empty values are omitted from API requests. However, any field with
3224	// an empty value appearing in NullFields will be sent to the server as
3225	// null. It is an error if a field in this list has a non-empty value.
3226	// This may be used to include null fields in Patch requests.
3227	NullFields []string `json:"-"`
3228}
3229
3230func (s *SetupAction) MarshalJSON() ([]byte, error) {
3231	type NoMethod SetupAction
3232	raw := NoMethod(*s)
3233	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3234}
3235
3236// SigninDetail: A resource containing sign in details for an
3237// enterprise.
3238type SigninDetail struct {
3239	// QrCode: A JSON string whose UTF-8 representation can be used to
3240	// generate a QR code to enroll a device with this enrollment token. To
3241	// enroll a device using NFC, the NFC record must contain a serialized
3242	// java.util.Properties representation of the properties in the JSON.
3243	// This is a read-only field generated by the server.
3244	QrCode string `json:"qrCode,omitempty"`
3245
3246	// SigninEnrollmentToken: An enterprise wide enrollment token used to
3247	// trigger custom sign-in flow. This is a read-only field generated by
3248	// the server.
3249	SigninEnrollmentToken string `json:"signinEnrollmentToken,omitempty"`
3250
3251	// SigninUrl: Sign-in URL for authentication when device is provisioned
3252	// with a sign-in enrollment token. The sign-in endpoint should finish
3253	// authentication flow with a URL in the form of
3254	// https://enterprise.google.com/android/enroll?et=<token> for a
3255	// successful login, or
3256	// https://enterprise.google.com/android/enroll/invalid for a failed
3257	// login.
3258	SigninUrl string `json:"signinUrl,omitempty"`
3259
3260	// ForceSendFields is a list of field names (e.g. "QrCode") to
3261	// unconditionally include in API requests. By default, fields with
3262	// empty values are omitted from API requests. However, any non-pointer,
3263	// non-interface field appearing in ForceSendFields will be sent to the
3264	// server regardless of whether the field is empty or not. This may be
3265	// used to include empty fields in Patch requests.
3266	ForceSendFields []string `json:"-"`
3267
3268	// NullFields is a list of field names (e.g. "QrCode") to include in API
3269	// requests with the JSON null value. By default, fields with empty
3270	// values are omitted from API requests. However, any field with an
3271	// empty value appearing in NullFields will be sent to the server as
3272	// null. It is an error if a field in this list has a non-empty value.
3273	// This may be used to include null fields in Patch requests.
3274	NullFields []string `json:"-"`
3275}
3276
3277func (s *SigninDetail) MarshalJSON() ([]byte, error) {
3278	type NoMethod SigninDetail
3279	raw := NoMethod(*s)
3280	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3281}
3282
3283// SignupUrl: An enterprise signup URL.
3284type SignupUrl struct {
3285	// Name: The name of the resource. Use this value in the signupUrl field
3286	// when calling enterprises.create to complete the enterprise signup
3287	// flow.
3288	Name string `json:"name,omitempty"`
3289
3290	// Url: A URL where an enterprise admin can register their enterprise.
3291	// The page can't be rendered in an iframe.
3292	Url string `json:"url,omitempty"`
3293
3294	// ServerResponse contains the HTTP response code and headers from the
3295	// server.
3296	googleapi.ServerResponse `json:"-"`
3297
3298	// ForceSendFields is a list of field names (e.g. "Name") to
3299	// unconditionally include in API requests. By default, fields with
3300	// empty values are omitted from API requests. However, any non-pointer,
3301	// non-interface field appearing in ForceSendFields will be sent to the
3302	// server regardless of whether the field is empty or not. This may be
3303	// used to include empty fields in Patch requests.
3304	ForceSendFields []string `json:"-"`
3305
3306	// NullFields is a list of field names (e.g. "Name") to include in API
3307	// requests with the JSON null value. By default, fields with empty
3308	// values are omitted from API requests. However, any field with an
3309	// empty value appearing in NullFields will be sent to the server as
3310	// null. It is an error if a field in this list has a non-empty value.
3311	// This may be used to include null fields in Patch requests.
3312	NullFields []string `json:"-"`
3313}
3314
3315func (s *SignupUrl) MarshalJSON() ([]byte, error) {
3316	type NoMethod SignupUrl
3317	raw := NoMethod(*s)
3318	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3319}
3320
3321// SoftwareInfo: Information about device software.
3322type SoftwareInfo struct {
3323	// AndroidBuildNumber: Android build ID string meant for displaying to
3324	// the user. For example, shamu-userdebug 6.0.1 MOB30I 2756745 dev-keys.
3325	AndroidBuildNumber string `json:"androidBuildNumber,omitempty"`
3326
3327	// AndroidBuildTime: Build time.
3328	AndroidBuildTime string `json:"androidBuildTime,omitempty"`
3329
3330	// AndroidDevicePolicyVersionCode: The Android Device Policy app version
3331	// code.
3332	AndroidDevicePolicyVersionCode int64 `json:"androidDevicePolicyVersionCode,omitempty"`
3333
3334	// AndroidDevicePolicyVersionName: The Android Device Policy app version
3335	// as displayed to the user.
3336	AndroidDevicePolicyVersionName string `json:"androidDevicePolicyVersionName,omitempty"`
3337
3338	// AndroidVersion: The user-visible Android version string. For example,
3339	// 6.0.1.
3340	AndroidVersion string `json:"androidVersion,omitempty"`
3341
3342	// BootloaderVersion: The system bootloader version number, e.g. 0.6.7.
3343	BootloaderVersion string `json:"bootloaderVersion,omitempty"`
3344
3345	// DeviceBuildSignature: SHA-256 hash of android.content.pm.Signature
3346	// (https://developer.android.com/reference/android/content/pm/Signature.
3347	// html) associated with the system package, which can be used to verify
3348	// that the system build hasn't been modified.
3349	DeviceBuildSignature string `json:"deviceBuildSignature,omitempty"`
3350
3351	// DeviceKernelVersion: Kernel version, for example, 2.6.32.9-g103d848.
3352	DeviceKernelVersion string `json:"deviceKernelVersion,omitempty"`
3353
3354	// PrimaryLanguageCode: An IETF BCP 47 language code for the primary
3355	// locale on the device.
3356	PrimaryLanguageCode string `json:"primaryLanguageCode,omitempty"`
3357
3358	// SecurityPatchLevel: Security patch level, e.g. 2016-05-01.
3359	SecurityPatchLevel string `json:"securityPatchLevel,omitempty"`
3360
3361	// ForceSendFields is a list of field names (e.g. "AndroidBuildNumber")
3362	// to unconditionally include in API requests. By default, fields with
3363	// empty values are omitted from API requests. However, any non-pointer,
3364	// non-interface field appearing in ForceSendFields will be sent to the
3365	// server regardless of whether the field is empty or not. This may be
3366	// used to include empty fields in Patch requests.
3367	ForceSendFields []string `json:"-"`
3368
3369	// NullFields is a list of field names (e.g. "AndroidBuildNumber") to
3370	// include in API requests with the JSON null value. By default, fields
3371	// with empty values are omitted from API requests. However, any field
3372	// with an empty value appearing in NullFields will be sent to the
3373	// server as null. It is an error if a field in this list has a
3374	// non-empty value. This may be used to include null fields in Patch
3375	// requests.
3376	NullFields []string `json:"-"`
3377}
3378
3379func (s *SoftwareInfo) MarshalJSON() ([]byte, error) {
3380	type NoMethod SoftwareInfo
3381	raw := NoMethod(*s)
3382	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3383}
3384
3385// Status: The Status type defines a logical error model that is
3386// suitable for different programming environments, including REST APIs
3387// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
3388// Status message contains three pieces of data: error code, error
3389// message, and error details.You can find out more about this error
3390// model and how to work with it in the API Design Guide
3391// (https://cloud.google.com/apis/design/errors).
3392type Status struct {
3393	// Code: The status code, which should be an enum value of
3394	// google.rpc.Code.
3395	Code int64 `json:"code,omitempty"`
3396
3397	// Details: A list of messages that carry the error details. There is a
3398	// common set of message types for APIs to use.
3399	Details []googleapi.RawMessage `json:"details,omitempty"`
3400
3401	// Message: A developer-facing error message, which should be in
3402	// English. Any user-facing error message should be localized and sent
3403	// in the google.rpc.Status.details field, or localized by the client.
3404	Message string `json:"message,omitempty"`
3405
3406	// ForceSendFields is a list of field names (e.g. "Code") to
3407	// unconditionally include in API requests. By default, fields with
3408	// empty values are omitted from API requests. However, any non-pointer,
3409	// non-interface field appearing in ForceSendFields will be sent to the
3410	// server regardless of whether the field is empty or not. This may be
3411	// used to include empty fields in Patch requests.
3412	ForceSendFields []string `json:"-"`
3413
3414	// NullFields is a list of field names (e.g. "Code") to include in API
3415	// requests with the JSON null value. By default, fields with empty
3416	// values are omitted from API requests. However, any field with an
3417	// empty value appearing in NullFields will be sent to the server as
3418	// null. It is an error if a field in this list has a non-empty value.
3419	// This may be used to include null fields in Patch requests.
3420	NullFields []string `json:"-"`
3421}
3422
3423func (s *Status) MarshalJSON() ([]byte, error) {
3424	type NoMethod Status
3425	raw := NoMethod(*s)
3426	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3427}
3428
3429// StatusReportingSettings: Settings controlling the behavior of status
3430// reports.
3431type StatusReportingSettings struct {
3432	// ApplicationReportingSettings: Application reporting settings. Only
3433	// applicable if application_reports_enabled is true.
3434	ApplicationReportingSettings *ApplicationReportingSettings `json:"applicationReportingSettings,omitempty"`
3435
3436	// ApplicationReportsEnabled: Whether app reports are enabled.
3437	ApplicationReportsEnabled bool `json:"applicationReportsEnabled,omitempty"`
3438
3439	// DeviceSettingsEnabled: Whether device settings reporting is enabled.
3440	DeviceSettingsEnabled bool `json:"deviceSettingsEnabled,omitempty"`
3441
3442	// DisplayInfoEnabled: Whether displays reporting is enabled.
3443	DisplayInfoEnabled bool `json:"displayInfoEnabled,omitempty"`
3444
3445	// HardwareStatusEnabled: Whether hardware status reporting is enabled.
3446	HardwareStatusEnabled bool `json:"hardwareStatusEnabled,omitempty"`
3447
3448	// MemoryInfoEnabled: Whether memory reporting is enabled.
3449	MemoryInfoEnabled bool `json:"memoryInfoEnabled,omitempty"`
3450
3451	// NetworkInfoEnabled: Whether network info reporting is enabled.
3452	NetworkInfoEnabled bool `json:"networkInfoEnabled,omitempty"`
3453
3454	// PowerManagementEventsEnabled: Whether power management event
3455	// reporting is enabled.
3456	PowerManagementEventsEnabled bool `json:"powerManagementEventsEnabled,omitempty"`
3457
3458	// SoftwareInfoEnabled: Whether software info reporting is enabled.
3459	SoftwareInfoEnabled bool `json:"softwareInfoEnabled,omitempty"`
3460
3461	// SystemPropertiesEnabled: Whether system properties reporting is
3462	// enabled.
3463	SystemPropertiesEnabled bool `json:"systemPropertiesEnabled,omitempty"`
3464
3465	// ForceSendFields is a list of field names (e.g.
3466	// "ApplicationReportingSettings") to unconditionally include in API
3467	// requests. By default, fields with empty values are omitted from API
3468	// requests. However, any non-pointer, non-interface field appearing in
3469	// ForceSendFields will be sent to the server regardless of whether the
3470	// field is empty or not. This may be used to include empty fields in
3471	// Patch requests.
3472	ForceSendFields []string `json:"-"`
3473
3474	// NullFields is a list of field names (e.g.
3475	// "ApplicationReportingSettings") to include in API requests with the
3476	// JSON null value. By default, fields with empty values are omitted
3477	// from API requests. However, any field with an empty value appearing
3478	// in NullFields will be sent to the server as null. It is an error if a
3479	// field in this list has a non-empty value. This may be used to include
3480	// null fields in Patch requests.
3481	NullFields []string `json:"-"`
3482}
3483
3484func (s *StatusReportingSettings) MarshalJSON() ([]byte, error) {
3485	type NoMethod StatusReportingSettings
3486	raw := NoMethod(*s)
3487	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3488}
3489
3490// SystemUpdate: Configuration for managing system updates
3491type SystemUpdate struct {
3492	// EndMinutes: If the type is WINDOWED, the end of the maintenance
3493	// window, measured as the number of minutes after midnight in device's
3494	// local time. This value must be between 0 and 1439, inclusive. If this
3495	// value is less than start_minutes, then the maintenance window spans
3496	// midnight. If the maintenance window specified is smaller than 30
3497	// minutes, the actual window is extended to 30 minutes beyond the start
3498	// time.
3499	EndMinutes int64 `json:"endMinutes,omitempty"`
3500
3501	// StartMinutes: If the type is WINDOWED, the start of the maintenance
3502	// window, measured as the number of minutes after midnight in the
3503	// device's local time. This value must be between 0 and 1439,
3504	// inclusive.
3505	StartMinutes int64 `json:"startMinutes,omitempty"`
3506
3507	// Type: The type of system update to configure.
3508	//
3509	// Possible values:
3510	//   "SYSTEM_UPDATE_TYPE_UNSPECIFIED" - Follow the default update
3511	// behavior for the device, which typically requires the user to accept
3512	// system updates.
3513	//   "AUTOMATIC" - Install automatically as soon as an update is
3514	// available.
3515	//   "WINDOWED" - Install automatically within a daily maintenance
3516	// window. This also configures Play apps to be updated within the
3517	// window. This is strongly recommended for kiosk devices because this
3518	// is the only way apps persistently pinned to the foreground can be
3519	// updated by Play.
3520	//   "POSTPONE" - Postpone automatic install up to a maximum of 30 days.
3521	Type string `json:"type,omitempty"`
3522
3523	// ForceSendFields is a list of field names (e.g. "EndMinutes") to
3524	// unconditionally include in API requests. By default, fields with
3525	// empty values are omitted from API requests. However, any non-pointer,
3526	// non-interface field appearing in ForceSendFields will be sent to the
3527	// server regardless of whether the field is empty or not. This may be
3528	// used to include empty fields in Patch requests.
3529	ForceSendFields []string `json:"-"`
3530
3531	// NullFields is a list of field names (e.g. "EndMinutes") to include in
3532	// API requests with the JSON null value. By default, fields with empty
3533	// values are omitted from API requests. However, any field with an
3534	// empty value appearing in NullFields will be sent to the server as
3535	// null. It is an error if a field in this list has a non-empty value.
3536	// This may be used to include null fields in Patch requests.
3537	NullFields []string `json:"-"`
3538}
3539
3540func (s *SystemUpdate) MarshalJSON() ([]byte, error) {
3541	type NoMethod SystemUpdate
3542	raw := NoMethod(*s)
3543	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3544}
3545
3546// TermsAndConditions: A terms and conditions page to be accepted during
3547// provisioning.
3548type TermsAndConditions struct {
3549	// Content: A well-formatted HTML string. It will be parsed on the
3550	// client with android.text.Html#fromHtml.
3551	Content *UserFacingMessage `json:"content,omitempty"`
3552
3553	// Header: A short header which appears above the HTML content.
3554	Header *UserFacingMessage `json:"header,omitempty"`
3555
3556	// ForceSendFields is a list of field names (e.g. "Content") to
3557	// unconditionally include in API requests. By default, fields with
3558	// empty values are omitted from API requests. However, any non-pointer,
3559	// non-interface field appearing in ForceSendFields will be sent to the
3560	// server regardless of whether the field is empty or not. This may be
3561	// used to include empty fields in Patch requests.
3562	ForceSendFields []string `json:"-"`
3563
3564	// NullFields is a list of field names (e.g. "Content") to include in
3565	// API requests with the JSON null value. By default, fields with empty
3566	// values are omitted from API requests. However, any field with an
3567	// empty value appearing in NullFields will be sent to the server as
3568	// null. It is an error if a field in this list has a non-empty value.
3569	// This may be used to include null fields in Patch requests.
3570	NullFields []string `json:"-"`
3571}
3572
3573func (s *TermsAndConditions) MarshalJSON() ([]byte, error) {
3574	type NoMethod TermsAndConditions
3575	raw := NoMethod(*s)
3576	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3577}
3578
3579// User: A user belonging to an enterprise.
3580type User struct {
3581	// AccountIdentifier: A unique identifier you create for this user, such
3582	// as user342 or asset#44418. This field must be set when the user is
3583	// created and can't be updated. This field must not contain personally
3584	// identifiable information (PII). This identifier must be 1024
3585	// characters or less; otherwise, the update policy request will fail.
3586	AccountIdentifier string `json:"accountIdentifier,omitempty"`
3587
3588	// ForceSendFields is a list of field names (e.g. "AccountIdentifier")
3589	// to unconditionally include in API requests. By default, fields with
3590	// empty values are omitted from API requests. However, any non-pointer,
3591	// non-interface field appearing in ForceSendFields will be sent to the
3592	// server regardless of whether the field is empty or not. This may be
3593	// used to include empty fields in Patch requests.
3594	ForceSendFields []string `json:"-"`
3595
3596	// NullFields is a list of field names (e.g. "AccountIdentifier") to
3597	// include in API requests with the JSON null value. By default, fields
3598	// with empty values are omitted from API requests. However, any field
3599	// with an empty value appearing in NullFields will be sent to the
3600	// server as null. It is an error if a field in this list has a
3601	// non-empty value. This may be used to include null fields in Patch
3602	// requests.
3603	NullFields []string `json:"-"`
3604}
3605
3606func (s *User) MarshalJSON() ([]byte, error) {
3607	type NoMethod User
3608	raw := NoMethod(*s)
3609	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3610}
3611
3612// UserFacingMessage: Provides a user-facing message with locale info.
3613// The maximum message length is 4096 characters.
3614type UserFacingMessage struct {
3615	// DefaultMessage: The default message displayed if no localized message
3616	// is specified or the user's locale doesn't match with any of the
3617	// localized messages. A default message must be provided if any
3618	// localized messages are provided.
3619	DefaultMessage string `json:"defaultMessage,omitempty"`
3620
3621	// LocalizedMessages: A map containing <locale, message> pairs, where
3622	// locale is a well-formed BCP 47 language
3623	// (https://www.w3.org/International/articles/language-tags/) code, such
3624	// as en-US, es-ES, or fr.
3625	LocalizedMessages map[string]string `json:"localizedMessages,omitempty"`
3626
3627	// ForceSendFields is a list of field names (e.g. "DefaultMessage") to
3628	// unconditionally include in API requests. By default, fields with
3629	// empty values are omitted from API requests. However, any non-pointer,
3630	// non-interface field appearing in ForceSendFields will be sent to the
3631	// server regardless of whether the field is empty or not. This may be
3632	// used to include empty fields in Patch requests.
3633	ForceSendFields []string `json:"-"`
3634
3635	// NullFields is a list of field names (e.g. "DefaultMessage") to
3636	// include in API requests with the JSON null value. By default, fields
3637	// with empty values are omitted from API requests. However, any field
3638	// with an empty value appearing in NullFields will be sent to the
3639	// server as null. It is an error if a field in this list has a
3640	// non-empty value. This may be used to include null fields in Patch
3641	// requests.
3642	NullFields []string `json:"-"`
3643}
3644
3645func (s *UserFacingMessage) MarshalJSON() ([]byte, error) {
3646	type NoMethod UserFacingMessage
3647	raw := NoMethod(*s)
3648	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3649}
3650
3651// WebApp: A web app.
3652type WebApp struct {
3653	// DisplayMode: The display mode of the web app.
3654	//
3655	// Possible values:
3656	//   "DISPLAY_MODE_UNSPECIFIED" - Not used.
3657	//   "MINIMAL_UI" - Opens the web app with a minimal set of browser UI
3658	// elements for controlling navigation and viewing the page URL.
3659	//   "STANDALONE" - Opens the web app to look and feel like a standalone
3660	// native application. The browser UI elements and page URL are not
3661	// visible, however the system status bar and back button are visible.
3662	//   "FULL_SCREEN" - Opens the web app in full screen without any
3663	// visible controls. The browser UI elements, page URL, system status
3664	// bar and back button are not visible, and the web app takes up the
3665	// entirety of the available display area.
3666	DisplayMode string `json:"displayMode,omitempty"`
3667
3668	// Icons: A list of icons for the web app. Must have at least one
3669	// element.
3670	Icons []*WebAppIcon `json:"icons,omitempty"`
3671
3672	// Name: The name of the web app, which is generated by the server
3673	// during creation in the form
3674	// enterprises/{enterpriseId}/webApps/{packageName}.
3675	Name string `json:"name,omitempty"`
3676
3677	// StartUrl: The start URL, i.e. the URL that should load when the user
3678	// opens the application.
3679	StartUrl string `json:"startUrl,omitempty"`
3680
3681	// Title: The title of the web app as displayed to the user (e.g.,
3682	// amongst a list of other applications, or as a label for an icon).
3683	Title string `json:"title,omitempty"`
3684
3685	// VersionCode: The current version of the app.Note that the version can
3686	// automatically increase during the lifetime of the web app, while
3687	// Google does internal housekeeping to keep the web app up-to-date.
3688	VersionCode int64 `json:"versionCode,omitempty,string"`
3689
3690	// ServerResponse contains the HTTP response code and headers from the
3691	// server.
3692	googleapi.ServerResponse `json:"-"`
3693
3694	// ForceSendFields is a list of field names (e.g. "DisplayMode") to
3695	// unconditionally include in API requests. By default, fields with
3696	// empty values are omitted from API requests. However, any non-pointer,
3697	// non-interface field appearing in ForceSendFields will be sent to the
3698	// server regardless of whether the field is empty or not. This may be
3699	// used to include empty fields in Patch requests.
3700	ForceSendFields []string `json:"-"`
3701
3702	// NullFields is a list of field names (e.g. "DisplayMode") to include
3703	// in API requests with the JSON null value. By default, fields with
3704	// empty values are omitted from API requests. However, any field with
3705	// an empty value appearing in NullFields will be sent to the server as
3706	// null. It is an error if a field in this list has a non-empty value.
3707	// This may be used to include null fields in Patch requests.
3708	NullFields []string `json:"-"`
3709}
3710
3711func (s *WebApp) MarshalJSON() ([]byte, error) {
3712	type NoMethod WebApp
3713	raw := NoMethod(*s)
3714	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3715}
3716
3717// WebAppIcon: An icon for a web app. Supported formats are: png, jpg
3718// and webp.
3719type WebAppIcon struct {
3720	// ImageData: The actual bytes of the image in a base64url encoded
3721	// string (c.f. RFC4648, section 5 "Base 64 Encoding with URL and
3722	// Filename Safe Alphabet"). <ul> <li>The image type can be png or jpg.
3723	// <li>The image should ideally be square. <li>The image should ideally
3724	// have a size of 512x512. </ul>
3725	ImageData string `json:"imageData,omitempty"`
3726
3727	// ForceSendFields is a list of field names (e.g. "ImageData") to
3728	// unconditionally include in API requests. By default, fields with
3729	// empty values are omitted from API requests. However, any non-pointer,
3730	// non-interface field appearing in ForceSendFields will be sent to the
3731	// server regardless of whether the field is empty or not. This may be
3732	// used to include empty fields in Patch requests.
3733	ForceSendFields []string `json:"-"`
3734
3735	// NullFields is a list of field names (e.g. "ImageData") to include in
3736	// API requests with the JSON null value. By default, fields with empty
3737	// values are omitted from API requests. However, any field with an
3738	// empty value appearing in NullFields will be sent to the server as
3739	// null. It is an error if a field in this list has a non-empty value.
3740	// This may be used to include null fields in Patch requests.
3741	NullFields []string `json:"-"`
3742}
3743
3744func (s *WebAppIcon) MarshalJSON() ([]byte, error) {
3745	type NoMethod WebAppIcon
3746	raw := NoMethod(*s)
3747	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3748}
3749
3750// WebToken: A web token used to access the managed Google Play iframe.
3751type WebToken struct {
3752	// EnabledFeatures: The features to enable. Use this if you want to
3753	// control exactly which feature(s) will be activated; leave empty to
3754	// allow all features.Restrictions / things to note: <ul> <li> If no
3755	// features are listed here, all features are enabled — this is the
3756	// default behavior where you give access to all features to your
3757	// admins. <li> This must not contain any FEATURE_UNSPECIFIED values.
3758	// <li> Repeated values are ignored </ul>
3759	//
3760	// Possible values:
3761	//   "FEATURE_UNSPECIFIED" - Unspecified feature.
3762	//   "PLAY_SEARCH" - The Managed Play search apps page
3763	// (https://developers.google.com/android/management/apps#search-apps).
3764	//   "PRIVATE_APPS" - The private apps page
3765	// (https://developers.google.com/android/management/apps#private-apps).
3766	//   "WEB_APPS" - The Web Apps page
3767	// (https://developers.google.com/android/management/apps#web-apps).
3768	//   "STORE_BUILDER" - The organize apps page
3769	// (https://developers.google.com/android/management/apps#organize-apps).
3770	//   "MANAGED_CONFIGURATIONS" - The managed configurations page
3771	// (https://developers.google.com/android/management/managed-configuratio
3772	// ns-iframe).
3773	EnabledFeatures []string `json:"enabledFeatures,omitempty"`
3774
3775	// Name: The name of the web token, which is generated by the server
3776	// during creation in the form
3777	// enterprises/{enterpriseId}/webTokens/{webTokenId}.
3778	Name string `json:"name,omitempty"`
3779
3780	// ParentFrameUrl: The URL of the parent frame hosting the iframe with
3781	// the embedded UI. To prevent XSS, the iframe may not be hosted at
3782	// other URLs. The URL must use the https scheme.
3783	ParentFrameUrl string `json:"parentFrameUrl,omitempty"`
3784
3785	// Permissions: Permissions available to an admin in the embedded UI. An
3786	// admin must have all of these permissions in order to view the UI.
3787	// This field is deprecated.
3788	//
3789	// Possible values:
3790	//   "WEB_TOKEN_PERMISSION_UNSPECIFIED" - This value is ignored.
3791	//   "APPROVE_APPS" - The permission to approve apps for the enterprise.
3792	Permissions []string `json:"permissions,omitempty"`
3793
3794	// Value: The token value which is used in the hosting page to generate
3795	// the iframe with the embedded UI. This is a read-only field generated
3796	// by the server.
3797	Value string `json:"value,omitempty"`
3798
3799	// ServerResponse contains the HTTP response code and headers from the
3800	// server.
3801	googleapi.ServerResponse `json:"-"`
3802
3803	// ForceSendFields is a list of field names (e.g. "EnabledFeatures") to
3804	// unconditionally include in API requests. By default, fields with
3805	// empty values are omitted from API requests. However, any non-pointer,
3806	// non-interface field appearing in ForceSendFields will be sent to the
3807	// server regardless of whether the field is empty or not. This may be
3808	// used to include empty fields in Patch requests.
3809	ForceSendFields []string `json:"-"`
3810
3811	// NullFields is a list of field names (e.g. "EnabledFeatures") to
3812	// include in API requests with the JSON null value. By default, fields
3813	// with empty values are omitted from API requests. However, any field
3814	// with an empty value appearing in NullFields will be sent to the
3815	// server as null. It is an error if a field in this list has a
3816	// non-empty value. This may be used to include null fields in Patch
3817	// requests.
3818	NullFields []string `json:"-"`
3819}
3820
3821func (s *WebToken) MarshalJSON() ([]byte, error) {
3822	type NoMethod WebToken
3823	raw := NoMethod(*s)
3824	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3825}
3826
3827// WipeAction: An action to reset a fully managed device or delete a
3828// work profile. Note: blockAction must also be specified.
3829type WipeAction struct {
3830	// PreserveFrp: Whether the factory-reset protection data is preserved
3831	// on the device. This setting doesn’t apply to work profiles.
3832	PreserveFrp bool `json:"preserveFrp,omitempty"`
3833
3834	// WipeAfterDays: Number of days the policy is non-compliant before the
3835	// device or work profile is wiped. wipeAfterDays must be greater than
3836	// blockAfterDays.
3837	WipeAfterDays int64 `json:"wipeAfterDays,omitempty"`
3838
3839	// ForceSendFields is a list of field names (e.g. "PreserveFrp") to
3840	// unconditionally include in API requests. By default, fields with
3841	// empty values are omitted from API requests. However, any non-pointer,
3842	// non-interface field appearing in ForceSendFields will be sent to the
3843	// server regardless of whether the field is empty or not. This may be
3844	// used to include empty fields in Patch requests.
3845	ForceSendFields []string `json:"-"`
3846
3847	// NullFields is a list of field names (e.g. "PreserveFrp") to include
3848	// in API requests with the JSON null value. By default, fields with
3849	// empty values are omitted from API requests. However, any field with
3850	// an empty value appearing in NullFields will be sent to the server as
3851	// null. It is an error if a field in this list has a non-empty value.
3852	// This may be used to include null fields in Patch requests.
3853	NullFields []string `json:"-"`
3854}
3855
3856func (s *WipeAction) MarshalJSON() ([]byte, error) {
3857	type NoMethod WipeAction
3858	raw := NoMethod(*s)
3859	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3860}
3861
3862// method id "androidmanagement.enterprises.create":
3863
3864type EnterprisesCreateCall struct {
3865	s          *Service
3866	enterprise *Enterprise
3867	urlParams_ gensupport.URLParams
3868	ctx_       context.Context
3869	header_    http.Header
3870}
3871
3872// Create: Creates an enterprise. This is the last step in the
3873// enterprise signup flow.
3874func (r *EnterprisesService) Create(enterprise *Enterprise) *EnterprisesCreateCall {
3875	c := &EnterprisesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3876	c.enterprise = enterprise
3877	return c
3878}
3879
3880// EnterpriseToken sets the optional parameter "enterpriseToken": The
3881// enterprise token appended to the callback URL.
3882func (c *EnterprisesCreateCall) EnterpriseToken(enterpriseToken string) *EnterprisesCreateCall {
3883	c.urlParams_.Set("enterpriseToken", enterpriseToken)
3884	return c
3885}
3886
3887// ProjectId sets the optional parameter "projectId": The ID of the
3888// Google Cloud Platform project which will own the enterprise.
3889func (c *EnterprisesCreateCall) ProjectId(projectId string) *EnterprisesCreateCall {
3890	c.urlParams_.Set("projectId", projectId)
3891	return c
3892}
3893
3894// SignupUrlName sets the optional parameter "signupUrlName": The name
3895// of the SignupUrl used to sign up for the enterprise.
3896func (c *EnterprisesCreateCall) SignupUrlName(signupUrlName string) *EnterprisesCreateCall {
3897	c.urlParams_.Set("signupUrlName", signupUrlName)
3898	return c
3899}
3900
3901// Fields allows partial responses to be retrieved. See
3902// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3903// for more information.
3904func (c *EnterprisesCreateCall) Fields(s ...googleapi.Field) *EnterprisesCreateCall {
3905	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3906	return c
3907}
3908
3909// Context sets the context to be used in this call's Do method. Any
3910// pending HTTP request will be aborted if the provided context is
3911// canceled.
3912func (c *EnterprisesCreateCall) Context(ctx context.Context) *EnterprisesCreateCall {
3913	c.ctx_ = ctx
3914	return c
3915}
3916
3917// Header returns an http.Header that can be modified by the caller to
3918// add HTTP headers to the request.
3919func (c *EnterprisesCreateCall) Header() http.Header {
3920	if c.header_ == nil {
3921		c.header_ = make(http.Header)
3922	}
3923	return c.header_
3924}
3925
3926func (c *EnterprisesCreateCall) doRequest(alt string) (*http.Response, error) {
3927	reqHeaders := make(http.Header)
3928	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
3929	for k, v := range c.header_ {
3930		reqHeaders[k] = v
3931	}
3932	reqHeaders.Set("User-Agent", c.s.userAgent())
3933	var body io.Reader = nil
3934	body, err := googleapi.WithoutDataWrapper.JSONReader(c.enterprise)
3935	if err != nil {
3936		return nil, err
3937	}
3938	reqHeaders.Set("Content-Type", "application/json")
3939	c.urlParams_.Set("alt", alt)
3940	c.urlParams_.Set("prettyPrint", "false")
3941	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/enterprises")
3942	urls += "?" + c.urlParams_.Encode()
3943	req, err := http.NewRequest("POST", urls, body)
3944	if err != nil {
3945		return nil, err
3946	}
3947	req.Header = reqHeaders
3948	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3949}
3950
3951// Do executes the "androidmanagement.enterprises.create" call.
3952// Exactly one of *Enterprise or error will be non-nil. Any non-2xx
3953// status code is an error. Response headers are in either
3954// *Enterprise.ServerResponse.Header or (if a response was returned at
3955// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3956// to check whether the returned error was because
3957// http.StatusNotModified was returned.
3958func (c *EnterprisesCreateCall) Do(opts ...googleapi.CallOption) (*Enterprise, error) {
3959	gensupport.SetOptions(c.urlParams_, opts...)
3960	res, err := c.doRequest("json")
3961	if res != nil && res.StatusCode == http.StatusNotModified {
3962		if res.Body != nil {
3963			res.Body.Close()
3964		}
3965		return nil, &googleapi.Error{
3966			Code:   res.StatusCode,
3967			Header: res.Header,
3968		}
3969	}
3970	if err != nil {
3971		return nil, err
3972	}
3973	defer googleapi.CloseBody(res)
3974	if err := googleapi.CheckResponse(res); err != nil {
3975		return nil, err
3976	}
3977	ret := &Enterprise{
3978		ServerResponse: googleapi.ServerResponse{
3979			Header:         res.Header,
3980			HTTPStatusCode: res.StatusCode,
3981		},
3982	}
3983	target := &ret
3984	if err := gensupport.DecodeResponse(target, res); err != nil {
3985		return nil, err
3986	}
3987	return ret, nil
3988	// {
3989	//   "description": "Creates an enterprise. This is the last step in the enterprise signup flow.",
3990	//   "flatPath": "v1/enterprises",
3991	//   "httpMethod": "POST",
3992	//   "id": "androidmanagement.enterprises.create",
3993	//   "parameterOrder": [],
3994	//   "parameters": {
3995	//     "enterpriseToken": {
3996	//       "description": "The enterprise token appended to the callback URL.",
3997	//       "location": "query",
3998	//       "type": "string"
3999	//     },
4000	//     "projectId": {
4001	//       "description": "The ID of the Google Cloud Platform project which will own the enterprise.",
4002	//       "location": "query",
4003	//       "type": "string"
4004	//     },
4005	//     "signupUrlName": {
4006	//       "description": "The name of the SignupUrl used to sign up for the enterprise.",
4007	//       "location": "query",
4008	//       "type": "string"
4009	//     }
4010	//   },
4011	//   "path": "v1/enterprises",
4012	//   "request": {
4013	//     "$ref": "Enterprise"
4014	//   },
4015	//   "response": {
4016	//     "$ref": "Enterprise"
4017	//   },
4018	//   "scopes": [
4019	//     "https://www.googleapis.com/auth/androidmanagement"
4020	//   ]
4021	// }
4022
4023}
4024
4025// method id "androidmanagement.enterprises.get":
4026
4027type EnterprisesGetCall struct {
4028	s            *Service
4029	name         string
4030	urlParams_   gensupport.URLParams
4031	ifNoneMatch_ string
4032	ctx_         context.Context
4033	header_      http.Header
4034}
4035
4036// Get: Gets an enterprise.
4037func (r *EnterprisesService) Get(name string) *EnterprisesGetCall {
4038	c := &EnterprisesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4039	c.name = name
4040	return c
4041}
4042
4043// Fields allows partial responses to be retrieved. See
4044// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4045// for more information.
4046func (c *EnterprisesGetCall) Fields(s ...googleapi.Field) *EnterprisesGetCall {
4047	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4048	return c
4049}
4050
4051// IfNoneMatch sets the optional parameter which makes the operation
4052// fail if the object's ETag matches the given value. This is useful for
4053// getting updates only after the object has changed since the last
4054// request. Use googleapi.IsNotModified to check whether the response
4055// error from Do is the result of In-None-Match.
4056func (c *EnterprisesGetCall) IfNoneMatch(entityTag string) *EnterprisesGetCall {
4057	c.ifNoneMatch_ = entityTag
4058	return c
4059}
4060
4061// Context sets the context to be used in this call's Do method. Any
4062// pending HTTP request will be aborted if the provided context is
4063// canceled.
4064func (c *EnterprisesGetCall) Context(ctx context.Context) *EnterprisesGetCall {
4065	c.ctx_ = ctx
4066	return c
4067}
4068
4069// Header returns an http.Header that can be modified by the caller to
4070// add HTTP headers to the request.
4071func (c *EnterprisesGetCall) Header() http.Header {
4072	if c.header_ == nil {
4073		c.header_ = make(http.Header)
4074	}
4075	return c.header_
4076}
4077
4078func (c *EnterprisesGetCall) doRequest(alt string) (*http.Response, error) {
4079	reqHeaders := make(http.Header)
4080	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
4081	for k, v := range c.header_ {
4082		reqHeaders[k] = v
4083	}
4084	reqHeaders.Set("User-Agent", c.s.userAgent())
4085	if c.ifNoneMatch_ != "" {
4086		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4087	}
4088	var body io.Reader = nil
4089	c.urlParams_.Set("alt", alt)
4090	c.urlParams_.Set("prettyPrint", "false")
4091	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4092	urls += "?" + c.urlParams_.Encode()
4093	req, err := http.NewRequest("GET", urls, body)
4094	if err != nil {
4095		return nil, err
4096	}
4097	req.Header = reqHeaders
4098	googleapi.Expand(req.URL, map[string]string{
4099		"name": c.name,
4100	})
4101	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4102}
4103
4104// Do executes the "androidmanagement.enterprises.get" call.
4105// Exactly one of *Enterprise or error will be non-nil. Any non-2xx
4106// status code is an error. Response headers are in either
4107// *Enterprise.ServerResponse.Header or (if a response was returned at
4108// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4109// to check whether the returned error was because
4110// http.StatusNotModified was returned.
4111func (c *EnterprisesGetCall) Do(opts ...googleapi.CallOption) (*Enterprise, error) {
4112	gensupport.SetOptions(c.urlParams_, opts...)
4113	res, err := c.doRequest("json")
4114	if res != nil && res.StatusCode == http.StatusNotModified {
4115		if res.Body != nil {
4116			res.Body.Close()
4117		}
4118		return nil, &googleapi.Error{
4119			Code:   res.StatusCode,
4120			Header: res.Header,
4121		}
4122	}
4123	if err != nil {
4124		return nil, err
4125	}
4126	defer googleapi.CloseBody(res)
4127	if err := googleapi.CheckResponse(res); err != nil {
4128		return nil, err
4129	}
4130	ret := &Enterprise{
4131		ServerResponse: googleapi.ServerResponse{
4132			Header:         res.Header,
4133			HTTPStatusCode: res.StatusCode,
4134		},
4135	}
4136	target := &ret
4137	if err := gensupport.DecodeResponse(target, res); err != nil {
4138		return nil, err
4139	}
4140	return ret, nil
4141	// {
4142	//   "description": "Gets an enterprise.",
4143	//   "flatPath": "v1/enterprises/{enterprisesId}",
4144	//   "httpMethod": "GET",
4145	//   "id": "androidmanagement.enterprises.get",
4146	//   "parameterOrder": [
4147	//     "name"
4148	//   ],
4149	//   "parameters": {
4150	//     "name": {
4151	//       "description": "The name of the enterprise in the form enterprises/{enterpriseId}.",
4152	//       "location": "path",
4153	//       "pattern": "^enterprises/[^/]+$",
4154	//       "required": true,
4155	//       "type": "string"
4156	//     }
4157	//   },
4158	//   "path": "v1/{+name}",
4159	//   "response": {
4160	//     "$ref": "Enterprise"
4161	//   },
4162	//   "scopes": [
4163	//     "https://www.googleapis.com/auth/androidmanagement"
4164	//   ]
4165	// }
4166
4167}
4168
4169// method id "androidmanagement.enterprises.patch":
4170
4171type EnterprisesPatchCall struct {
4172	s          *Service
4173	name       string
4174	enterprise *Enterprise
4175	urlParams_ gensupport.URLParams
4176	ctx_       context.Context
4177	header_    http.Header
4178}
4179
4180// Patch: Updates an enterprise.
4181func (r *EnterprisesService) Patch(name string, enterprise *Enterprise) *EnterprisesPatchCall {
4182	c := &EnterprisesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4183	c.name = name
4184	c.enterprise = enterprise
4185	return c
4186}
4187
4188// UpdateMask sets the optional parameter "updateMask": The field mask
4189// indicating the fields to update. If not set, all modifiable fields
4190// will be modified.
4191func (c *EnterprisesPatchCall) UpdateMask(updateMask string) *EnterprisesPatchCall {
4192	c.urlParams_.Set("updateMask", updateMask)
4193	return c
4194}
4195
4196// Fields allows partial responses to be retrieved. See
4197// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4198// for more information.
4199func (c *EnterprisesPatchCall) Fields(s ...googleapi.Field) *EnterprisesPatchCall {
4200	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4201	return c
4202}
4203
4204// Context sets the context to be used in this call's Do method. Any
4205// pending HTTP request will be aborted if the provided context is
4206// canceled.
4207func (c *EnterprisesPatchCall) Context(ctx context.Context) *EnterprisesPatchCall {
4208	c.ctx_ = ctx
4209	return c
4210}
4211
4212// Header returns an http.Header that can be modified by the caller to
4213// add HTTP headers to the request.
4214func (c *EnterprisesPatchCall) Header() http.Header {
4215	if c.header_ == nil {
4216		c.header_ = make(http.Header)
4217	}
4218	return c.header_
4219}
4220
4221func (c *EnterprisesPatchCall) doRequest(alt string) (*http.Response, error) {
4222	reqHeaders := make(http.Header)
4223	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
4224	for k, v := range c.header_ {
4225		reqHeaders[k] = v
4226	}
4227	reqHeaders.Set("User-Agent", c.s.userAgent())
4228	var body io.Reader = nil
4229	body, err := googleapi.WithoutDataWrapper.JSONReader(c.enterprise)
4230	if err != nil {
4231		return nil, err
4232	}
4233	reqHeaders.Set("Content-Type", "application/json")
4234	c.urlParams_.Set("alt", alt)
4235	c.urlParams_.Set("prettyPrint", "false")
4236	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4237	urls += "?" + c.urlParams_.Encode()
4238	req, err := http.NewRequest("PATCH", urls, body)
4239	if err != nil {
4240		return nil, err
4241	}
4242	req.Header = reqHeaders
4243	googleapi.Expand(req.URL, map[string]string{
4244		"name": c.name,
4245	})
4246	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4247}
4248
4249// Do executes the "androidmanagement.enterprises.patch" call.
4250// Exactly one of *Enterprise or error will be non-nil. Any non-2xx
4251// status code is an error. Response headers are in either
4252// *Enterprise.ServerResponse.Header or (if a response was returned at
4253// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4254// to check whether the returned error was because
4255// http.StatusNotModified was returned.
4256func (c *EnterprisesPatchCall) Do(opts ...googleapi.CallOption) (*Enterprise, error) {
4257	gensupport.SetOptions(c.urlParams_, opts...)
4258	res, err := c.doRequest("json")
4259	if res != nil && res.StatusCode == http.StatusNotModified {
4260		if res.Body != nil {
4261			res.Body.Close()
4262		}
4263		return nil, &googleapi.Error{
4264			Code:   res.StatusCode,
4265			Header: res.Header,
4266		}
4267	}
4268	if err != nil {
4269		return nil, err
4270	}
4271	defer googleapi.CloseBody(res)
4272	if err := googleapi.CheckResponse(res); err != nil {
4273		return nil, err
4274	}
4275	ret := &Enterprise{
4276		ServerResponse: googleapi.ServerResponse{
4277			Header:         res.Header,
4278			HTTPStatusCode: res.StatusCode,
4279		},
4280	}
4281	target := &ret
4282	if err := gensupport.DecodeResponse(target, res); err != nil {
4283		return nil, err
4284	}
4285	return ret, nil
4286	// {
4287	//   "description": "Updates an enterprise.",
4288	//   "flatPath": "v1/enterprises/{enterprisesId}",
4289	//   "httpMethod": "PATCH",
4290	//   "id": "androidmanagement.enterprises.patch",
4291	//   "parameterOrder": [
4292	//     "name"
4293	//   ],
4294	//   "parameters": {
4295	//     "name": {
4296	//       "description": "The name of the enterprise in the form enterprises/{enterpriseId}.",
4297	//       "location": "path",
4298	//       "pattern": "^enterprises/[^/]+$",
4299	//       "required": true,
4300	//       "type": "string"
4301	//     },
4302	//     "updateMask": {
4303	//       "description": "The field mask indicating the fields to update. If not set, all modifiable fields will be modified.",
4304	//       "format": "google-fieldmask",
4305	//       "location": "query",
4306	//       "type": "string"
4307	//     }
4308	//   },
4309	//   "path": "v1/{+name}",
4310	//   "request": {
4311	//     "$ref": "Enterprise"
4312	//   },
4313	//   "response": {
4314	//     "$ref": "Enterprise"
4315	//   },
4316	//   "scopes": [
4317	//     "https://www.googleapis.com/auth/androidmanagement"
4318	//   ]
4319	// }
4320
4321}
4322
4323// method id "androidmanagement.enterprises.applications.get":
4324
4325type EnterprisesApplicationsGetCall struct {
4326	s            *Service
4327	name         string
4328	urlParams_   gensupport.URLParams
4329	ifNoneMatch_ string
4330	ctx_         context.Context
4331	header_      http.Header
4332}
4333
4334// Get: Gets info about an application.
4335func (r *EnterprisesApplicationsService) Get(name string) *EnterprisesApplicationsGetCall {
4336	c := &EnterprisesApplicationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4337	c.name = name
4338	return c
4339}
4340
4341// LanguageCode sets the optional parameter "languageCode": The
4342// preferred language for localized application info, as a BCP47 tag
4343// (e.g. "en-US", "de"). If not specified the default language of the
4344// application will be used.
4345func (c *EnterprisesApplicationsGetCall) LanguageCode(languageCode string) *EnterprisesApplicationsGetCall {
4346	c.urlParams_.Set("languageCode", languageCode)
4347	return c
4348}
4349
4350// Fields allows partial responses to be retrieved. See
4351// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4352// for more information.
4353func (c *EnterprisesApplicationsGetCall) Fields(s ...googleapi.Field) *EnterprisesApplicationsGetCall {
4354	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4355	return c
4356}
4357
4358// IfNoneMatch sets the optional parameter which makes the operation
4359// fail if the object's ETag matches the given value. This is useful for
4360// getting updates only after the object has changed since the last
4361// request. Use googleapi.IsNotModified to check whether the response
4362// error from Do is the result of In-None-Match.
4363func (c *EnterprisesApplicationsGetCall) IfNoneMatch(entityTag string) *EnterprisesApplicationsGetCall {
4364	c.ifNoneMatch_ = entityTag
4365	return c
4366}
4367
4368// Context sets the context to be used in this call's Do method. Any
4369// pending HTTP request will be aborted if the provided context is
4370// canceled.
4371func (c *EnterprisesApplicationsGetCall) Context(ctx context.Context) *EnterprisesApplicationsGetCall {
4372	c.ctx_ = ctx
4373	return c
4374}
4375
4376// Header returns an http.Header that can be modified by the caller to
4377// add HTTP headers to the request.
4378func (c *EnterprisesApplicationsGetCall) Header() http.Header {
4379	if c.header_ == nil {
4380		c.header_ = make(http.Header)
4381	}
4382	return c.header_
4383}
4384
4385func (c *EnterprisesApplicationsGetCall) doRequest(alt string) (*http.Response, error) {
4386	reqHeaders := make(http.Header)
4387	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
4388	for k, v := range c.header_ {
4389		reqHeaders[k] = v
4390	}
4391	reqHeaders.Set("User-Agent", c.s.userAgent())
4392	if c.ifNoneMatch_ != "" {
4393		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4394	}
4395	var body io.Reader = nil
4396	c.urlParams_.Set("alt", alt)
4397	c.urlParams_.Set("prettyPrint", "false")
4398	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4399	urls += "?" + c.urlParams_.Encode()
4400	req, err := http.NewRequest("GET", urls, body)
4401	if err != nil {
4402		return nil, err
4403	}
4404	req.Header = reqHeaders
4405	googleapi.Expand(req.URL, map[string]string{
4406		"name": c.name,
4407	})
4408	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4409}
4410
4411// Do executes the "androidmanagement.enterprises.applications.get" call.
4412// Exactly one of *Application or error will be non-nil. Any non-2xx
4413// status code is an error. Response headers are in either
4414// *Application.ServerResponse.Header or (if a response was returned at
4415// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4416// to check whether the returned error was because
4417// http.StatusNotModified was returned.
4418func (c *EnterprisesApplicationsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) {
4419	gensupport.SetOptions(c.urlParams_, opts...)
4420	res, err := c.doRequest("json")
4421	if res != nil && res.StatusCode == http.StatusNotModified {
4422		if res.Body != nil {
4423			res.Body.Close()
4424		}
4425		return nil, &googleapi.Error{
4426			Code:   res.StatusCode,
4427			Header: res.Header,
4428		}
4429	}
4430	if err != nil {
4431		return nil, err
4432	}
4433	defer googleapi.CloseBody(res)
4434	if err := googleapi.CheckResponse(res); err != nil {
4435		return nil, err
4436	}
4437	ret := &Application{
4438		ServerResponse: googleapi.ServerResponse{
4439			Header:         res.Header,
4440			HTTPStatusCode: res.StatusCode,
4441		},
4442	}
4443	target := &ret
4444	if err := gensupport.DecodeResponse(target, res); err != nil {
4445		return nil, err
4446	}
4447	return ret, nil
4448	// {
4449	//   "description": "Gets info about an application.",
4450	//   "flatPath": "v1/enterprises/{enterprisesId}/applications/{applicationsId}",
4451	//   "httpMethod": "GET",
4452	//   "id": "androidmanagement.enterprises.applications.get",
4453	//   "parameterOrder": [
4454	//     "name"
4455	//   ],
4456	//   "parameters": {
4457	//     "languageCode": {
4458	//       "description": "The preferred language for localized application info, as a BCP47 tag (e.g. \"en-US\", \"de\"). If not specified the default language of the application will be used.",
4459	//       "location": "query",
4460	//       "type": "string"
4461	//     },
4462	//     "name": {
4463	//       "description": "The name of the application in the form enterprises/{enterpriseId}/applications/{package_name}.",
4464	//       "location": "path",
4465	//       "pattern": "^enterprises/[^/]+/applications/[^/]+$",
4466	//       "required": true,
4467	//       "type": "string"
4468	//     }
4469	//   },
4470	//   "path": "v1/{+name}",
4471	//   "response": {
4472	//     "$ref": "Application"
4473	//   },
4474	//   "scopes": [
4475	//     "https://www.googleapis.com/auth/androidmanagement"
4476	//   ]
4477	// }
4478
4479}
4480
4481// method id "androidmanagement.enterprises.devices.delete":
4482
4483type EnterprisesDevicesDeleteCall struct {
4484	s          *Service
4485	name       string
4486	urlParams_ gensupport.URLParams
4487	ctx_       context.Context
4488	header_    http.Header
4489}
4490
4491// Delete: Deletes a device. This operation wipes the device.
4492func (r *EnterprisesDevicesService) Delete(name string) *EnterprisesDevicesDeleteCall {
4493	c := &EnterprisesDevicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4494	c.name = name
4495	return c
4496}
4497
4498// WipeDataFlags sets the optional parameter "wipeDataFlags": Optional
4499// flags that control the device wiping behavior.
4500//
4501// Possible values:
4502//   "WIPE_DATA_FLAG_UNSPECIFIED"
4503//   "PRESERVE_RESET_PROTECTION_DATA"
4504//   "WIPE_EXTERNAL_STORAGE"
4505func (c *EnterprisesDevicesDeleteCall) WipeDataFlags(wipeDataFlags ...string) *EnterprisesDevicesDeleteCall {
4506	c.urlParams_.SetMulti("wipeDataFlags", append([]string{}, wipeDataFlags...))
4507	return c
4508}
4509
4510// Fields allows partial responses to be retrieved. See
4511// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4512// for more information.
4513func (c *EnterprisesDevicesDeleteCall) Fields(s ...googleapi.Field) *EnterprisesDevicesDeleteCall {
4514	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4515	return c
4516}
4517
4518// Context sets the context to be used in this call's Do method. Any
4519// pending HTTP request will be aborted if the provided context is
4520// canceled.
4521func (c *EnterprisesDevicesDeleteCall) Context(ctx context.Context) *EnterprisesDevicesDeleteCall {
4522	c.ctx_ = ctx
4523	return c
4524}
4525
4526// Header returns an http.Header that can be modified by the caller to
4527// add HTTP headers to the request.
4528func (c *EnterprisesDevicesDeleteCall) Header() http.Header {
4529	if c.header_ == nil {
4530		c.header_ = make(http.Header)
4531	}
4532	return c.header_
4533}
4534
4535func (c *EnterprisesDevicesDeleteCall) doRequest(alt string) (*http.Response, error) {
4536	reqHeaders := make(http.Header)
4537	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
4538	for k, v := range c.header_ {
4539		reqHeaders[k] = v
4540	}
4541	reqHeaders.Set("User-Agent", c.s.userAgent())
4542	var body io.Reader = nil
4543	c.urlParams_.Set("alt", alt)
4544	c.urlParams_.Set("prettyPrint", "false")
4545	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4546	urls += "?" + c.urlParams_.Encode()
4547	req, err := http.NewRequest("DELETE", urls, body)
4548	if err != nil {
4549		return nil, err
4550	}
4551	req.Header = reqHeaders
4552	googleapi.Expand(req.URL, map[string]string{
4553		"name": c.name,
4554	})
4555	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4556}
4557
4558// Do executes the "androidmanagement.enterprises.devices.delete" call.
4559// Exactly one of *Empty or error will be non-nil. Any non-2xx status
4560// code is an error. Response headers are in either
4561// *Empty.ServerResponse.Header or (if a response was returned at all)
4562// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4563// check whether the returned error was because http.StatusNotModified
4564// was returned.
4565func (c *EnterprisesDevicesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4566	gensupport.SetOptions(c.urlParams_, opts...)
4567	res, err := c.doRequest("json")
4568	if res != nil && res.StatusCode == http.StatusNotModified {
4569		if res.Body != nil {
4570			res.Body.Close()
4571		}
4572		return nil, &googleapi.Error{
4573			Code:   res.StatusCode,
4574			Header: res.Header,
4575		}
4576	}
4577	if err != nil {
4578		return nil, err
4579	}
4580	defer googleapi.CloseBody(res)
4581	if err := googleapi.CheckResponse(res); err != nil {
4582		return nil, err
4583	}
4584	ret := &Empty{
4585		ServerResponse: googleapi.ServerResponse{
4586			Header:         res.Header,
4587			HTTPStatusCode: res.StatusCode,
4588		},
4589	}
4590	target := &ret
4591	if err := gensupport.DecodeResponse(target, res); err != nil {
4592		return nil, err
4593	}
4594	return ret, nil
4595	// {
4596	//   "description": "Deletes a device. This operation wipes the device.",
4597	//   "flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}",
4598	//   "httpMethod": "DELETE",
4599	//   "id": "androidmanagement.enterprises.devices.delete",
4600	//   "parameterOrder": [
4601	//     "name"
4602	//   ],
4603	//   "parameters": {
4604	//     "name": {
4605	//       "description": "The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}.",
4606	//       "location": "path",
4607	//       "pattern": "^enterprises/[^/]+/devices/[^/]+$",
4608	//       "required": true,
4609	//       "type": "string"
4610	//     },
4611	//     "wipeDataFlags": {
4612	//       "description": "Optional flags that control the device wiping behavior.",
4613	//       "enum": [
4614	//         "WIPE_DATA_FLAG_UNSPECIFIED",
4615	//         "PRESERVE_RESET_PROTECTION_DATA",
4616	//         "WIPE_EXTERNAL_STORAGE"
4617	//       ],
4618	//       "location": "query",
4619	//       "repeated": true,
4620	//       "type": "string"
4621	//     }
4622	//   },
4623	//   "path": "v1/{+name}",
4624	//   "response": {
4625	//     "$ref": "Empty"
4626	//   },
4627	//   "scopes": [
4628	//     "https://www.googleapis.com/auth/androidmanagement"
4629	//   ]
4630	// }
4631
4632}
4633
4634// method id "androidmanagement.enterprises.devices.get":
4635
4636type EnterprisesDevicesGetCall struct {
4637	s            *Service
4638	name         string
4639	urlParams_   gensupport.URLParams
4640	ifNoneMatch_ string
4641	ctx_         context.Context
4642	header_      http.Header
4643}
4644
4645// Get: Gets a device.
4646func (r *EnterprisesDevicesService) Get(name string) *EnterprisesDevicesGetCall {
4647	c := &EnterprisesDevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4648	c.name = name
4649	return c
4650}
4651
4652// Fields allows partial responses to be retrieved. See
4653// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4654// for more information.
4655func (c *EnterprisesDevicesGetCall) Fields(s ...googleapi.Field) *EnterprisesDevicesGetCall {
4656	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4657	return c
4658}
4659
4660// IfNoneMatch sets the optional parameter which makes the operation
4661// fail if the object's ETag matches the given value. This is useful for
4662// getting updates only after the object has changed since the last
4663// request. Use googleapi.IsNotModified to check whether the response
4664// error from Do is the result of In-None-Match.
4665func (c *EnterprisesDevicesGetCall) IfNoneMatch(entityTag string) *EnterprisesDevicesGetCall {
4666	c.ifNoneMatch_ = entityTag
4667	return c
4668}
4669
4670// Context sets the context to be used in this call's Do method. Any
4671// pending HTTP request will be aborted if the provided context is
4672// canceled.
4673func (c *EnterprisesDevicesGetCall) Context(ctx context.Context) *EnterprisesDevicesGetCall {
4674	c.ctx_ = ctx
4675	return c
4676}
4677
4678// Header returns an http.Header that can be modified by the caller to
4679// add HTTP headers to the request.
4680func (c *EnterprisesDevicesGetCall) Header() http.Header {
4681	if c.header_ == nil {
4682		c.header_ = make(http.Header)
4683	}
4684	return c.header_
4685}
4686
4687func (c *EnterprisesDevicesGetCall) doRequest(alt string) (*http.Response, error) {
4688	reqHeaders := make(http.Header)
4689	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
4690	for k, v := range c.header_ {
4691		reqHeaders[k] = v
4692	}
4693	reqHeaders.Set("User-Agent", c.s.userAgent())
4694	if c.ifNoneMatch_ != "" {
4695		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4696	}
4697	var body io.Reader = nil
4698	c.urlParams_.Set("alt", alt)
4699	c.urlParams_.Set("prettyPrint", "false")
4700	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4701	urls += "?" + c.urlParams_.Encode()
4702	req, err := http.NewRequest("GET", urls, body)
4703	if err != nil {
4704		return nil, err
4705	}
4706	req.Header = reqHeaders
4707	googleapi.Expand(req.URL, map[string]string{
4708		"name": c.name,
4709	})
4710	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4711}
4712
4713// Do executes the "androidmanagement.enterprises.devices.get" call.
4714// Exactly one of *Device or error will be non-nil. Any non-2xx status
4715// code is an error. Response headers are in either
4716// *Device.ServerResponse.Header or (if a response was returned at all)
4717// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4718// check whether the returned error was because http.StatusNotModified
4719// was returned.
4720func (c *EnterprisesDevicesGetCall) Do(opts ...googleapi.CallOption) (*Device, error) {
4721	gensupport.SetOptions(c.urlParams_, opts...)
4722	res, err := c.doRequest("json")
4723	if res != nil && res.StatusCode == http.StatusNotModified {
4724		if res.Body != nil {
4725			res.Body.Close()
4726		}
4727		return nil, &googleapi.Error{
4728			Code:   res.StatusCode,
4729			Header: res.Header,
4730		}
4731	}
4732	if err != nil {
4733		return nil, err
4734	}
4735	defer googleapi.CloseBody(res)
4736	if err := googleapi.CheckResponse(res); err != nil {
4737		return nil, err
4738	}
4739	ret := &Device{
4740		ServerResponse: googleapi.ServerResponse{
4741			Header:         res.Header,
4742			HTTPStatusCode: res.StatusCode,
4743		},
4744	}
4745	target := &ret
4746	if err := gensupport.DecodeResponse(target, res); err != nil {
4747		return nil, err
4748	}
4749	return ret, nil
4750	// {
4751	//   "description": "Gets a device.",
4752	//   "flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}",
4753	//   "httpMethod": "GET",
4754	//   "id": "androidmanagement.enterprises.devices.get",
4755	//   "parameterOrder": [
4756	//     "name"
4757	//   ],
4758	//   "parameters": {
4759	//     "name": {
4760	//       "description": "The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}.",
4761	//       "location": "path",
4762	//       "pattern": "^enterprises/[^/]+/devices/[^/]+$",
4763	//       "required": true,
4764	//       "type": "string"
4765	//     }
4766	//   },
4767	//   "path": "v1/{+name}",
4768	//   "response": {
4769	//     "$ref": "Device"
4770	//   },
4771	//   "scopes": [
4772	//     "https://www.googleapis.com/auth/androidmanagement"
4773	//   ]
4774	// }
4775
4776}
4777
4778// method id "androidmanagement.enterprises.devices.issueCommand":
4779
4780type EnterprisesDevicesIssueCommandCall struct {
4781	s          *Service
4782	name       string
4783	command    *Command
4784	urlParams_ gensupport.URLParams
4785	ctx_       context.Context
4786	header_    http.Header
4787}
4788
4789// IssueCommand: Issues a command to a device. The Operation resource
4790// returned contains a Command in its metadata field. Use the get
4791// operation method to get the status of the command.
4792func (r *EnterprisesDevicesService) IssueCommand(name string, command *Command) *EnterprisesDevicesIssueCommandCall {
4793	c := &EnterprisesDevicesIssueCommandCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4794	c.name = name
4795	c.command = command
4796	return c
4797}
4798
4799// Fields allows partial responses to be retrieved. See
4800// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4801// for more information.
4802func (c *EnterprisesDevicesIssueCommandCall) Fields(s ...googleapi.Field) *EnterprisesDevicesIssueCommandCall {
4803	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4804	return c
4805}
4806
4807// Context sets the context to be used in this call's Do method. Any
4808// pending HTTP request will be aborted if the provided context is
4809// canceled.
4810func (c *EnterprisesDevicesIssueCommandCall) Context(ctx context.Context) *EnterprisesDevicesIssueCommandCall {
4811	c.ctx_ = ctx
4812	return c
4813}
4814
4815// Header returns an http.Header that can be modified by the caller to
4816// add HTTP headers to the request.
4817func (c *EnterprisesDevicesIssueCommandCall) Header() http.Header {
4818	if c.header_ == nil {
4819		c.header_ = make(http.Header)
4820	}
4821	return c.header_
4822}
4823
4824func (c *EnterprisesDevicesIssueCommandCall) doRequest(alt string) (*http.Response, error) {
4825	reqHeaders := make(http.Header)
4826	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
4827	for k, v := range c.header_ {
4828		reqHeaders[k] = v
4829	}
4830	reqHeaders.Set("User-Agent", c.s.userAgent())
4831	var body io.Reader = nil
4832	body, err := googleapi.WithoutDataWrapper.JSONReader(c.command)
4833	if err != nil {
4834		return nil, err
4835	}
4836	reqHeaders.Set("Content-Type", "application/json")
4837	c.urlParams_.Set("alt", alt)
4838	c.urlParams_.Set("prettyPrint", "false")
4839	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:issueCommand")
4840	urls += "?" + c.urlParams_.Encode()
4841	req, err := http.NewRequest("POST", urls, body)
4842	if err != nil {
4843		return nil, err
4844	}
4845	req.Header = reqHeaders
4846	googleapi.Expand(req.URL, map[string]string{
4847		"name": c.name,
4848	})
4849	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4850}
4851
4852// Do executes the "androidmanagement.enterprises.devices.issueCommand" call.
4853// Exactly one of *Operation or error will be non-nil. Any non-2xx
4854// status code is an error. Response headers are in either
4855// *Operation.ServerResponse.Header or (if a response was returned at
4856// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4857// to check whether the returned error was because
4858// http.StatusNotModified was returned.
4859func (c *EnterprisesDevicesIssueCommandCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4860	gensupport.SetOptions(c.urlParams_, opts...)
4861	res, err := c.doRequest("json")
4862	if res != nil && res.StatusCode == http.StatusNotModified {
4863		if res.Body != nil {
4864			res.Body.Close()
4865		}
4866		return nil, &googleapi.Error{
4867			Code:   res.StatusCode,
4868			Header: res.Header,
4869		}
4870	}
4871	if err != nil {
4872		return nil, err
4873	}
4874	defer googleapi.CloseBody(res)
4875	if err := googleapi.CheckResponse(res); err != nil {
4876		return nil, err
4877	}
4878	ret := &Operation{
4879		ServerResponse: googleapi.ServerResponse{
4880			Header:         res.Header,
4881			HTTPStatusCode: res.StatusCode,
4882		},
4883	}
4884	target := &ret
4885	if err := gensupport.DecodeResponse(target, res); err != nil {
4886		return nil, err
4887	}
4888	return ret, nil
4889	// {
4890	//   "description": "Issues a command to a device. The Operation resource returned contains a Command in its metadata field. Use the get operation method to get the status of the command.",
4891	//   "flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}:issueCommand",
4892	//   "httpMethod": "POST",
4893	//   "id": "androidmanagement.enterprises.devices.issueCommand",
4894	//   "parameterOrder": [
4895	//     "name"
4896	//   ],
4897	//   "parameters": {
4898	//     "name": {
4899	//       "description": "The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}.",
4900	//       "location": "path",
4901	//       "pattern": "^enterprises/[^/]+/devices/[^/]+$",
4902	//       "required": true,
4903	//       "type": "string"
4904	//     }
4905	//   },
4906	//   "path": "v1/{+name}:issueCommand",
4907	//   "request": {
4908	//     "$ref": "Command"
4909	//   },
4910	//   "response": {
4911	//     "$ref": "Operation"
4912	//   },
4913	//   "scopes": [
4914	//     "https://www.googleapis.com/auth/androidmanagement"
4915	//   ]
4916	// }
4917
4918}
4919
4920// method id "androidmanagement.enterprises.devices.list":
4921
4922type EnterprisesDevicesListCall struct {
4923	s            *Service
4924	parent       string
4925	urlParams_   gensupport.URLParams
4926	ifNoneMatch_ string
4927	ctx_         context.Context
4928	header_      http.Header
4929}
4930
4931// List: Lists devices for a given enterprise.
4932func (r *EnterprisesDevicesService) List(parent string) *EnterprisesDevicesListCall {
4933	c := &EnterprisesDevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4934	c.parent = parent
4935	return c
4936}
4937
4938// PageSize sets the optional parameter "pageSize": The requested page
4939// size. The actual page size may be fixed to a min or max value.
4940func (c *EnterprisesDevicesListCall) PageSize(pageSize int64) *EnterprisesDevicesListCall {
4941	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4942	return c
4943}
4944
4945// PageToken sets the optional parameter "pageToken": A token
4946// identifying a page of results returned by the server.
4947func (c *EnterprisesDevicesListCall) PageToken(pageToken string) *EnterprisesDevicesListCall {
4948	c.urlParams_.Set("pageToken", pageToken)
4949	return c
4950}
4951
4952// Fields allows partial responses to be retrieved. See
4953// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4954// for more information.
4955func (c *EnterprisesDevicesListCall) Fields(s ...googleapi.Field) *EnterprisesDevicesListCall {
4956	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4957	return c
4958}
4959
4960// IfNoneMatch sets the optional parameter which makes the operation
4961// fail if the object's ETag matches the given value. This is useful for
4962// getting updates only after the object has changed since the last
4963// request. Use googleapi.IsNotModified to check whether the response
4964// error from Do is the result of In-None-Match.
4965func (c *EnterprisesDevicesListCall) IfNoneMatch(entityTag string) *EnterprisesDevicesListCall {
4966	c.ifNoneMatch_ = entityTag
4967	return c
4968}
4969
4970// Context sets the context to be used in this call's Do method. Any
4971// pending HTTP request will be aborted if the provided context is
4972// canceled.
4973func (c *EnterprisesDevicesListCall) Context(ctx context.Context) *EnterprisesDevicesListCall {
4974	c.ctx_ = ctx
4975	return c
4976}
4977
4978// Header returns an http.Header that can be modified by the caller to
4979// add HTTP headers to the request.
4980func (c *EnterprisesDevicesListCall) Header() http.Header {
4981	if c.header_ == nil {
4982		c.header_ = make(http.Header)
4983	}
4984	return c.header_
4985}
4986
4987func (c *EnterprisesDevicesListCall) doRequest(alt string) (*http.Response, error) {
4988	reqHeaders := make(http.Header)
4989	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
4990	for k, v := range c.header_ {
4991		reqHeaders[k] = v
4992	}
4993	reqHeaders.Set("User-Agent", c.s.userAgent())
4994	if c.ifNoneMatch_ != "" {
4995		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4996	}
4997	var body io.Reader = nil
4998	c.urlParams_.Set("alt", alt)
4999	c.urlParams_.Set("prettyPrint", "false")
5000	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/devices")
5001	urls += "?" + c.urlParams_.Encode()
5002	req, err := http.NewRequest("GET", urls, body)
5003	if err != nil {
5004		return nil, err
5005	}
5006	req.Header = reqHeaders
5007	googleapi.Expand(req.URL, map[string]string{
5008		"parent": c.parent,
5009	})
5010	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5011}
5012
5013// Do executes the "androidmanagement.enterprises.devices.list" call.
5014// Exactly one of *ListDevicesResponse or error will be non-nil. Any
5015// non-2xx status code is an error. Response headers are in either
5016// *ListDevicesResponse.ServerResponse.Header or (if a response was
5017// returned at all) in error.(*googleapi.Error).Header. Use
5018// googleapi.IsNotModified to check whether the returned error was
5019// because http.StatusNotModified was returned.
5020func (c *EnterprisesDevicesListCall) Do(opts ...googleapi.CallOption) (*ListDevicesResponse, error) {
5021	gensupport.SetOptions(c.urlParams_, opts...)
5022	res, err := c.doRequest("json")
5023	if res != nil && res.StatusCode == http.StatusNotModified {
5024		if res.Body != nil {
5025			res.Body.Close()
5026		}
5027		return nil, &googleapi.Error{
5028			Code:   res.StatusCode,
5029			Header: res.Header,
5030		}
5031	}
5032	if err != nil {
5033		return nil, err
5034	}
5035	defer googleapi.CloseBody(res)
5036	if err := googleapi.CheckResponse(res); err != nil {
5037		return nil, err
5038	}
5039	ret := &ListDevicesResponse{
5040		ServerResponse: googleapi.ServerResponse{
5041			Header:         res.Header,
5042			HTTPStatusCode: res.StatusCode,
5043		},
5044	}
5045	target := &ret
5046	if err := gensupport.DecodeResponse(target, res); err != nil {
5047		return nil, err
5048	}
5049	return ret, nil
5050	// {
5051	//   "description": "Lists devices for a given enterprise.",
5052	//   "flatPath": "v1/enterprises/{enterprisesId}/devices",
5053	//   "httpMethod": "GET",
5054	//   "id": "androidmanagement.enterprises.devices.list",
5055	//   "parameterOrder": [
5056	//     "parent"
5057	//   ],
5058	//   "parameters": {
5059	//     "pageSize": {
5060	//       "description": "The requested page size. The actual page size may be fixed to a min or max value.",
5061	//       "format": "int32",
5062	//       "location": "query",
5063	//       "type": "integer"
5064	//     },
5065	//     "pageToken": {
5066	//       "description": "A token identifying a page of results returned by the server.",
5067	//       "location": "query",
5068	//       "type": "string"
5069	//     },
5070	//     "parent": {
5071	//       "description": "The name of the enterprise in the form enterprises/{enterpriseId}.",
5072	//       "location": "path",
5073	//       "pattern": "^enterprises/[^/]+$",
5074	//       "required": true,
5075	//       "type": "string"
5076	//     }
5077	//   },
5078	//   "path": "v1/{+parent}/devices",
5079	//   "response": {
5080	//     "$ref": "ListDevicesResponse"
5081	//   },
5082	//   "scopes": [
5083	//     "https://www.googleapis.com/auth/androidmanagement"
5084	//   ]
5085	// }
5086
5087}
5088
5089// Pages invokes f for each page of results.
5090// A non-nil error returned from f will halt the iteration.
5091// The provided context supersedes any context provided to the Context method.
5092func (c *EnterprisesDevicesListCall) Pages(ctx context.Context, f func(*ListDevicesResponse) error) error {
5093	c.ctx_ = ctx
5094	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5095	for {
5096		x, err := c.Do()
5097		if err != nil {
5098			return err
5099		}
5100		if err := f(x); err != nil {
5101			return err
5102		}
5103		if x.NextPageToken == "" {
5104			return nil
5105		}
5106		c.PageToken(x.NextPageToken)
5107	}
5108}
5109
5110// method id "androidmanagement.enterprises.devices.patch":
5111
5112type EnterprisesDevicesPatchCall struct {
5113	s          *Service
5114	name       string
5115	device     *Device
5116	urlParams_ gensupport.URLParams
5117	ctx_       context.Context
5118	header_    http.Header
5119}
5120
5121// Patch: Updates a device.
5122func (r *EnterprisesDevicesService) Patch(name string, device *Device) *EnterprisesDevicesPatchCall {
5123	c := &EnterprisesDevicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5124	c.name = name
5125	c.device = device
5126	return c
5127}
5128
5129// UpdateMask sets the optional parameter "updateMask": The field mask
5130// indicating the fields to update. If not set, all modifiable fields
5131// will be modified.
5132func (c *EnterprisesDevicesPatchCall) UpdateMask(updateMask string) *EnterprisesDevicesPatchCall {
5133	c.urlParams_.Set("updateMask", updateMask)
5134	return c
5135}
5136
5137// Fields allows partial responses to be retrieved. See
5138// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5139// for more information.
5140func (c *EnterprisesDevicesPatchCall) Fields(s ...googleapi.Field) *EnterprisesDevicesPatchCall {
5141	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5142	return c
5143}
5144
5145// Context sets the context to be used in this call's Do method. Any
5146// pending HTTP request will be aborted if the provided context is
5147// canceled.
5148func (c *EnterprisesDevicesPatchCall) Context(ctx context.Context) *EnterprisesDevicesPatchCall {
5149	c.ctx_ = ctx
5150	return c
5151}
5152
5153// Header returns an http.Header that can be modified by the caller to
5154// add HTTP headers to the request.
5155func (c *EnterprisesDevicesPatchCall) Header() http.Header {
5156	if c.header_ == nil {
5157		c.header_ = make(http.Header)
5158	}
5159	return c.header_
5160}
5161
5162func (c *EnterprisesDevicesPatchCall) doRequest(alt string) (*http.Response, error) {
5163	reqHeaders := make(http.Header)
5164	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
5165	for k, v := range c.header_ {
5166		reqHeaders[k] = v
5167	}
5168	reqHeaders.Set("User-Agent", c.s.userAgent())
5169	var body io.Reader = nil
5170	body, err := googleapi.WithoutDataWrapper.JSONReader(c.device)
5171	if err != nil {
5172		return nil, err
5173	}
5174	reqHeaders.Set("Content-Type", "application/json")
5175	c.urlParams_.Set("alt", alt)
5176	c.urlParams_.Set("prettyPrint", "false")
5177	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5178	urls += "?" + c.urlParams_.Encode()
5179	req, err := http.NewRequest("PATCH", urls, body)
5180	if err != nil {
5181		return nil, err
5182	}
5183	req.Header = reqHeaders
5184	googleapi.Expand(req.URL, map[string]string{
5185		"name": c.name,
5186	})
5187	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5188}
5189
5190// Do executes the "androidmanagement.enterprises.devices.patch" call.
5191// Exactly one of *Device or error will be non-nil. Any non-2xx status
5192// code is an error. Response headers are in either
5193// *Device.ServerResponse.Header or (if a response was returned at all)
5194// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5195// check whether the returned error was because http.StatusNotModified
5196// was returned.
5197func (c *EnterprisesDevicesPatchCall) Do(opts ...googleapi.CallOption) (*Device, error) {
5198	gensupport.SetOptions(c.urlParams_, opts...)
5199	res, err := c.doRequest("json")
5200	if res != nil && res.StatusCode == http.StatusNotModified {
5201		if res.Body != nil {
5202			res.Body.Close()
5203		}
5204		return nil, &googleapi.Error{
5205			Code:   res.StatusCode,
5206			Header: res.Header,
5207		}
5208	}
5209	if err != nil {
5210		return nil, err
5211	}
5212	defer googleapi.CloseBody(res)
5213	if err := googleapi.CheckResponse(res); err != nil {
5214		return nil, err
5215	}
5216	ret := &Device{
5217		ServerResponse: googleapi.ServerResponse{
5218			Header:         res.Header,
5219			HTTPStatusCode: res.StatusCode,
5220		},
5221	}
5222	target := &ret
5223	if err := gensupport.DecodeResponse(target, res); err != nil {
5224		return nil, err
5225	}
5226	return ret, nil
5227	// {
5228	//   "description": "Updates a device.",
5229	//   "flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}",
5230	//   "httpMethod": "PATCH",
5231	//   "id": "androidmanagement.enterprises.devices.patch",
5232	//   "parameterOrder": [
5233	//     "name"
5234	//   ],
5235	//   "parameters": {
5236	//     "name": {
5237	//       "description": "The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}.",
5238	//       "location": "path",
5239	//       "pattern": "^enterprises/[^/]+/devices/[^/]+$",
5240	//       "required": true,
5241	//       "type": "string"
5242	//     },
5243	//     "updateMask": {
5244	//       "description": "The field mask indicating the fields to update. If not set, all modifiable fields will be modified.",
5245	//       "format": "google-fieldmask",
5246	//       "location": "query",
5247	//       "type": "string"
5248	//     }
5249	//   },
5250	//   "path": "v1/{+name}",
5251	//   "request": {
5252	//     "$ref": "Device"
5253	//   },
5254	//   "response": {
5255	//     "$ref": "Device"
5256	//   },
5257	//   "scopes": [
5258	//     "https://www.googleapis.com/auth/androidmanagement"
5259	//   ]
5260	// }
5261
5262}
5263
5264// method id "androidmanagement.enterprises.devices.operations.cancel":
5265
5266type EnterprisesDevicesOperationsCancelCall struct {
5267	s          *Service
5268	name       string
5269	urlParams_ gensupport.URLParams
5270	ctx_       context.Context
5271	header_    http.Header
5272}
5273
5274// Cancel: Starts asynchronous cancellation on a long-running operation.
5275// The server makes a best effort to cancel the operation, but success
5276// is not guaranteed. If the server doesn't support this method, it
5277// returns google.rpc.Code.UNIMPLEMENTED. Clients can use
5278// Operations.GetOperation or other methods to check whether the
5279// cancellation succeeded or whether the operation completed despite
5280// cancellation. On successful cancellation, the operation is not
5281// deleted; instead, it becomes an operation with an Operation.error
5282// value with a google.rpc.Status.code of 1, corresponding to
5283// Code.CANCELLED.
5284func (r *EnterprisesDevicesOperationsService) Cancel(name string) *EnterprisesDevicesOperationsCancelCall {
5285	c := &EnterprisesDevicesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5286	c.name = name
5287	return c
5288}
5289
5290// Fields allows partial responses to be retrieved. See
5291// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5292// for more information.
5293func (c *EnterprisesDevicesOperationsCancelCall) Fields(s ...googleapi.Field) *EnterprisesDevicesOperationsCancelCall {
5294	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5295	return c
5296}
5297
5298// Context sets the context to be used in this call's Do method. Any
5299// pending HTTP request will be aborted if the provided context is
5300// canceled.
5301func (c *EnterprisesDevicesOperationsCancelCall) Context(ctx context.Context) *EnterprisesDevicesOperationsCancelCall {
5302	c.ctx_ = ctx
5303	return c
5304}
5305
5306// Header returns an http.Header that can be modified by the caller to
5307// add HTTP headers to the request.
5308func (c *EnterprisesDevicesOperationsCancelCall) Header() http.Header {
5309	if c.header_ == nil {
5310		c.header_ = make(http.Header)
5311	}
5312	return c.header_
5313}
5314
5315func (c *EnterprisesDevicesOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
5316	reqHeaders := make(http.Header)
5317	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
5318	for k, v := range c.header_ {
5319		reqHeaders[k] = v
5320	}
5321	reqHeaders.Set("User-Agent", c.s.userAgent())
5322	var body io.Reader = nil
5323	c.urlParams_.Set("alt", alt)
5324	c.urlParams_.Set("prettyPrint", "false")
5325	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
5326	urls += "?" + c.urlParams_.Encode()
5327	req, err := http.NewRequest("POST", urls, body)
5328	if err != nil {
5329		return nil, err
5330	}
5331	req.Header = reqHeaders
5332	googleapi.Expand(req.URL, map[string]string{
5333		"name": c.name,
5334	})
5335	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5336}
5337
5338// Do executes the "androidmanagement.enterprises.devices.operations.cancel" call.
5339// Exactly one of *Empty or error will be non-nil. Any non-2xx status
5340// code is an error. Response headers are in either
5341// *Empty.ServerResponse.Header or (if a response was returned at all)
5342// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5343// check whether the returned error was because http.StatusNotModified
5344// was returned.
5345func (c *EnterprisesDevicesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5346	gensupport.SetOptions(c.urlParams_, opts...)
5347	res, err := c.doRequest("json")
5348	if res != nil && res.StatusCode == http.StatusNotModified {
5349		if res.Body != nil {
5350			res.Body.Close()
5351		}
5352		return nil, &googleapi.Error{
5353			Code:   res.StatusCode,
5354			Header: res.Header,
5355		}
5356	}
5357	if err != nil {
5358		return nil, err
5359	}
5360	defer googleapi.CloseBody(res)
5361	if err := googleapi.CheckResponse(res); err != nil {
5362		return nil, err
5363	}
5364	ret := &Empty{
5365		ServerResponse: googleapi.ServerResponse{
5366			Header:         res.Header,
5367			HTTPStatusCode: res.StatusCode,
5368		},
5369	}
5370	target := &ret
5371	if err := gensupport.DecodeResponse(target, res); err != nil {
5372		return nil, err
5373	}
5374	return ret, nil
5375	// {
5376	//   "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.",
5377	//   "flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}/operations/{operationsId}:cancel",
5378	//   "httpMethod": "POST",
5379	//   "id": "androidmanagement.enterprises.devices.operations.cancel",
5380	//   "parameterOrder": [
5381	//     "name"
5382	//   ],
5383	//   "parameters": {
5384	//     "name": {
5385	//       "description": "The name of the operation resource to be cancelled.",
5386	//       "location": "path",
5387	//       "pattern": "^enterprises/[^/]+/devices/[^/]+/operations/[^/]+$",
5388	//       "required": true,
5389	//       "type": "string"
5390	//     }
5391	//   },
5392	//   "path": "v1/{+name}:cancel",
5393	//   "response": {
5394	//     "$ref": "Empty"
5395	//   },
5396	//   "scopes": [
5397	//     "https://www.googleapis.com/auth/androidmanagement"
5398	//   ]
5399	// }
5400
5401}
5402
5403// method id "androidmanagement.enterprises.devices.operations.delete":
5404
5405type EnterprisesDevicesOperationsDeleteCall struct {
5406	s          *Service
5407	name       string
5408	urlParams_ gensupport.URLParams
5409	ctx_       context.Context
5410	header_    http.Header
5411}
5412
5413// Delete: Deletes a long-running operation. This method indicates that
5414// the client is no longer interested in the operation result. It does
5415// not cancel the operation. If the server doesn't support this method,
5416// it returns google.rpc.Code.UNIMPLEMENTED.
5417func (r *EnterprisesDevicesOperationsService) Delete(name string) *EnterprisesDevicesOperationsDeleteCall {
5418	c := &EnterprisesDevicesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5419	c.name = name
5420	return c
5421}
5422
5423// Fields allows partial responses to be retrieved. See
5424// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5425// for more information.
5426func (c *EnterprisesDevicesOperationsDeleteCall) Fields(s ...googleapi.Field) *EnterprisesDevicesOperationsDeleteCall {
5427	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5428	return c
5429}
5430
5431// Context sets the context to be used in this call's Do method. Any
5432// pending HTTP request will be aborted if the provided context is
5433// canceled.
5434func (c *EnterprisesDevicesOperationsDeleteCall) Context(ctx context.Context) *EnterprisesDevicesOperationsDeleteCall {
5435	c.ctx_ = ctx
5436	return c
5437}
5438
5439// Header returns an http.Header that can be modified by the caller to
5440// add HTTP headers to the request.
5441func (c *EnterprisesDevicesOperationsDeleteCall) Header() http.Header {
5442	if c.header_ == nil {
5443		c.header_ = make(http.Header)
5444	}
5445	return c.header_
5446}
5447
5448func (c *EnterprisesDevicesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
5449	reqHeaders := make(http.Header)
5450	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
5451	for k, v := range c.header_ {
5452		reqHeaders[k] = v
5453	}
5454	reqHeaders.Set("User-Agent", c.s.userAgent())
5455	var body io.Reader = nil
5456	c.urlParams_.Set("alt", alt)
5457	c.urlParams_.Set("prettyPrint", "false")
5458	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5459	urls += "?" + c.urlParams_.Encode()
5460	req, err := http.NewRequest("DELETE", urls, body)
5461	if err != nil {
5462		return nil, err
5463	}
5464	req.Header = reqHeaders
5465	googleapi.Expand(req.URL, map[string]string{
5466		"name": c.name,
5467	})
5468	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5469}
5470
5471// Do executes the "androidmanagement.enterprises.devices.operations.delete" call.
5472// Exactly one of *Empty or error will be non-nil. Any non-2xx status
5473// code is an error. Response headers are in either
5474// *Empty.ServerResponse.Header or (if a response was returned at all)
5475// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5476// check whether the returned error was because http.StatusNotModified
5477// was returned.
5478func (c *EnterprisesDevicesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5479	gensupport.SetOptions(c.urlParams_, opts...)
5480	res, err := c.doRequest("json")
5481	if res != nil && res.StatusCode == http.StatusNotModified {
5482		if res.Body != nil {
5483			res.Body.Close()
5484		}
5485		return nil, &googleapi.Error{
5486			Code:   res.StatusCode,
5487			Header: res.Header,
5488		}
5489	}
5490	if err != nil {
5491		return nil, err
5492	}
5493	defer googleapi.CloseBody(res)
5494	if err := googleapi.CheckResponse(res); err != nil {
5495		return nil, err
5496	}
5497	ret := &Empty{
5498		ServerResponse: googleapi.ServerResponse{
5499			Header:         res.Header,
5500			HTTPStatusCode: res.StatusCode,
5501		},
5502	}
5503	target := &ret
5504	if err := gensupport.DecodeResponse(target, res); err != nil {
5505		return nil, err
5506	}
5507	return ret, nil
5508	// {
5509	//   "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.",
5510	//   "flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}/operations/{operationsId}",
5511	//   "httpMethod": "DELETE",
5512	//   "id": "androidmanagement.enterprises.devices.operations.delete",
5513	//   "parameterOrder": [
5514	//     "name"
5515	//   ],
5516	//   "parameters": {
5517	//     "name": {
5518	//       "description": "The name of the operation resource to be deleted.",
5519	//       "location": "path",
5520	//       "pattern": "^enterprises/[^/]+/devices/[^/]+/operations/[^/]+$",
5521	//       "required": true,
5522	//       "type": "string"
5523	//     }
5524	//   },
5525	//   "path": "v1/{+name}",
5526	//   "response": {
5527	//     "$ref": "Empty"
5528	//   },
5529	//   "scopes": [
5530	//     "https://www.googleapis.com/auth/androidmanagement"
5531	//   ]
5532	// }
5533
5534}
5535
5536// method id "androidmanagement.enterprises.devices.operations.get":
5537
5538type EnterprisesDevicesOperationsGetCall struct {
5539	s            *Service
5540	name         string
5541	urlParams_   gensupport.URLParams
5542	ifNoneMatch_ string
5543	ctx_         context.Context
5544	header_      http.Header
5545}
5546
5547// Get: Gets the latest state of a long-running operation. Clients can
5548// use this method to poll the operation result at intervals as
5549// recommended by the API service.
5550func (r *EnterprisesDevicesOperationsService) Get(name string) *EnterprisesDevicesOperationsGetCall {
5551	c := &EnterprisesDevicesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5552	c.name = name
5553	return c
5554}
5555
5556// Fields allows partial responses to be retrieved. See
5557// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5558// for more information.
5559func (c *EnterprisesDevicesOperationsGetCall) Fields(s ...googleapi.Field) *EnterprisesDevicesOperationsGetCall {
5560	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5561	return c
5562}
5563
5564// IfNoneMatch sets the optional parameter which makes the operation
5565// fail if the object's ETag matches the given value. This is useful for
5566// getting updates only after the object has changed since the last
5567// request. Use googleapi.IsNotModified to check whether the response
5568// error from Do is the result of In-None-Match.
5569func (c *EnterprisesDevicesOperationsGetCall) IfNoneMatch(entityTag string) *EnterprisesDevicesOperationsGetCall {
5570	c.ifNoneMatch_ = entityTag
5571	return c
5572}
5573
5574// Context sets the context to be used in this call's Do method. Any
5575// pending HTTP request will be aborted if the provided context is
5576// canceled.
5577func (c *EnterprisesDevicesOperationsGetCall) Context(ctx context.Context) *EnterprisesDevicesOperationsGetCall {
5578	c.ctx_ = ctx
5579	return c
5580}
5581
5582// Header returns an http.Header that can be modified by the caller to
5583// add HTTP headers to the request.
5584func (c *EnterprisesDevicesOperationsGetCall) Header() http.Header {
5585	if c.header_ == nil {
5586		c.header_ = make(http.Header)
5587	}
5588	return c.header_
5589}
5590
5591func (c *EnterprisesDevicesOperationsGetCall) doRequest(alt string) (*http.Response, error) {
5592	reqHeaders := make(http.Header)
5593	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
5594	for k, v := range c.header_ {
5595		reqHeaders[k] = v
5596	}
5597	reqHeaders.Set("User-Agent", c.s.userAgent())
5598	if c.ifNoneMatch_ != "" {
5599		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5600	}
5601	var body io.Reader = nil
5602	c.urlParams_.Set("alt", alt)
5603	c.urlParams_.Set("prettyPrint", "false")
5604	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5605	urls += "?" + c.urlParams_.Encode()
5606	req, err := http.NewRequest("GET", urls, body)
5607	if err != nil {
5608		return nil, err
5609	}
5610	req.Header = reqHeaders
5611	googleapi.Expand(req.URL, map[string]string{
5612		"name": c.name,
5613	})
5614	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5615}
5616
5617// Do executes the "androidmanagement.enterprises.devices.operations.get" call.
5618// Exactly one of *Operation or error will be non-nil. Any non-2xx
5619// status code is an error. Response headers are in either
5620// *Operation.ServerResponse.Header or (if a response was returned at
5621// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5622// to check whether the returned error was because
5623// http.StatusNotModified was returned.
5624func (c *EnterprisesDevicesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5625	gensupport.SetOptions(c.urlParams_, opts...)
5626	res, err := c.doRequest("json")
5627	if res != nil && res.StatusCode == http.StatusNotModified {
5628		if res.Body != nil {
5629			res.Body.Close()
5630		}
5631		return nil, &googleapi.Error{
5632			Code:   res.StatusCode,
5633			Header: res.Header,
5634		}
5635	}
5636	if err != nil {
5637		return nil, err
5638	}
5639	defer googleapi.CloseBody(res)
5640	if err := googleapi.CheckResponse(res); err != nil {
5641		return nil, err
5642	}
5643	ret := &Operation{
5644		ServerResponse: googleapi.ServerResponse{
5645			Header:         res.Header,
5646			HTTPStatusCode: res.StatusCode,
5647		},
5648	}
5649	target := &ret
5650	if err := gensupport.DecodeResponse(target, res); err != nil {
5651		return nil, err
5652	}
5653	return ret, nil
5654	// {
5655	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
5656	//   "flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}/operations/{operationsId}",
5657	//   "httpMethod": "GET",
5658	//   "id": "androidmanagement.enterprises.devices.operations.get",
5659	//   "parameterOrder": [
5660	//     "name"
5661	//   ],
5662	//   "parameters": {
5663	//     "name": {
5664	//       "description": "The name of the operation resource.",
5665	//       "location": "path",
5666	//       "pattern": "^enterprises/[^/]+/devices/[^/]+/operations/[^/]+$",
5667	//       "required": true,
5668	//       "type": "string"
5669	//     }
5670	//   },
5671	//   "path": "v1/{+name}",
5672	//   "response": {
5673	//     "$ref": "Operation"
5674	//   },
5675	//   "scopes": [
5676	//     "https://www.googleapis.com/auth/androidmanagement"
5677	//   ]
5678	// }
5679
5680}
5681
5682// method id "androidmanagement.enterprises.devices.operations.list":
5683
5684type EnterprisesDevicesOperationsListCall struct {
5685	s            *Service
5686	name         string
5687	urlParams_   gensupport.URLParams
5688	ifNoneMatch_ string
5689	ctx_         context.Context
5690	header_      http.Header
5691}
5692
5693// List: Lists operations that match the specified filter in the
5694// request. If the server doesn't support this method, it returns
5695// UNIMPLEMENTED.NOTE: the name binding allows API services to override
5696// the binding to use different resource name schemes, such as
5697// users/*/operations. To override the binding, API services can add a
5698// binding such as "/v1/{name=users/*}/operations" to their service
5699// configuration. For backwards compatibility, the default name includes
5700// the operations collection id, however overriding users must ensure
5701// the name binding is the parent resource, without the operations
5702// collection id.
5703func (r *EnterprisesDevicesOperationsService) List(name string) *EnterprisesDevicesOperationsListCall {
5704	c := &EnterprisesDevicesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5705	c.name = name
5706	return c
5707}
5708
5709// Filter sets the optional parameter "filter": The standard list
5710// filter.
5711func (c *EnterprisesDevicesOperationsListCall) Filter(filter string) *EnterprisesDevicesOperationsListCall {
5712	c.urlParams_.Set("filter", filter)
5713	return c
5714}
5715
5716// PageSize sets the optional parameter "pageSize": The standard list
5717// page size.
5718func (c *EnterprisesDevicesOperationsListCall) PageSize(pageSize int64) *EnterprisesDevicesOperationsListCall {
5719	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5720	return c
5721}
5722
5723// PageToken sets the optional parameter "pageToken": The standard list
5724// page token.
5725func (c *EnterprisesDevicesOperationsListCall) PageToken(pageToken string) *EnterprisesDevicesOperationsListCall {
5726	c.urlParams_.Set("pageToken", pageToken)
5727	return c
5728}
5729
5730// Fields allows partial responses to be retrieved. See
5731// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5732// for more information.
5733func (c *EnterprisesDevicesOperationsListCall) Fields(s ...googleapi.Field) *EnterprisesDevicesOperationsListCall {
5734	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5735	return c
5736}
5737
5738// IfNoneMatch sets the optional parameter which makes the operation
5739// fail if the object's ETag matches the given value. This is useful for
5740// getting updates only after the object has changed since the last
5741// request. Use googleapi.IsNotModified to check whether the response
5742// error from Do is the result of In-None-Match.
5743func (c *EnterprisesDevicesOperationsListCall) IfNoneMatch(entityTag string) *EnterprisesDevicesOperationsListCall {
5744	c.ifNoneMatch_ = entityTag
5745	return c
5746}
5747
5748// Context sets the context to be used in this call's Do method. Any
5749// pending HTTP request will be aborted if the provided context is
5750// canceled.
5751func (c *EnterprisesDevicesOperationsListCall) Context(ctx context.Context) *EnterprisesDevicesOperationsListCall {
5752	c.ctx_ = ctx
5753	return c
5754}
5755
5756// Header returns an http.Header that can be modified by the caller to
5757// add HTTP headers to the request.
5758func (c *EnterprisesDevicesOperationsListCall) Header() http.Header {
5759	if c.header_ == nil {
5760		c.header_ = make(http.Header)
5761	}
5762	return c.header_
5763}
5764
5765func (c *EnterprisesDevicesOperationsListCall) doRequest(alt string) (*http.Response, error) {
5766	reqHeaders := make(http.Header)
5767	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
5768	for k, v := range c.header_ {
5769		reqHeaders[k] = v
5770	}
5771	reqHeaders.Set("User-Agent", c.s.userAgent())
5772	if c.ifNoneMatch_ != "" {
5773		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5774	}
5775	var body io.Reader = nil
5776	c.urlParams_.Set("alt", alt)
5777	c.urlParams_.Set("prettyPrint", "false")
5778	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5779	urls += "?" + c.urlParams_.Encode()
5780	req, err := http.NewRequest("GET", urls, body)
5781	if err != nil {
5782		return nil, err
5783	}
5784	req.Header = reqHeaders
5785	googleapi.Expand(req.URL, map[string]string{
5786		"name": c.name,
5787	})
5788	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5789}
5790
5791// Do executes the "androidmanagement.enterprises.devices.operations.list" call.
5792// Exactly one of *ListOperationsResponse or error will be non-nil. Any
5793// non-2xx status code is an error. Response headers are in either
5794// *ListOperationsResponse.ServerResponse.Header or (if a response was
5795// returned at all) in error.(*googleapi.Error).Header. Use
5796// googleapi.IsNotModified to check whether the returned error was
5797// because http.StatusNotModified was returned.
5798func (c *EnterprisesDevicesOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
5799	gensupport.SetOptions(c.urlParams_, opts...)
5800	res, err := c.doRequest("json")
5801	if res != nil && res.StatusCode == http.StatusNotModified {
5802		if res.Body != nil {
5803			res.Body.Close()
5804		}
5805		return nil, &googleapi.Error{
5806			Code:   res.StatusCode,
5807			Header: res.Header,
5808		}
5809	}
5810	if err != nil {
5811		return nil, err
5812	}
5813	defer googleapi.CloseBody(res)
5814	if err := googleapi.CheckResponse(res); err != nil {
5815		return nil, err
5816	}
5817	ret := &ListOperationsResponse{
5818		ServerResponse: googleapi.ServerResponse{
5819			Header:         res.Header,
5820			HTTPStatusCode: res.StatusCode,
5821		},
5822	}
5823	target := &ret
5824	if err := gensupport.DecodeResponse(target, res); err != nil {
5825		return nil, err
5826	}
5827	return ret, nil
5828	// {
5829	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
5830	//   "flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}/operations",
5831	//   "httpMethod": "GET",
5832	//   "id": "androidmanagement.enterprises.devices.operations.list",
5833	//   "parameterOrder": [
5834	//     "name"
5835	//   ],
5836	//   "parameters": {
5837	//     "filter": {
5838	//       "description": "The standard list filter.",
5839	//       "location": "query",
5840	//       "type": "string"
5841	//     },
5842	//     "name": {
5843	//       "description": "The name of the operation's parent resource.",
5844	//       "location": "path",
5845	//       "pattern": "^enterprises/[^/]+/devices/[^/]+/operations$",
5846	//       "required": true,
5847	//       "type": "string"
5848	//     },
5849	//     "pageSize": {
5850	//       "description": "The standard list page size.",
5851	//       "format": "int32",
5852	//       "location": "query",
5853	//       "type": "integer"
5854	//     },
5855	//     "pageToken": {
5856	//       "description": "The standard list page token.",
5857	//       "location": "query",
5858	//       "type": "string"
5859	//     }
5860	//   },
5861	//   "path": "v1/{+name}",
5862	//   "response": {
5863	//     "$ref": "ListOperationsResponse"
5864	//   },
5865	//   "scopes": [
5866	//     "https://www.googleapis.com/auth/androidmanagement"
5867	//   ]
5868	// }
5869
5870}
5871
5872// Pages invokes f for each page of results.
5873// A non-nil error returned from f will halt the iteration.
5874// The provided context supersedes any context provided to the Context method.
5875func (c *EnterprisesDevicesOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
5876	c.ctx_ = ctx
5877	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5878	for {
5879		x, err := c.Do()
5880		if err != nil {
5881			return err
5882		}
5883		if err := f(x); err != nil {
5884			return err
5885		}
5886		if x.NextPageToken == "" {
5887			return nil
5888		}
5889		c.PageToken(x.NextPageToken)
5890	}
5891}
5892
5893// method id "androidmanagement.enterprises.enrollmentTokens.create":
5894
5895type EnterprisesEnrollmentTokensCreateCall struct {
5896	s               *Service
5897	parent          string
5898	enrollmenttoken *EnrollmentToken
5899	urlParams_      gensupport.URLParams
5900	ctx_            context.Context
5901	header_         http.Header
5902}
5903
5904// Create: Creates an enrollment token for a given enterprise.
5905func (r *EnterprisesEnrollmentTokensService) Create(parent string, enrollmenttoken *EnrollmentToken) *EnterprisesEnrollmentTokensCreateCall {
5906	c := &EnterprisesEnrollmentTokensCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5907	c.parent = parent
5908	c.enrollmenttoken = enrollmenttoken
5909	return c
5910}
5911
5912// Fields allows partial responses to be retrieved. See
5913// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5914// for more information.
5915func (c *EnterprisesEnrollmentTokensCreateCall) Fields(s ...googleapi.Field) *EnterprisesEnrollmentTokensCreateCall {
5916	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5917	return c
5918}
5919
5920// Context sets the context to be used in this call's Do method. Any
5921// pending HTTP request will be aborted if the provided context is
5922// canceled.
5923func (c *EnterprisesEnrollmentTokensCreateCall) Context(ctx context.Context) *EnterprisesEnrollmentTokensCreateCall {
5924	c.ctx_ = ctx
5925	return c
5926}
5927
5928// Header returns an http.Header that can be modified by the caller to
5929// add HTTP headers to the request.
5930func (c *EnterprisesEnrollmentTokensCreateCall) Header() http.Header {
5931	if c.header_ == nil {
5932		c.header_ = make(http.Header)
5933	}
5934	return c.header_
5935}
5936
5937func (c *EnterprisesEnrollmentTokensCreateCall) doRequest(alt string) (*http.Response, error) {
5938	reqHeaders := make(http.Header)
5939	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
5940	for k, v := range c.header_ {
5941		reqHeaders[k] = v
5942	}
5943	reqHeaders.Set("User-Agent", c.s.userAgent())
5944	var body io.Reader = nil
5945	body, err := googleapi.WithoutDataWrapper.JSONReader(c.enrollmenttoken)
5946	if err != nil {
5947		return nil, err
5948	}
5949	reqHeaders.Set("Content-Type", "application/json")
5950	c.urlParams_.Set("alt", alt)
5951	c.urlParams_.Set("prettyPrint", "false")
5952	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/enrollmentTokens")
5953	urls += "?" + c.urlParams_.Encode()
5954	req, err := http.NewRequest("POST", urls, body)
5955	if err != nil {
5956		return nil, err
5957	}
5958	req.Header = reqHeaders
5959	googleapi.Expand(req.URL, map[string]string{
5960		"parent": c.parent,
5961	})
5962	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5963}
5964
5965// Do executes the "androidmanagement.enterprises.enrollmentTokens.create" call.
5966// Exactly one of *EnrollmentToken or error will be non-nil. Any non-2xx
5967// status code is an error. Response headers are in either
5968// *EnrollmentToken.ServerResponse.Header or (if a response was returned
5969// at all) in error.(*googleapi.Error).Header. Use
5970// googleapi.IsNotModified to check whether the returned error was
5971// because http.StatusNotModified was returned.
5972func (c *EnterprisesEnrollmentTokensCreateCall) Do(opts ...googleapi.CallOption) (*EnrollmentToken, error) {
5973	gensupport.SetOptions(c.urlParams_, opts...)
5974	res, err := c.doRequest("json")
5975	if res != nil && res.StatusCode == http.StatusNotModified {
5976		if res.Body != nil {
5977			res.Body.Close()
5978		}
5979		return nil, &googleapi.Error{
5980			Code:   res.StatusCode,
5981			Header: res.Header,
5982		}
5983	}
5984	if err != nil {
5985		return nil, err
5986	}
5987	defer googleapi.CloseBody(res)
5988	if err := googleapi.CheckResponse(res); err != nil {
5989		return nil, err
5990	}
5991	ret := &EnrollmentToken{
5992		ServerResponse: googleapi.ServerResponse{
5993			Header:         res.Header,
5994			HTTPStatusCode: res.StatusCode,
5995		},
5996	}
5997	target := &ret
5998	if err := gensupport.DecodeResponse(target, res); err != nil {
5999		return nil, err
6000	}
6001	return ret, nil
6002	// {
6003	//   "description": "Creates an enrollment token for a given enterprise.",
6004	//   "flatPath": "v1/enterprises/{enterprisesId}/enrollmentTokens",
6005	//   "httpMethod": "POST",
6006	//   "id": "androidmanagement.enterprises.enrollmentTokens.create",
6007	//   "parameterOrder": [
6008	//     "parent"
6009	//   ],
6010	//   "parameters": {
6011	//     "parent": {
6012	//       "description": "The name of the enterprise in the form enterprises/{enterpriseId}.",
6013	//       "location": "path",
6014	//       "pattern": "^enterprises/[^/]+$",
6015	//       "required": true,
6016	//       "type": "string"
6017	//     }
6018	//   },
6019	//   "path": "v1/{+parent}/enrollmentTokens",
6020	//   "request": {
6021	//     "$ref": "EnrollmentToken"
6022	//   },
6023	//   "response": {
6024	//     "$ref": "EnrollmentToken"
6025	//   },
6026	//   "scopes": [
6027	//     "https://www.googleapis.com/auth/androidmanagement"
6028	//   ]
6029	// }
6030
6031}
6032
6033// method id "androidmanagement.enterprises.enrollmentTokens.delete":
6034
6035type EnterprisesEnrollmentTokensDeleteCall struct {
6036	s          *Service
6037	name       string
6038	urlParams_ gensupport.URLParams
6039	ctx_       context.Context
6040	header_    http.Header
6041}
6042
6043// Delete: Deletes an enrollment token. This operation invalidates the
6044// token, preventing its future use.
6045func (r *EnterprisesEnrollmentTokensService) Delete(name string) *EnterprisesEnrollmentTokensDeleteCall {
6046	c := &EnterprisesEnrollmentTokensDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6047	c.name = name
6048	return c
6049}
6050
6051// Fields allows partial responses to be retrieved. See
6052// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6053// for more information.
6054func (c *EnterprisesEnrollmentTokensDeleteCall) Fields(s ...googleapi.Field) *EnterprisesEnrollmentTokensDeleteCall {
6055	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6056	return c
6057}
6058
6059// Context sets the context to be used in this call's Do method. Any
6060// pending HTTP request will be aborted if the provided context is
6061// canceled.
6062func (c *EnterprisesEnrollmentTokensDeleteCall) Context(ctx context.Context) *EnterprisesEnrollmentTokensDeleteCall {
6063	c.ctx_ = ctx
6064	return c
6065}
6066
6067// Header returns an http.Header that can be modified by the caller to
6068// add HTTP headers to the request.
6069func (c *EnterprisesEnrollmentTokensDeleteCall) Header() http.Header {
6070	if c.header_ == nil {
6071		c.header_ = make(http.Header)
6072	}
6073	return c.header_
6074}
6075
6076func (c *EnterprisesEnrollmentTokensDeleteCall) doRequest(alt string) (*http.Response, error) {
6077	reqHeaders := make(http.Header)
6078	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
6079	for k, v := range c.header_ {
6080		reqHeaders[k] = v
6081	}
6082	reqHeaders.Set("User-Agent", c.s.userAgent())
6083	var body io.Reader = nil
6084	c.urlParams_.Set("alt", alt)
6085	c.urlParams_.Set("prettyPrint", "false")
6086	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6087	urls += "?" + c.urlParams_.Encode()
6088	req, err := http.NewRequest("DELETE", urls, body)
6089	if err != nil {
6090		return nil, err
6091	}
6092	req.Header = reqHeaders
6093	googleapi.Expand(req.URL, map[string]string{
6094		"name": c.name,
6095	})
6096	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6097}
6098
6099// Do executes the "androidmanagement.enterprises.enrollmentTokens.delete" call.
6100// Exactly one of *Empty or error will be non-nil. Any non-2xx status
6101// code is an error. Response headers are in either
6102// *Empty.ServerResponse.Header or (if a response was returned at all)
6103// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6104// check whether the returned error was because http.StatusNotModified
6105// was returned.
6106func (c *EnterprisesEnrollmentTokensDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
6107	gensupport.SetOptions(c.urlParams_, opts...)
6108	res, err := c.doRequest("json")
6109	if res != nil && res.StatusCode == http.StatusNotModified {
6110		if res.Body != nil {
6111			res.Body.Close()
6112		}
6113		return nil, &googleapi.Error{
6114			Code:   res.StatusCode,
6115			Header: res.Header,
6116		}
6117	}
6118	if err != nil {
6119		return nil, err
6120	}
6121	defer googleapi.CloseBody(res)
6122	if err := googleapi.CheckResponse(res); err != nil {
6123		return nil, err
6124	}
6125	ret := &Empty{
6126		ServerResponse: googleapi.ServerResponse{
6127			Header:         res.Header,
6128			HTTPStatusCode: res.StatusCode,
6129		},
6130	}
6131	target := &ret
6132	if err := gensupport.DecodeResponse(target, res); err != nil {
6133		return nil, err
6134	}
6135	return ret, nil
6136	// {
6137	//   "description": "Deletes an enrollment token. This operation invalidates the token, preventing its future use.",
6138	//   "flatPath": "v1/enterprises/{enterprisesId}/enrollmentTokens/{enrollmentTokensId}",
6139	//   "httpMethod": "DELETE",
6140	//   "id": "androidmanagement.enterprises.enrollmentTokens.delete",
6141	//   "parameterOrder": [
6142	//     "name"
6143	//   ],
6144	//   "parameters": {
6145	//     "name": {
6146	//       "description": "The name of the enrollment token in the form enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}.",
6147	//       "location": "path",
6148	//       "pattern": "^enterprises/[^/]+/enrollmentTokens/[^/]+$",
6149	//       "required": true,
6150	//       "type": "string"
6151	//     }
6152	//   },
6153	//   "path": "v1/{+name}",
6154	//   "response": {
6155	//     "$ref": "Empty"
6156	//   },
6157	//   "scopes": [
6158	//     "https://www.googleapis.com/auth/androidmanagement"
6159	//   ]
6160	// }
6161
6162}
6163
6164// method id "androidmanagement.enterprises.policies.delete":
6165
6166type EnterprisesPoliciesDeleteCall struct {
6167	s          *Service
6168	name       string
6169	urlParams_ gensupport.URLParams
6170	ctx_       context.Context
6171	header_    http.Header
6172}
6173
6174// Delete: Deletes a policy. This operation is only permitted if no
6175// devices are currently referencing the policy.
6176func (r *EnterprisesPoliciesService) Delete(name string) *EnterprisesPoliciesDeleteCall {
6177	c := &EnterprisesPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6178	c.name = name
6179	return c
6180}
6181
6182// Fields allows partial responses to be retrieved. See
6183// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6184// for more information.
6185func (c *EnterprisesPoliciesDeleteCall) Fields(s ...googleapi.Field) *EnterprisesPoliciesDeleteCall {
6186	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6187	return c
6188}
6189
6190// Context sets the context to be used in this call's Do method. Any
6191// pending HTTP request will be aborted if the provided context is
6192// canceled.
6193func (c *EnterprisesPoliciesDeleteCall) Context(ctx context.Context) *EnterprisesPoliciesDeleteCall {
6194	c.ctx_ = ctx
6195	return c
6196}
6197
6198// Header returns an http.Header that can be modified by the caller to
6199// add HTTP headers to the request.
6200func (c *EnterprisesPoliciesDeleteCall) Header() http.Header {
6201	if c.header_ == nil {
6202		c.header_ = make(http.Header)
6203	}
6204	return c.header_
6205}
6206
6207func (c *EnterprisesPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
6208	reqHeaders := make(http.Header)
6209	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
6210	for k, v := range c.header_ {
6211		reqHeaders[k] = v
6212	}
6213	reqHeaders.Set("User-Agent", c.s.userAgent())
6214	var body io.Reader = nil
6215	c.urlParams_.Set("alt", alt)
6216	c.urlParams_.Set("prettyPrint", "false")
6217	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6218	urls += "?" + c.urlParams_.Encode()
6219	req, err := http.NewRequest("DELETE", urls, body)
6220	if err != nil {
6221		return nil, err
6222	}
6223	req.Header = reqHeaders
6224	googleapi.Expand(req.URL, map[string]string{
6225		"name": c.name,
6226	})
6227	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6228}
6229
6230// Do executes the "androidmanagement.enterprises.policies.delete" call.
6231// Exactly one of *Empty or error will be non-nil. Any non-2xx status
6232// code is an error. Response headers are in either
6233// *Empty.ServerResponse.Header or (if a response was returned at all)
6234// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6235// check whether the returned error was because http.StatusNotModified
6236// was returned.
6237func (c *EnterprisesPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
6238	gensupport.SetOptions(c.urlParams_, opts...)
6239	res, err := c.doRequest("json")
6240	if res != nil && res.StatusCode == http.StatusNotModified {
6241		if res.Body != nil {
6242			res.Body.Close()
6243		}
6244		return nil, &googleapi.Error{
6245			Code:   res.StatusCode,
6246			Header: res.Header,
6247		}
6248	}
6249	if err != nil {
6250		return nil, err
6251	}
6252	defer googleapi.CloseBody(res)
6253	if err := googleapi.CheckResponse(res); err != nil {
6254		return nil, err
6255	}
6256	ret := &Empty{
6257		ServerResponse: googleapi.ServerResponse{
6258			Header:         res.Header,
6259			HTTPStatusCode: res.StatusCode,
6260		},
6261	}
6262	target := &ret
6263	if err := gensupport.DecodeResponse(target, res); err != nil {
6264		return nil, err
6265	}
6266	return ret, nil
6267	// {
6268	//   "description": "Deletes a policy. This operation is only permitted if no devices are currently referencing the policy.",
6269	//   "flatPath": "v1/enterprises/{enterprisesId}/policies/{policiesId}",
6270	//   "httpMethod": "DELETE",
6271	//   "id": "androidmanagement.enterprises.policies.delete",
6272	//   "parameterOrder": [
6273	//     "name"
6274	//   ],
6275	//   "parameters": {
6276	//     "name": {
6277	//       "description": "The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}.",
6278	//       "location": "path",
6279	//       "pattern": "^enterprises/[^/]+/policies/[^/]+$",
6280	//       "required": true,
6281	//       "type": "string"
6282	//     }
6283	//   },
6284	//   "path": "v1/{+name}",
6285	//   "response": {
6286	//     "$ref": "Empty"
6287	//   },
6288	//   "scopes": [
6289	//     "https://www.googleapis.com/auth/androidmanagement"
6290	//   ]
6291	// }
6292
6293}
6294
6295// method id "androidmanagement.enterprises.policies.get":
6296
6297type EnterprisesPoliciesGetCall struct {
6298	s            *Service
6299	name         string
6300	urlParams_   gensupport.URLParams
6301	ifNoneMatch_ string
6302	ctx_         context.Context
6303	header_      http.Header
6304}
6305
6306// Get: Gets a policy.
6307func (r *EnterprisesPoliciesService) Get(name string) *EnterprisesPoliciesGetCall {
6308	c := &EnterprisesPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6309	c.name = name
6310	return c
6311}
6312
6313// Fields allows partial responses to be retrieved. See
6314// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6315// for more information.
6316func (c *EnterprisesPoliciesGetCall) Fields(s ...googleapi.Field) *EnterprisesPoliciesGetCall {
6317	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6318	return c
6319}
6320
6321// IfNoneMatch sets the optional parameter which makes the operation
6322// fail if the object's ETag matches the given value. This is useful for
6323// getting updates only after the object has changed since the last
6324// request. Use googleapi.IsNotModified to check whether the response
6325// error from Do is the result of In-None-Match.
6326func (c *EnterprisesPoliciesGetCall) IfNoneMatch(entityTag string) *EnterprisesPoliciesGetCall {
6327	c.ifNoneMatch_ = entityTag
6328	return c
6329}
6330
6331// Context sets the context to be used in this call's Do method. Any
6332// pending HTTP request will be aborted if the provided context is
6333// canceled.
6334func (c *EnterprisesPoliciesGetCall) Context(ctx context.Context) *EnterprisesPoliciesGetCall {
6335	c.ctx_ = ctx
6336	return c
6337}
6338
6339// Header returns an http.Header that can be modified by the caller to
6340// add HTTP headers to the request.
6341func (c *EnterprisesPoliciesGetCall) Header() http.Header {
6342	if c.header_ == nil {
6343		c.header_ = make(http.Header)
6344	}
6345	return c.header_
6346}
6347
6348func (c *EnterprisesPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
6349	reqHeaders := make(http.Header)
6350	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
6351	for k, v := range c.header_ {
6352		reqHeaders[k] = v
6353	}
6354	reqHeaders.Set("User-Agent", c.s.userAgent())
6355	if c.ifNoneMatch_ != "" {
6356		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6357	}
6358	var body io.Reader = nil
6359	c.urlParams_.Set("alt", alt)
6360	c.urlParams_.Set("prettyPrint", "false")
6361	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6362	urls += "?" + c.urlParams_.Encode()
6363	req, err := http.NewRequest("GET", urls, body)
6364	if err != nil {
6365		return nil, err
6366	}
6367	req.Header = reqHeaders
6368	googleapi.Expand(req.URL, map[string]string{
6369		"name": c.name,
6370	})
6371	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6372}
6373
6374// Do executes the "androidmanagement.enterprises.policies.get" call.
6375// Exactly one of *Policy or error will be non-nil. Any non-2xx status
6376// code is an error. Response headers are in either
6377// *Policy.ServerResponse.Header or (if a response was returned at all)
6378// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6379// check whether the returned error was because http.StatusNotModified
6380// was returned.
6381func (c *EnterprisesPoliciesGetCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6382	gensupport.SetOptions(c.urlParams_, opts...)
6383	res, err := c.doRequest("json")
6384	if res != nil && res.StatusCode == http.StatusNotModified {
6385		if res.Body != nil {
6386			res.Body.Close()
6387		}
6388		return nil, &googleapi.Error{
6389			Code:   res.StatusCode,
6390			Header: res.Header,
6391		}
6392	}
6393	if err != nil {
6394		return nil, err
6395	}
6396	defer googleapi.CloseBody(res)
6397	if err := googleapi.CheckResponse(res); err != nil {
6398		return nil, err
6399	}
6400	ret := &Policy{
6401		ServerResponse: googleapi.ServerResponse{
6402			Header:         res.Header,
6403			HTTPStatusCode: res.StatusCode,
6404		},
6405	}
6406	target := &ret
6407	if err := gensupport.DecodeResponse(target, res); err != nil {
6408		return nil, err
6409	}
6410	return ret, nil
6411	// {
6412	//   "description": "Gets a policy.",
6413	//   "flatPath": "v1/enterprises/{enterprisesId}/policies/{policiesId}",
6414	//   "httpMethod": "GET",
6415	//   "id": "androidmanagement.enterprises.policies.get",
6416	//   "parameterOrder": [
6417	//     "name"
6418	//   ],
6419	//   "parameters": {
6420	//     "name": {
6421	//       "description": "The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}.",
6422	//       "location": "path",
6423	//       "pattern": "^enterprises/[^/]+/policies/[^/]+$",
6424	//       "required": true,
6425	//       "type": "string"
6426	//     }
6427	//   },
6428	//   "path": "v1/{+name}",
6429	//   "response": {
6430	//     "$ref": "Policy"
6431	//   },
6432	//   "scopes": [
6433	//     "https://www.googleapis.com/auth/androidmanagement"
6434	//   ]
6435	// }
6436
6437}
6438
6439// method id "androidmanagement.enterprises.policies.list":
6440
6441type EnterprisesPoliciesListCall struct {
6442	s            *Service
6443	parent       string
6444	urlParams_   gensupport.URLParams
6445	ifNoneMatch_ string
6446	ctx_         context.Context
6447	header_      http.Header
6448}
6449
6450// List: Lists policies for a given enterprise.
6451func (r *EnterprisesPoliciesService) List(parent string) *EnterprisesPoliciesListCall {
6452	c := &EnterprisesPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6453	c.parent = parent
6454	return c
6455}
6456
6457// PageSize sets the optional parameter "pageSize": The requested page
6458// size. The actual page size may be fixed to a min or max value.
6459func (c *EnterprisesPoliciesListCall) PageSize(pageSize int64) *EnterprisesPoliciesListCall {
6460	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6461	return c
6462}
6463
6464// PageToken sets the optional parameter "pageToken": A token
6465// identifying a page of results returned by the server.
6466func (c *EnterprisesPoliciesListCall) PageToken(pageToken string) *EnterprisesPoliciesListCall {
6467	c.urlParams_.Set("pageToken", pageToken)
6468	return c
6469}
6470
6471// Fields allows partial responses to be retrieved. See
6472// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6473// for more information.
6474func (c *EnterprisesPoliciesListCall) Fields(s ...googleapi.Field) *EnterprisesPoliciesListCall {
6475	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6476	return c
6477}
6478
6479// IfNoneMatch sets the optional parameter which makes the operation
6480// fail if the object's ETag matches the given value. This is useful for
6481// getting updates only after the object has changed since the last
6482// request. Use googleapi.IsNotModified to check whether the response
6483// error from Do is the result of In-None-Match.
6484func (c *EnterprisesPoliciesListCall) IfNoneMatch(entityTag string) *EnterprisesPoliciesListCall {
6485	c.ifNoneMatch_ = entityTag
6486	return c
6487}
6488
6489// Context sets the context to be used in this call's Do method. Any
6490// pending HTTP request will be aborted if the provided context is
6491// canceled.
6492func (c *EnterprisesPoliciesListCall) Context(ctx context.Context) *EnterprisesPoliciesListCall {
6493	c.ctx_ = ctx
6494	return c
6495}
6496
6497// Header returns an http.Header that can be modified by the caller to
6498// add HTTP headers to the request.
6499func (c *EnterprisesPoliciesListCall) Header() http.Header {
6500	if c.header_ == nil {
6501		c.header_ = make(http.Header)
6502	}
6503	return c.header_
6504}
6505
6506func (c *EnterprisesPoliciesListCall) doRequest(alt string) (*http.Response, error) {
6507	reqHeaders := make(http.Header)
6508	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
6509	for k, v := range c.header_ {
6510		reqHeaders[k] = v
6511	}
6512	reqHeaders.Set("User-Agent", c.s.userAgent())
6513	if c.ifNoneMatch_ != "" {
6514		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6515	}
6516	var body io.Reader = nil
6517	c.urlParams_.Set("alt", alt)
6518	c.urlParams_.Set("prettyPrint", "false")
6519	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/policies")
6520	urls += "?" + c.urlParams_.Encode()
6521	req, err := http.NewRequest("GET", urls, body)
6522	if err != nil {
6523		return nil, err
6524	}
6525	req.Header = reqHeaders
6526	googleapi.Expand(req.URL, map[string]string{
6527		"parent": c.parent,
6528	})
6529	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6530}
6531
6532// Do executes the "androidmanagement.enterprises.policies.list" call.
6533// Exactly one of *ListPoliciesResponse or error will be non-nil. Any
6534// non-2xx status code is an error. Response headers are in either
6535// *ListPoliciesResponse.ServerResponse.Header or (if a response was
6536// returned at all) in error.(*googleapi.Error).Header. Use
6537// googleapi.IsNotModified to check whether the returned error was
6538// because http.StatusNotModified was returned.
6539func (c *EnterprisesPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListPoliciesResponse, error) {
6540	gensupport.SetOptions(c.urlParams_, opts...)
6541	res, err := c.doRequest("json")
6542	if res != nil && res.StatusCode == http.StatusNotModified {
6543		if res.Body != nil {
6544			res.Body.Close()
6545		}
6546		return nil, &googleapi.Error{
6547			Code:   res.StatusCode,
6548			Header: res.Header,
6549		}
6550	}
6551	if err != nil {
6552		return nil, err
6553	}
6554	defer googleapi.CloseBody(res)
6555	if err := googleapi.CheckResponse(res); err != nil {
6556		return nil, err
6557	}
6558	ret := &ListPoliciesResponse{
6559		ServerResponse: googleapi.ServerResponse{
6560			Header:         res.Header,
6561			HTTPStatusCode: res.StatusCode,
6562		},
6563	}
6564	target := &ret
6565	if err := gensupport.DecodeResponse(target, res); err != nil {
6566		return nil, err
6567	}
6568	return ret, nil
6569	// {
6570	//   "description": "Lists policies for a given enterprise.",
6571	//   "flatPath": "v1/enterprises/{enterprisesId}/policies",
6572	//   "httpMethod": "GET",
6573	//   "id": "androidmanagement.enterprises.policies.list",
6574	//   "parameterOrder": [
6575	//     "parent"
6576	//   ],
6577	//   "parameters": {
6578	//     "pageSize": {
6579	//       "description": "The requested page size. The actual page size may be fixed to a min or max value.",
6580	//       "format": "int32",
6581	//       "location": "query",
6582	//       "type": "integer"
6583	//     },
6584	//     "pageToken": {
6585	//       "description": "A token identifying a page of results returned by the server.",
6586	//       "location": "query",
6587	//       "type": "string"
6588	//     },
6589	//     "parent": {
6590	//       "description": "The name of the enterprise in the form enterprises/{enterpriseId}.",
6591	//       "location": "path",
6592	//       "pattern": "^enterprises/[^/]+$",
6593	//       "required": true,
6594	//       "type": "string"
6595	//     }
6596	//   },
6597	//   "path": "v1/{+parent}/policies",
6598	//   "response": {
6599	//     "$ref": "ListPoliciesResponse"
6600	//   },
6601	//   "scopes": [
6602	//     "https://www.googleapis.com/auth/androidmanagement"
6603	//   ]
6604	// }
6605
6606}
6607
6608// Pages invokes f for each page of results.
6609// A non-nil error returned from f will halt the iteration.
6610// The provided context supersedes any context provided to the Context method.
6611func (c *EnterprisesPoliciesListCall) Pages(ctx context.Context, f func(*ListPoliciesResponse) error) error {
6612	c.ctx_ = ctx
6613	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6614	for {
6615		x, err := c.Do()
6616		if err != nil {
6617			return err
6618		}
6619		if err := f(x); err != nil {
6620			return err
6621		}
6622		if x.NextPageToken == "" {
6623			return nil
6624		}
6625		c.PageToken(x.NextPageToken)
6626	}
6627}
6628
6629// method id "androidmanagement.enterprises.policies.patch":
6630
6631type EnterprisesPoliciesPatchCall struct {
6632	s          *Service
6633	name       string
6634	policy     *Policy
6635	urlParams_ gensupport.URLParams
6636	ctx_       context.Context
6637	header_    http.Header
6638}
6639
6640// Patch: Updates or creates a policy.
6641func (r *EnterprisesPoliciesService) Patch(name string, policy *Policy) *EnterprisesPoliciesPatchCall {
6642	c := &EnterprisesPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6643	c.name = name
6644	c.policy = policy
6645	return c
6646}
6647
6648// UpdateMask sets the optional parameter "updateMask": The field mask
6649// indicating the fields to update. If not set, all modifiable fields
6650// will be modified.
6651func (c *EnterprisesPoliciesPatchCall) UpdateMask(updateMask string) *EnterprisesPoliciesPatchCall {
6652	c.urlParams_.Set("updateMask", updateMask)
6653	return c
6654}
6655
6656// Fields allows partial responses to be retrieved. See
6657// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6658// for more information.
6659func (c *EnterprisesPoliciesPatchCall) Fields(s ...googleapi.Field) *EnterprisesPoliciesPatchCall {
6660	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6661	return c
6662}
6663
6664// Context sets the context to be used in this call's Do method. Any
6665// pending HTTP request will be aborted if the provided context is
6666// canceled.
6667func (c *EnterprisesPoliciesPatchCall) Context(ctx context.Context) *EnterprisesPoliciesPatchCall {
6668	c.ctx_ = ctx
6669	return c
6670}
6671
6672// Header returns an http.Header that can be modified by the caller to
6673// add HTTP headers to the request.
6674func (c *EnterprisesPoliciesPatchCall) Header() http.Header {
6675	if c.header_ == nil {
6676		c.header_ = make(http.Header)
6677	}
6678	return c.header_
6679}
6680
6681func (c *EnterprisesPoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
6682	reqHeaders := make(http.Header)
6683	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
6684	for k, v := range c.header_ {
6685		reqHeaders[k] = v
6686	}
6687	reqHeaders.Set("User-Agent", c.s.userAgent())
6688	var body io.Reader = nil
6689	body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy)
6690	if err != nil {
6691		return nil, err
6692	}
6693	reqHeaders.Set("Content-Type", "application/json")
6694	c.urlParams_.Set("alt", alt)
6695	c.urlParams_.Set("prettyPrint", "false")
6696	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6697	urls += "?" + c.urlParams_.Encode()
6698	req, err := http.NewRequest("PATCH", urls, body)
6699	if err != nil {
6700		return nil, err
6701	}
6702	req.Header = reqHeaders
6703	googleapi.Expand(req.URL, map[string]string{
6704		"name": c.name,
6705	})
6706	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6707}
6708
6709// Do executes the "androidmanagement.enterprises.policies.patch" call.
6710// Exactly one of *Policy or error will be non-nil. Any non-2xx status
6711// code is an error. Response headers are in either
6712// *Policy.ServerResponse.Header or (if a response was returned at all)
6713// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6714// check whether the returned error was because http.StatusNotModified
6715// was returned.
6716func (c *EnterprisesPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6717	gensupport.SetOptions(c.urlParams_, opts...)
6718	res, err := c.doRequest("json")
6719	if res != nil && res.StatusCode == http.StatusNotModified {
6720		if res.Body != nil {
6721			res.Body.Close()
6722		}
6723		return nil, &googleapi.Error{
6724			Code:   res.StatusCode,
6725			Header: res.Header,
6726		}
6727	}
6728	if err != nil {
6729		return nil, err
6730	}
6731	defer googleapi.CloseBody(res)
6732	if err := googleapi.CheckResponse(res); err != nil {
6733		return nil, err
6734	}
6735	ret := &Policy{
6736		ServerResponse: googleapi.ServerResponse{
6737			Header:         res.Header,
6738			HTTPStatusCode: res.StatusCode,
6739		},
6740	}
6741	target := &ret
6742	if err := gensupport.DecodeResponse(target, res); err != nil {
6743		return nil, err
6744	}
6745	return ret, nil
6746	// {
6747	//   "description": "Updates or creates a policy.",
6748	//   "flatPath": "v1/enterprises/{enterprisesId}/policies/{policiesId}",
6749	//   "httpMethod": "PATCH",
6750	//   "id": "androidmanagement.enterprises.policies.patch",
6751	//   "parameterOrder": [
6752	//     "name"
6753	//   ],
6754	//   "parameters": {
6755	//     "name": {
6756	//       "description": "The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}.",
6757	//       "location": "path",
6758	//       "pattern": "^enterprises/[^/]+/policies/[^/]+$",
6759	//       "required": true,
6760	//       "type": "string"
6761	//     },
6762	//     "updateMask": {
6763	//       "description": "The field mask indicating the fields to update. If not set, all modifiable fields will be modified.",
6764	//       "format": "google-fieldmask",
6765	//       "location": "query",
6766	//       "type": "string"
6767	//     }
6768	//   },
6769	//   "path": "v1/{+name}",
6770	//   "request": {
6771	//     "$ref": "Policy"
6772	//   },
6773	//   "response": {
6774	//     "$ref": "Policy"
6775	//   },
6776	//   "scopes": [
6777	//     "https://www.googleapis.com/auth/androidmanagement"
6778	//   ]
6779	// }
6780
6781}
6782
6783// method id "androidmanagement.enterprises.webApps.create":
6784
6785type EnterprisesWebAppsCreateCall struct {
6786	s          *Service
6787	parent     string
6788	webapp     *WebApp
6789	urlParams_ gensupport.URLParams
6790	ctx_       context.Context
6791	header_    http.Header
6792}
6793
6794// Create: Creates a web app.
6795func (r *EnterprisesWebAppsService) Create(parent string, webapp *WebApp) *EnterprisesWebAppsCreateCall {
6796	c := &EnterprisesWebAppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6797	c.parent = parent
6798	c.webapp = webapp
6799	return c
6800}
6801
6802// Fields allows partial responses to be retrieved. See
6803// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6804// for more information.
6805func (c *EnterprisesWebAppsCreateCall) Fields(s ...googleapi.Field) *EnterprisesWebAppsCreateCall {
6806	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6807	return c
6808}
6809
6810// Context sets the context to be used in this call's Do method. Any
6811// pending HTTP request will be aborted if the provided context is
6812// canceled.
6813func (c *EnterprisesWebAppsCreateCall) Context(ctx context.Context) *EnterprisesWebAppsCreateCall {
6814	c.ctx_ = ctx
6815	return c
6816}
6817
6818// Header returns an http.Header that can be modified by the caller to
6819// add HTTP headers to the request.
6820func (c *EnterprisesWebAppsCreateCall) Header() http.Header {
6821	if c.header_ == nil {
6822		c.header_ = make(http.Header)
6823	}
6824	return c.header_
6825}
6826
6827func (c *EnterprisesWebAppsCreateCall) doRequest(alt string) (*http.Response, error) {
6828	reqHeaders := make(http.Header)
6829	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
6830	for k, v := range c.header_ {
6831		reqHeaders[k] = v
6832	}
6833	reqHeaders.Set("User-Agent", c.s.userAgent())
6834	var body io.Reader = nil
6835	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webapp)
6836	if err != nil {
6837		return nil, err
6838	}
6839	reqHeaders.Set("Content-Type", "application/json")
6840	c.urlParams_.Set("alt", alt)
6841	c.urlParams_.Set("prettyPrint", "false")
6842	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/webApps")
6843	urls += "?" + c.urlParams_.Encode()
6844	req, err := http.NewRequest("POST", urls, body)
6845	if err != nil {
6846		return nil, err
6847	}
6848	req.Header = reqHeaders
6849	googleapi.Expand(req.URL, map[string]string{
6850		"parent": c.parent,
6851	})
6852	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6853}
6854
6855// Do executes the "androidmanagement.enterprises.webApps.create" call.
6856// Exactly one of *WebApp or error will be non-nil. Any non-2xx status
6857// code is an error. Response headers are in either
6858// *WebApp.ServerResponse.Header or (if a response was returned at all)
6859// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6860// check whether the returned error was because http.StatusNotModified
6861// was returned.
6862func (c *EnterprisesWebAppsCreateCall) Do(opts ...googleapi.CallOption) (*WebApp, error) {
6863	gensupport.SetOptions(c.urlParams_, opts...)
6864	res, err := c.doRequest("json")
6865	if res != nil && res.StatusCode == http.StatusNotModified {
6866		if res.Body != nil {
6867			res.Body.Close()
6868		}
6869		return nil, &googleapi.Error{
6870			Code:   res.StatusCode,
6871			Header: res.Header,
6872		}
6873	}
6874	if err != nil {
6875		return nil, err
6876	}
6877	defer googleapi.CloseBody(res)
6878	if err := googleapi.CheckResponse(res); err != nil {
6879		return nil, err
6880	}
6881	ret := &WebApp{
6882		ServerResponse: googleapi.ServerResponse{
6883			Header:         res.Header,
6884			HTTPStatusCode: res.StatusCode,
6885		},
6886	}
6887	target := &ret
6888	if err := gensupport.DecodeResponse(target, res); err != nil {
6889		return nil, err
6890	}
6891	return ret, nil
6892	// {
6893	//   "description": "Creates a web app.",
6894	//   "flatPath": "v1/enterprises/{enterprisesId}/webApps",
6895	//   "httpMethod": "POST",
6896	//   "id": "androidmanagement.enterprises.webApps.create",
6897	//   "parameterOrder": [
6898	//     "parent"
6899	//   ],
6900	//   "parameters": {
6901	//     "parent": {
6902	//       "description": "The name of the enterprise in the form enterprises/{enterpriseId}.",
6903	//       "location": "path",
6904	//       "pattern": "^enterprises/[^/]+$",
6905	//       "required": true,
6906	//       "type": "string"
6907	//     }
6908	//   },
6909	//   "path": "v1/{+parent}/webApps",
6910	//   "request": {
6911	//     "$ref": "WebApp"
6912	//   },
6913	//   "response": {
6914	//     "$ref": "WebApp"
6915	//   },
6916	//   "scopes": [
6917	//     "https://www.googleapis.com/auth/androidmanagement"
6918	//   ]
6919	// }
6920
6921}
6922
6923// method id "androidmanagement.enterprises.webApps.delete":
6924
6925type EnterprisesWebAppsDeleteCall struct {
6926	s          *Service
6927	name       string
6928	urlParams_ gensupport.URLParams
6929	ctx_       context.Context
6930	header_    http.Header
6931}
6932
6933// Delete: Deletes a web app.
6934func (r *EnterprisesWebAppsService) Delete(name string) *EnterprisesWebAppsDeleteCall {
6935	c := &EnterprisesWebAppsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6936	c.name = name
6937	return c
6938}
6939
6940// Fields allows partial responses to be retrieved. See
6941// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6942// for more information.
6943func (c *EnterprisesWebAppsDeleteCall) Fields(s ...googleapi.Field) *EnterprisesWebAppsDeleteCall {
6944	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6945	return c
6946}
6947
6948// Context sets the context to be used in this call's Do method. Any
6949// pending HTTP request will be aborted if the provided context is
6950// canceled.
6951func (c *EnterprisesWebAppsDeleteCall) Context(ctx context.Context) *EnterprisesWebAppsDeleteCall {
6952	c.ctx_ = ctx
6953	return c
6954}
6955
6956// Header returns an http.Header that can be modified by the caller to
6957// add HTTP headers to the request.
6958func (c *EnterprisesWebAppsDeleteCall) Header() http.Header {
6959	if c.header_ == nil {
6960		c.header_ = make(http.Header)
6961	}
6962	return c.header_
6963}
6964
6965func (c *EnterprisesWebAppsDeleteCall) doRequest(alt string) (*http.Response, error) {
6966	reqHeaders := make(http.Header)
6967	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
6968	for k, v := range c.header_ {
6969		reqHeaders[k] = v
6970	}
6971	reqHeaders.Set("User-Agent", c.s.userAgent())
6972	var body io.Reader = nil
6973	c.urlParams_.Set("alt", alt)
6974	c.urlParams_.Set("prettyPrint", "false")
6975	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6976	urls += "?" + c.urlParams_.Encode()
6977	req, err := http.NewRequest("DELETE", urls, body)
6978	if err != nil {
6979		return nil, err
6980	}
6981	req.Header = reqHeaders
6982	googleapi.Expand(req.URL, map[string]string{
6983		"name": c.name,
6984	})
6985	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6986}
6987
6988// Do executes the "androidmanagement.enterprises.webApps.delete" call.
6989// Exactly one of *Empty or error will be non-nil. Any non-2xx status
6990// code is an error. Response headers are in either
6991// *Empty.ServerResponse.Header or (if a response was returned at all)
6992// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6993// check whether the returned error was because http.StatusNotModified
6994// was returned.
6995func (c *EnterprisesWebAppsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
6996	gensupport.SetOptions(c.urlParams_, opts...)
6997	res, err := c.doRequest("json")
6998	if res != nil && res.StatusCode == http.StatusNotModified {
6999		if res.Body != nil {
7000			res.Body.Close()
7001		}
7002		return nil, &googleapi.Error{
7003			Code:   res.StatusCode,
7004			Header: res.Header,
7005		}
7006	}
7007	if err != nil {
7008		return nil, err
7009	}
7010	defer googleapi.CloseBody(res)
7011	if err := googleapi.CheckResponse(res); err != nil {
7012		return nil, err
7013	}
7014	ret := &Empty{
7015		ServerResponse: googleapi.ServerResponse{
7016			Header:         res.Header,
7017			HTTPStatusCode: res.StatusCode,
7018		},
7019	}
7020	target := &ret
7021	if err := gensupport.DecodeResponse(target, res); err != nil {
7022		return nil, err
7023	}
7024	return ret, nil
7025	// {
7026	//   "description": "Deletes a web app.",
7027	//   "flatPath": "v1/enterprises/{enterprisesId}/webApps/{webAppsId}",
7028	//   "httpMethod": "DELETE",
7029	//   "id": "androidmanagement.enterprises.webApps.delete",
7030	//   "parameterOrder": [
7031	//     "name"
7032	//   ],
7033	//   "parameters": {
7034	//     "name": {
7035	//       "description": "The name of the web app in the form enterprises/{enterpriseId}/webApps/{packageName}.",
7036	//       "location": "path",
7037	//       "pattern": "^enterprises/[^/]+/webApps/[^/]+$",
7038	//       "required": true,
7039	//       "type": "string"
7040	//     }
7041	//   },
7042	//   "path": "v1/{+name}",
7043	//   "response": {
7044	//     "$ref": "Empty"
7045	//   },
7046	//   "scopes": [
7047	//     "https://www.googleapis.com/auth/androidmanagement"
7048	//   ]
7049	// }
7050
7051}
7052
7053// method id "androidmanagement.enterprises.webApps.get":
7054
7055type EnterprisesWebAppsGetCall struct {
7056	s            *Service
7057	name         string
7058	urlParams_   gensupport.URLParams
7059	ifNoneMatch_ string
7060	ctx_         context.Context
7061	header_      http.Header
7062}
7063
7064// Get: Gets a web app.
7065func (r *EnterprisesWebAppsService) Get(name string) *EnterprisesWebAppsGetCall {
7066	c := &EnterprisesWebAppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7067	c.name = name
7068	return c
7069}
7070
7071// Fields allows partial responses to be retrieved. See
7072// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7073// for more information.
7074func (c *EnterprisesWebAppsGetCall) Fields(s ...googleapi.Field) *EnterprisesWebAppsGetCall {
7075	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7076	return c
7077}
7078
7079// IfNoneMatch sets the optional parameter which makes the operation
7080// fail if the object's ETag matches the given value. This is useful for
7081// getting updates only after the object has changed since the last
7082// request. Use googleapi.IsNotModified to check whether the response
7083// error from Do is the result of In-None-Match.
7084func (c *EnterprisesWebAppsGetCall) IfNoneMatch(entityTag string) *EnterprisesWebAppsGetCall {
7085	c.ifNoneMatch_ = entityTag
7086	return c
7087}
7088
7089// Context sets the context to be used in this call's Do method. Any
7090// pending HTTP request will be aborted if the provided context is
7091// canceled.
7092func (c *EnterprisesWebAppsGetCall) Context(ctx context.Context) *EnterprisesWebAppsGetCall {
7093	c.ctx_ = ctx
7094	return c
7095}
7096
7097// Header returns an http.Header that can be modified by the caller to
7098// add HTTP headers to the request.
7099func (c *EnterprisesWebAppsGetCall) Header() http.Header {
7100	if c.header_ == nil {
7101		c.header_ = make(http.Header)
7102	}
7103	return c.header_
7104}
7105
7106func (c *EnterprisesWebAppsGetCall) doRequest(alt string) (*http.Response, error) {
7107	reqHeaders := make(http.Header)
7108	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
7109	for k, v := range c.header_ {
7110		reqHeaders[k] = v
7111	}
7112	reqHeaders.Set("User-Agent", c.s.userAgent())
7113	if c.ifNoneMatch_ != "" {
7114		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7115	}
7116	var body io.Reader = nil
7117	c.urlParams_.Set("alt", alt)
7118	c.urlParams_.Set("prettyPrint", "false")
7119	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7120	urls += "?" + c.urlParams_.Encode()
7121	req, err := http.NewRequest("GET", urls, body)
7122	if err != nil {
7123		return nil, err
7124	}
7125	req.Header = reqHeaders
7126	googleapi.Expand(req.URL, map[string]string{
7127		"name": c.name,
7128	})
7129	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7130}
7131
7132// Do executes the "androidmanagement.enterprises.webApps.get" call.
7133// Exactly one of *WebApp or error will be non-nil. Any non-2xx status
7134// code is an error. Response headers are in either
7135// *WebApp.ServerResponse.Header or (if a response was returned at all)
7136// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7137// check whether the returned error was because http.StatusNotModified
7138// was returned.
7139func (c *EnterprisesWebAppsGetCall) Do(opts ...googleapi.CallOption) (*WebApp, error) {
7140	gensupport.SetOptions(c.urlParams_, opts...)
7141	res, err := c.doRequest("json")
7142	if res != nil && res.StatusCode == http.StatusNotModified {
7143		if res.Body != nil {
7144			res.Body.Close()
7145		}
7146		return nil, &googleapi.Error{
7147			Code:   res.StatusCode,
7148			Header: res.Header,
7149		}
7150	}
7151	if err != nil {
7152		return nil, err
7153	}
7154	defer googleapi.CloseBody(res)
7155	if err := googleapi.CheckResponse(res); err != nil {
7156		return nil, err
7157	}
7158	ret := &WebApp{
7159		ServerResponse: googleapi.ServerResponse{
7160			Header:         res.Header,
7161			HTTPStatusCode: res.StatusCode,
7162		},
7163	}
7164	target := &ret
7165	if err := gensupport.DecodeResponse(target, res); err != nil {
7166		return nil, err
7167	}
7168	return ret, nil
7169	// {
7170	//   "description": "Gets a web app.",
7171	//   "flatPath": "v1/enterprises/{enterprisesId}/webApps/{webAppsId}",
7172	//   "httpMethod": "GET",
7173	//   "id": "androidmanagement.enterprises.webApps.get",
7174	//   "parameterOrder": [
7175	//     "name"
7176	//   ],
7177	//   "parameters": {
7178	//     "name": {
7179	//       "description": "The name of the web app in the form enterprises/{enterpriseId}/webApp/{packageName}.",
7180	//       "location": "path",
7181	//       "pattern": "^enterprises/[^/]+/webApps/[^/]+$",
7182	//       "required": true,
7183	//       "type": "string"
7184	//     }
7185	//   },
7186	//   "path": "v1/{+name}",
7187	//   "response": {
7188	//     "$ref": "WebApp"
7189	//   },
7190	//   "scopes": [
7191	//     "https://www.googleapis.com/auth/androidmanagement"
7192	//   ]
7193	// }
7194
7195}
7196
7197// method id "androidmanagement.enterprises.webApps.list":
7198
7199type EnterprisesWebAppsListCall struct {
7200	s            *Service
7201	parent       string
7202	urlParams_   gensupport.URLParams
7203	ifNoneMatch_ string
7204	ctx_         context.Context
7205	header_      http.Header
7206}
7207
7208// List: Lists web apps for a given enterprise.
7209func (r *EnterprisesWebAppsService) List(parent string) *EnterprisesWebAppsListCall {
7210	c := &EnterprisesWebAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7211	c.parent = parent
7212	return c
7213}
7214
7215// PageSize sets the optional parameter "pageSize": The requested page
7216// size. The actual page size may be fixed to a min or max value.
7217func (c *EnterprisesWebAppsListCall) PageSize(pageSize int64) *EnterprisesWebAppsListCall {
7218	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7219	return c
7220}
7221
7222// PageToken sets the optional parameter "pageToken": A token
7223// identifying a page of results returned by the server.
7224func (c *EnterprisesWebAppsListCall) PageToken(pageToken string) *EnterprisesWebAppsListCall {
7225	c.urlParams_.Set("pageToken", pageToken)
7226	return c
7227}
7228
7229// Fields allows partial responses to be retrieved. See
7230// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7231// for more information.
7232func (c *EnterprisesWebAppsListCall) Fields(s ...googleapi.Field) *EnterprisesWebAppsListCall {
7233	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7234	return c
7235}
7236
7237// IfNoneMatch sets the optional parameter which makes the operation
7238// fail if the object's ETag matches the given value. This is useful for
7239// getting updates only after the object has changed since the last
7240// request. Use googleapi.IsNotModified to check whether the response
7241// error from Do is the result of In-None-Match.
7242func (c *EnterprisesWebAppsListCall) IfNoneMatch(entityTag string) *EnterprisesWebAppsListCall {
7243	c.ifNoneMatch_ = entityTag
7244	return c
7245}
7246
7247// Context sets the context to be used in this call's Do method. Any
7248// pending HTTP request will be aborted if the provided context is
7249// canceled.
7250func (c *EnterprisesWebAppsListCall) Context(ctx context.Context) *EnterprisesWebAppsListCall {
7251	c.ctx_ = ctx
7252	return c
7253}
7254
7255// Header returns an http.Header that can be modified by the caller to
7256// add HTTP headers to the request.
7257func (c *EnterprisesWebAppsListCall) Header() http.Header {
7258	if c.header_ == nil {
7259		c.header_ = make(http.Header)
7260	}
7261	return c.header_
7262}
7263
7264func (c *EnterprisesWebAppsListCall) doRequest(alt string) (*http.Response, error) {
7265	reqHeaders := make(http.Header)
7266	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
7267	for k, v := range c.header_ {
7268		reqHeaders[k] = v
7269	}
7270	reqHeaders.Set("User-Agent", c.s.userAgent())
7271	if c.ifNoneMatch_ != "" {
7272		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7273	}
7274	var body io.Reader = nil
7275	c.urlParams_.Set("alt", alt)
7276	c.urlParams_.Set("prettyPrint", "false")
7277	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/webApps")
7278	urls += "?" + c.urlParams_.Encode()
7279	req, err := http.NewRequest("GET", urls, body)
7280	if err != nil {
7281		return nil, err
7282	}
7283	req.Header = reqHeaders
7284	googleapi.Expand(req.URL, map[string]string{
7285		"parent": c.parent,
7286	})
7287	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7288}
7289
7290// Do executes the "androidmanagement.enterprises.webApps.list" call.
7291// Exactly one of *ListWebAppsResponse or error will be non-nil. Any
7292// non-2xx status code is an error. Response headers are in either
7293// *ListWebAppsResponse.ServerResponse.Header or (if a response was
7294// returned at all) in error.(*googleapi.Error).Header. Use
7295// googleapi.IsNotModified to check whether the returned error was
7296// because http.StatusNotModified was returned.
7297func (c *EnterprisesWebAppsListCall) Do(opts ...googleapi.CallOption) (*ListWebAppsResponse, error) {
7298	gensupport.SetOptions(c.urlParams_, opts...)
7299	res, err := c.doRequest("json")
7300	if res != nil && res.StatusCode == http.StatusNotModified {
7301		if res.Body != nil {
7302			res.Body.Close()
7303		}
7304		return nil, &googleapi.Error{
7305			Code:   res.StatusCode,
7306			Header: res.Header,
7307		}
7308	}
7309	if err != nil {
7310		return nil, err
7311	}
7312	defer googleapi.CloseBody(res)
7313	if err := googleapi.CheckResponse(res); err != nil {
7314		return nil, err
7315	}
7316	ret := &ListWebAppsResponse{
7317		ServerResponse: googleapi.ServerResponse{
7318			Header:         res.Header,
7319			HTTPStatusCode: res.StatusCode,
7320		},
7321	}
7322	target := &ret
7323	if err := gensupport.DecodeResponse(target, res); err != nil {
7324		return nil, err
7325	}
7326	return ret, nil
7327	// {
7328	//   "description": "Lists web apps for a given enterprise.",
7329	//   "flatPath": "v1/enterprises/{enterprisesId}/webApps",
7330	//   "httpMethod": "GET",
7331	//   "id": "androidmanagement.enterprises.webApps.list",
7332	//   "parameterOrder": [
7333	//     "parent"
7334	//   ],
7335	//   "parameters": {
7336	//     "pageSize": {
7337	//       "description": "The requested page size. The actual page size may be fixed to a min or max value.",
7338	//       "format": "int32",
7339	//       "location": "query",
7340	//       "type": "integer"
7341	//     },
7342	//     "pageToken": {
7343	//       "description": "A token identifying a page of results returned by the server.",
7344	//       "location": "query",
7345	//       "type": "string"
7346	//     },
7347	//     "parent": {
7348	//       "description": "The name of the enterprise in the form enterprises/{enterpriseId}.",
7349	//       "location": "path",
7350	//       "pattern": "^enterprises/[^/]+$",
7351	//       "required": true,
7352	//       "type": "string"
7353	//     }
7354	//   },
7355	//   "path": "v1/{+parent}/webApps",
7356	//   "response": {
7357	//     "$ref": "ListWebAppsResponse"
7358	//   },
7359	//   "scopes": [
7360	//     "https://www.googleapis.com/auth/androidmanagement"
7361	//   ]
7362	// }
7363
7364}
7365
7366// Pages invokes f for each page of results.
7367// A non-nil error returned from f will halt the iteration.
7368// The provided context supersedes any context provided to the Context method.
7369func (c *EnterprisesWebAppsListCall) Pages(ctx context.Context, f func(*ListWebAppsResponse) error) error {
7370	c.ctx_ = ctx
7371	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7372	for {
7373		x, err := c.Do()
7374		if err != nil {
7375			return err
7376		}
7377		if err := f(x); err != nil {
7378			return err
7379		}
7380		if x.NextPageToken == "" {
7381			return nil
7382		}
7383		c.PageToken(x.NextPageToken)
7384	}
7385}
7386
7387// method id "androidmanagement.enterprises.webApps.patch":
7388
7389type EnterprisesWebAppsPatchCall struct {
7390	s          *Service
7391	name       string
7392	webapp     *WebApp
7393	urlParams_ gensupport.URLParams
7394	ctx_       context.Context
7395	header_    http.Header
7396}
7397
7398// Patch: Updates a web app.
7399func (r *EnterprisesWebAppsService) Patch(name string, webapp *WebApp) *EnterprisesWebAppsPatchCall {
7400	c := &EnterprisesWebAppsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7401	c.name = name
7402	c.webapp = webapp
7403	return c
7404}
7405
7406// UpdateMask sets the optional parameter "updateMask": The field mask
7407// indicating the fields to update. If not set, all modifiable fields
7408// will be modified.
7409func (c *EnterprisesWebAppsPatchCall) UpdateMask(updateMask string) *EnterprisesWebAppsPatchCall {
7410	c.urlParams_.Set("updateMask", updateMask)
7411	return c
7412}
7413
7414// Fields allows partial responses to be retrieved. See
7415// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7416// for more information.
7417func (c *EnterprisesWebAppsPatchCall) Fields(s ...googleapi.Field) *EnterprisesWebAppsPatchCall {
7418	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7419	return c
7420}
7421
7422// Context sets the context to be used in this call's Do method. Any
7423// pending HTTP request will be aborted if the provided context is
7424// canceled.
7425func (c *EnterprisesWebAppsPatchCall) Context(ctx context.Context) *EnterprisesWebAppsPatchCall {
7426	c.ctx_ = ctx
7427	return c
7428}
7429
7430// Header returns an http.Header that can be modified by the caller to
7431// add HTTP headers to the request.
7432func (c *EnterprisesWebAppsPatchCall) Header() http.Header {
7433	if c.header_ == nil {
7434		c.header_ = make(http.Header)
7435	}
7436	return c.header_
7437}
7438
7439func (c *EnterprisesWebAppsPatchCall) doRequest(alt string) (*http.Response, error) {
7440	reqHeaders := make(http.Header)
7441	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
7442	for k, v := range c.header_ {
7443		reqHeaders[k] = v
7444	}
7445	reqHeaders.Set("User-Agent", c.s.userAgent())
7446	var body io.Reader = nil
7447	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webapp)
7448	if err != nil {
7449		return nil, err
7450	}
7451	reqHeaders.Set("Content-Type", "application/json")
7452	c.urlParams_.Set("alt", alt)
7453	c.urlParams_.Set("prettyPrint", "false")
7454	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7455	urls += "?" + c.urlParams_.Encode()
7456	req, err := http.NewRequest("PATCH", urls, body)
7457	if err != nil {
7458		return nil, err
7459	}
7460	req.Header = reqHeaders
7461	googleapi.Expand(req.URL, map[string]string{
7462		"name": c.name,
7463	})
7464	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7465}
7466
7467// Do executes the "androidmanagement.enterprises.webApps.patch" call.
7468// Exactly one of *WebApp or error will be non-nil. Any non-2xx status
7469// code is an error. Response headers are in either
7470// *WebApp.ServerResponse.Header or (if a response was returned at all)
7471// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7472// check whether the returned error was because http.StatusNotModified
7473// was returned.
7474func (c *EnterprisesWebAppsPatchCall) Do(opts ...googleapi.CallOption) (*WebApp, 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, &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, err
7492	}
7493	ret := &WebApp{
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	//   "description": "Updates a web app.",
7506	//   "flatPath": "v1/enterprises/{enterprisesId}/webApps/{webAppsId}",
7507	//   "httpMethod": "PATCH",
7508	//   "id": "androidmanagement.enterprises.webApps.patch",
7509	//   "parameterOrder": [
7510	//     "name"
7511	//   ],
7512	//   "parameters": {
7513	//     "name": {
7514	//       "description": "The name of the web app in the form enterprises/{enterpriseId}/webApps/{packageName}.",
7515	//       "location": "path",
7516	//       "pattern": "^enterprises/[^/]+/webApps/[^/]+$",
7517	//       "required": true,
7518	//       "type": "string"
7519	//     },
7520	//     "updateMask": {
7521	//       "description": "The field mask indicating the fields to update. If not set, all modifiable fields will be modified.",
7522	//       "format": "google-fieldmask",
7523	//       "location": "query",
7524	//       "type": "string"
7525	//     }
7526	//   },
7527	//   "path": "v1/{+name}",
7528	//   "request": {
7529	//     "$ref": "WebApp"
7530	//   },
7531	//   "response": {
7532	//     "$ref": "WebApp"
7533	//   },
7534	//   "scopes": [
7535	//     "https://www.googleapis.com/auth/androidmanagement"
7536	//   ]
7537	// }
7538
7539}
7540
7541// method id "androidmanagement.enterprises.webTokens.create":
7542
7543type EnterprisesWebTokensCreateCall struct {
7544	s          *Service
7545	parent     string
7546	webtoken   *WebToken
7547	urlParams_ gensupport.URLParams
7548	ctx_       context.Context
7549	header_    http.Header
7550}
7551
7552// Create: Creates a web token to access an embeddable managed Google
7553// Play web UI for a given enterprise.
7554func (r *EnterprisesWebTokensService) Create(parent string, webtoken *WebToken) *EnterprisesWebTokensCreateCall {
7555	c := &EnterprisesWebTokensCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7556	c.parent = parent
7557	c.webtoken = webtoken
7558	return c
7559}
7560
7561// Fields allows partial responses to be retrieved. See
7562// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7563// for more information.
7564func (c *EnterprisesWebTokensCreateCall) Fields(s ...googleapi.Field) *EnterprisesWebTokensCreateCall {
7565	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7566	return c
7567}
7568
7569// Context sets the context to be used in this call's Do method. Any
7570// pending HTTP request will be aborted if the provided context is
7571// canceled.
7572func (c *EnterprisesWebTokensCreateCall) Context(ctx context.Context) *EnterprisesWebTokensCreateCall {
7573	c.ctx_ = ctx
7574	return c
7575}
7576
7577// Header returns an http.Header that can be modified by the caller to
7578// add HTTP headers to the request.
7579func (c *EnterprisesWebTokensCreateCall) Header() http.Header {
7580	if c.header_ == nil {
7581		c.header_ = make(http.Header)
7582	}
7583	return c.header_
7584}
7585
7586func (c *EnterprisesWebTokensCreateCall) doRequest(alt string) (*http.Response, error) {
7587	reqHeaders := make(http.Header)
7588	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
7589	for k, v := range c.header_ {
7590		reqHeaders[k] = v
7591	}
7592	reqHeaders.Set("User-Agent", c.s.userAgent())
7593	var body io.Reader = nil
7594	body, err := googleapi.WithoutDataWrapper.JSONReader(c.webtoken)
7595	if err != nil {
7596		return nil, err
7597	}
7598	reqHeaders.Set("Content-Type", "application/json")
7599	c.urlParams_.Set("alt", alt)
7600	c.urlParams_.Set("prettyPrint", "false")
7601	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/webTokens")
7602	urls += "?" + c.urlParams_.Encode()
7603	req, err := http.NewRequest("POST", urls, body)
7604	if err != nil {
7605		return nil, err
7606	}
7607	req.Header = reqHeaders
7608	googleapi.Expand(req.URL, map[string]string{
7609		"parent": c.parent,
7610	})
7611	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7612}
7613
7614// Do executes the "androidmanagement.enterprises.webTokens.create" call.
7615// Exactly one of *WebToken or error will be non-nil. Any non-2xx status
7616// code is an error. Response headers are in either
7617// *WebToken.ServerResponse.Header or (if a response was returned at
7618// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7619// to check whether the returned error was because
7620// http.StatusNotModified was returned.
7621func (c *EnterprisesWebTokensCreateCall) Do(opts ...googleapi.CallOption) (*WebToken, error) {
7622	gensupport.SetOptions(c.urlParams_, opts...)
7623	res, err := c.doRequest("json")
7624	if res != nil && res.StatusCode == http.StatusNotModified {
7625		if res.Body != nil {
7626			res.Body.Close()
7627		}
7628		return nil, &googleapi.Error{
7629			Code:   res.StatusCode,
7630			Header: res.Header,
7631		}
7632	}
7633	if err != nil {
7634		return nil, err
7635	}
7636	defer googleapi.CloseBody(res)
7637	if err := googleapi.CheckResponse(res); err != nil {
7638		return nil, err
7639	}
7640	ret := &WebToken{
7641		ServerResponse: googleapi.ServerResponse{
7642			Header:         res.Header,
7643			HTTPStatusCode: res.StatusCode,
7644		},
7645	}
7646	target := &ret
7647	if err := gensupport.DecodeResponse(target, res); err != nil {
7648		return nil, err
7649	}
7650	return ret, nil
7651	// {
7652	//   "description": "Creates a web token to access an embeddable managed Google Play web UI for a given enterprise.",
7653	//   "flatPath": "v1/enterprises/{enterprisesId}/webTokens",
7654	//   "httpMethod": "POST",
7655	//   "id": "androidmanagement.enterprises.webTokens.create",
7656	//   "parameterOrder": [
7657	//     "parent"
7658	//   ],
7659	//   "parameters": {
7660	//     "parent": {
7661	//       "description": "The name of the enterprise in the form enterprises/{enterpriseId}.",
7662	//       "location": "path",
7663	//       "pattern": "^enterprises/[^/]+$",
7664	//       "required": true,
7665	//       "type": "string"
7666	//     }
7667	//   },
7668	//   "path": "v1/{+parent}/webTokens",
7669	//   "request": {
7670	//     "$ref": "WebToken"
7671	//   },
7672	//   "response": {
7673	//     "$ref": "WebToken"
7674	//   },
7675	//   "scopes": [
7676	//     "https://www.googleapis.com/auth/androidmanagement"
7677	//   ]
7678	// }
7679
7680}
7681
7682// method id "androidmanagement.signupUrls.create":
7683
7684type SignupUrlsCreateCall struct {
7685	s          *Service
7686	urlParams_ gensupport.URLParams
7687	ctx_       context.Context
7688	header_    http.Header
7689}
7690
7691// Create: Creates an enterprise signup URL.
7692func (r *SignupUrlsService) Create() *SignupUrlsCreateCall {
7693	c := &SignupUrlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7694	return c
7695}
7696
7697// CallbackUrl sets the optional parameter "callbackUrl": The callback
7698// URL that the admin will be redirected to after successfully creating
7699// an enterprise. Before redirecting there the system will add a query
7700// parameter to this URL named enterpriseToken which will contain an
7701// opaque token to be used for the create enterprise request. The URL
7702// will be parsed then reformatted in order to add the enterpriseToken
7703// parameter, so there may be some minor formatting changes.
7704func (c *SignupUrlsCreateCall) CallbackUrl(callbackUrl string) *SignupUrlsCreateCall {
7705	c.urlParams_.Set("callbackUrl", callbackUrl)
7706	return c
7707}
7708
7709// ProjectId sets the optional parameter "projectId": The ID of the
7710// Google Cloud Platform project which will own the enterprise.
7711func (c *SignupUrlsCreateCall) ProjectId(projectId string) *SignupUrlsCreateCall {
7712	c.urlParams_.Set("projectId", projectId)
7713	return c
7714}
7715
7716// Fields allows partial responses to be retrieved. See
7717// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7718// for more information.
7719func (c *SignupUrlsCreateCall) Fields(s ...googleapi.Field) *SignupUrlsCreateCall {
7720	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7721	return c
7722}
7723
7724// Context sets the context to be used in this call's Do method. Any
7725// pending HTTP request will be aborted if the provided context is
7726// canceled.
7727func (c *SignupUrlsCreateCall) Context(ctx context.Context) *SignupUrlsCreateCall {
7728	c.ctx_ = ctx
7729	return c
7730}
7731
7732// Header returns an http.Header that can be modified by the caller to
7733// add HTTP headers to the request.
7734func (c *SignupUrlsCreateCall) Header() http.Header {
7735	if c.header_ == nil {
7736		c.header_ = make(http.Header)
7737	}
7738	return c.header_
7739}
7740
7741func (c *SignupUrlsCreateCall) doRequest(alt string) (*http.Response, error) {
7742	reqHeaders := make(http.Header)
7743	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114")
7744	for k, v := range c.header_ {
7745		reqHeaders[k] = v
7746	}
7747	reqHeaders.Set("User-Agent", c.s.userAgent())
7748	var body io.Reader = nil
7749	c.urlParams_.Set("alt", alt)
7750	c.urlParams_.Set("prettyPrint", "false")
7751	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/signupUrls")
7752	urls += "?" + c.urlParams_.Encode()
7753	req, err := http.NewRequest("POST", urls, body)
7754	if err != nil {
7755		return nil, err
7756	}
7757	req.Header = reqHeaders
7758	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7759}
7760
7761// Do executes the "androidmanagement.signupUrls.create" call.
7762// Exactly one of *SignupUrl or error will be non-nil. Any non-2xx
7763// status code is an error. Response headers are in either
7764// *SignupUrl.ServerResponse.Header or (if a response was returned at
7765// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7766// to check whether the returned error was because
7767// http.StatusNotModified was returned.
7768func (c *SignupUrlsCreateCall) Do(opts ...googleapi.CallOption) (*SignupUrl, error) {
7769	gensupport.SetOptions(c.urlParams_, opts...)
7770	res, err := c.doRequest("json")
7771	if res != nil && res.StatusCode == http.StatusNotModified {
7772		if res.Body != nil {
7773			res.Body.Close()
7774		}
7775		return nil, &googleapi.Error{
7776			Code:   res.StatusCode,
7777			Header: res.Header,
7778		}
7779	}
7780	if err != nil {
7781		return nil, err
7782	}
7783	defer googleapi.CloseBody(res)
7784	if err := googleapi.CheckResponse(res); err != nil {
7785		return nil, err
7786	}
7787	ret := &SignupUrl{
7788		ServerResponse: googleapi.ServerResponse{
7789			Header:         res.Header,
7790			HTTPStatusCode: res.StatusCode,
7791		},
7792	}
7793	target := &ret
7794	if err := gensupport.DecodeResponse(target, res); err != nil {
7795		return nil, err
7796	}
7797	return ret, nil
7798	// {
7799	//   "description": "Creates an enterprise signup URL.",
7800	//   "flatPath": "v1/signupUrls",
7801	//   "httpMethod": "POST",
7802	//   "id": "androidmanagement.signupUrls.create",
7803	//   "parameterOrder": [],
7804	//   "parameters": {
7805	//     "callbackUrl": {
7806	//       "description": "The callback URL that the admin will be redirected to after successfully creating an enterprise. Before redirecting there the system will add a query parameter to this URL named enterpriseToken which will contain an opaque token to be used for the create enterprise request. The URL will be parsed then reformatted in order to add the enterpriseToken parameter, so there may be some minor formatting changes.",
7807	//       "location": "query",
7808	//       "type": "string"
7809	//     },
7810	//     "projectId": {
7811	//       "description": "The ID of the Google Cloud Platform project which will own the enterprise.",
7812	//       "location": "query",
7813	//       "type": "string"
7814	//     }
7815	//   },
7816	//   "path": "v1/signupUrls",
7817	//   "response": {
7818	//     "$ref": "SignupUrl"
7819	//   },
7820	//   "scopes": [
7821	//     "https://www.googleapis.com/auth/androidmanagement"
7822	//   ]
7823	// }
7824
7825}
7826