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