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