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