1 // Copyright 2024 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 // # Library status 12 // 13 // These client libraries are officially supported by Google. However, this 14 // library is considered complete and is in maintenance mode. This means 15 // that we will address critical bugs and security issues but will not add 16 // any new features. 17 // 18 // When possible, we recommend using our newer 19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) 20 // that are still actively being worked and iterated on. 21 // 22 // # Creating a client 23 // 24 // Usage example: 25 // 26 // import "google.golang.org/api/androidmanagement/v1" 27 // ... 28 // ctx := context.Background() 29 // androidmanagementService, err := androidmanagement.NewService(ctx) 30 // 31 // In this example, Google Application Default Credentials are used for 32 // authentication. For information on how to create and obtain Application 33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 34 // 35 // # Other authentication options 36 // 37 // To use an API key for authentication (note: some APIs do not support API 38 // keys), use [google.golang.org/api/option.WithAPIKey]: 39 // 40 // androidmanagementService, err := androidmanagement.NewService(ctx, option.WithAPIKey("AIza...")) 41 // 42 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth 43 // flow, use [google.golang.org/api/option.WithTokenSource]: 44 // 45 // config := &oauth2.Config{...} 46 // // ... 47 // token, err := config.Exchange(ctx, ...) 48 // androidmanagementService, err := androidmanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 49 // 50 // See [google.golang.org/api/option.ClientOption] for details on options. 51 package androidmanagement // import "google.golang.org/api/androidmanagement/v1" 52 53 import ( 54 "bytes" 55 "context" 56 "encoding/json" 57 "errors" 58 "fmt" 59 "io" 60 "net/http" 61 "net/url" 62 "strconv" 63 "strings" 64 65 googleapi "google.golang.org/api/googleapi" 66 internal "google.golang.org/api/internal" 67 gensupport "google.golang.org/api/internal/gensupport" 68 option "google.golang.org/api/option" 69 internaloption "google.golang.org/api/option/internaloption" 70 htransport "google.golang.org/api/transport/http" 71 ) 72 73 // Always reference these packages, just in case the auto-generated code 74 // below doesn't. 75 var _ = bytes.NewBuffer 76 var _ = strconv.Itoa 77 var _ = fmt.Sprintf 78 var _ = json.NewDecoder 79 var _ = io.Copy 80 var _ = url.Parse 81 var _ = gensupport.MarshalJSON 82 var _ = googleapi.Version 83 var _ = errors.New 84 var _ = strings.Replace 85 var _ = context.Canceled 86 var _ = internaloption.WithDefaultEndpoint 87 var _ = internal.Version 88 89 const apiId = "androidmanagement:v1" 90 const apiName = "androidmanagement" 91 const apiVersion = "v1" 92 const basePath = "https://androidmanagement.googleapis.com/" 93 const basePathTemplate = "https://androidmanagement.UNIVERSE_DOMAIN/" 94 const mtlsBasePath = "https://androidmanagement.mtls.googleapis.com/" 95 96 // OAuth2 scopes used by this API. 97 const ( 98 // Manage Android devices and apps for your customers 99 AndroidmanagementScope = "https://www.googleapis.com/auth/androidmanagement" 100 ) 101 102 // NewService creates a new Service. 103 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 104 scopesOption := internaloption.WithDefaultScopes( 105 "https://www.googleapis.com/auth/androidmanagement", 106 ) 107 // NOTE: prepend, so we don't override user-specified scopes. 108 opts = append([]option.ClientOption{scopesOption}, opts...) 109 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 110 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) 111 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 112 opts = append(opts, internaloption.EnableNewAuthLibrary()) 113 client, endpoint, err := htransport.NewClient(ctx, opts...) 114 if err != nil { 115 return nil, err 116 } 117 s, err := New(client) 118 if err != nil { 119 return nil, err 120 } 121 if endpoint != "" { 122 s.BasePath = endpoint 123 } 124 return s, nil 125 } 126 127 // New creates a new Service. It uses the provided http.Client for requests. 128 // 129 // Deprecated: please use NewService instead. 130 // To provide a custom HTTP client, use option.WithHTTPClient. 131 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 132 func New(client *http.Client) (*Service, error) { 133 if client == nil { 134 return nil, errors.New("client is nil") 135 } 136 s := &Service{client: client, BasePath: basePath} 137 s.Enterprises = NewEnterprisesService(s) 138 s.ProvisioningInfo = NewProvisioningInfoService(s) 139 s.SignupUrls = NewSignupUrlsService(s) 140 return s, nil 141 } 142 143 type Service struct { 144 client *http.Client 145 BasePath string // API endpoint base URL 146 UserAgent string // optional additional User-Agent fragment 147 148 Enterprises *EnterprisesService 149 150 ProvisioningInfo *ProvisioningInfoService 151 152 SignupUrls *SignupUrlsService 153 } 154 155 func (s *Service) userAgent() string { 156 if s.UserAgent == "" { 157 return googleapi.UserAgent 158 } 159 return googleapi.UserAgent + " " + s.UserAgent 160 } 161 162 func NewEnterprisesService(s *Service) *EnterprisesService { 163 rs := &EnterprisesService{s: s} 164 rs.Applications = NewEnterprisesApplicationsService(s) 165 rs.Devices = NewEnterprisesDevicesService(s) 166 rs.EnrollmentTokens = NewEnterprisesEnrollmentTokensService(s) 167 rs.MigrationTokens = NewEnterprisesMigrationTokensService(s) 168 rs.Policies = NewEnterprisesPoliciesService(s) 169 rs.WebApps = NewEnterprisesWebAppsService(s) 170 rs.WebTokens = NewEnterprisesWebTokensService(s) 171 return rs 172 } 173 174 type EnterprisesService struct { 175 s *Service 176 177 Applications *EnterprisesApplicationsService 178 179 Devices *EnterprisesDevicesService 180 181 EnrollmentTokens *EnterprisesEnrollmentTokensService 182 183 MigrationTokens *EnterprisesMigrationTokensService 184 185 Policies *EnterprisesPoliciesService 186 187 WebApps *EnterprisesWebAppsService 188 189 WebTokens *EnterprisesWebTokensService 190 } 191 192 func NewEnterprisesApplicationsService(s *Service) *EnterprisesApplicationsService { 193 rs := &EnterprisesApplicationsService{s: s} 194 return rs 195 } 196 197 type EnterprisesApplicationsService struct { 198 s *Service 199 } 200 201 func NewEnterprisesDevicesService(s *Service) *EnterprisesDevicesService { 202 rs := &EnterprisesDevicesService{s: s} 203 rs.Operations = NewEnterprisesDevicesOperationsService(s) 204 return rs 205 } 206 207 type EnterprisesDevicesService struct { 208 s *Service 209 210 Operations *EnterprisesDevicesOperationsService 211 } 212 213 func NewEnterprisesDevicesOperationsService(s *Service) *EnterprisesDevicesOperationsService { 214 rs := &EnterprisesDevicesOperationsService{s: s} 215 return rs 216 } 217 218 type EnterprisesDevicesOperationsService struct { 219 s *Service 220 } 221 222 func NewEnterprisesEnrollmentTokensService(s *Service) *EnterprisesEnrollmentTokensService { 223 rs := &EnterprisesEnrollmentTokensService{s: s} 224 return rs 225 } 226 227 type EnterprisesEnrollmentTokensService struct { 228 s *Service 229 } 230 231 func NewEnterprisesMigrationTokensService(s *Service) *EnterprisesMigrationTokensService { 232 rs := &EnterprisesMigrationTokensService{s: s} 233 return rs 234 } 235 236 type EnterprisesMigrationTokensService struct { 237 s *Service 238 } 239 240 func NewEnterprisesPoliciesService(s *Service) *EnterprisesPoliciesService { 241 rs := &EnterprisesPoliciesService{s: s} 242 return rs 243 } 244 245 type EnterprisesPoliciesService struct { 246 s *Service 247 } 248 249 func NewEnterprisesWebAppsService(s *Service) *EnterprisesWebAppsService { 250 rs := &EnterprisesWebAppsService{s: s} 251 return rs 252 } 253 254 type EnterprisesWebAppsService struct { 255 s *Service 256 } 257 258 func NewEnterprisesWebTokensService(s *Service) *EnterprisesWebTokensService { 259 rs := &EnterprisesWebTokensService{s: s} 260 return rs 261 } 262 263 type EnterprisesWebTokensService struct { 264 s *Service 265 } 266 267 func NewProvisioningInfoService(s *Service) *ProvisioningInfoService { 268 rs := &ProvisioningInfoService{s: s} 269 return rs 270 } 271 272 type ProvisioningInfoService struct { 273 s *Service 274 } 275 276 func NewSignupUrlsService(s *Service) *SignupUrlsService { 277 rs := &SignupUrlsService{s: s} 278 return rs 279 } 280 281 type SignupUrlsService struct { 282 s *Service 283 } 284 285 // AdbShellCommandEvent: A shell command was issued over ADB via “adb shell 286 // command”. 287 type AdbShellCommandEvent struct { 288 // ShellCmd: Shell command that was issued over ADB via "adb shell command". 289 // Redacted to empty string on organization-owned managed profile devices. 290 ShellCmd string `json:"shellCmd,omitempty"` 291 // ForceSendFields is a list of field names (e.g. "ShellCmd") to 292 // unconditionally include in API requests. By default, fields with empty or 293 // default values are omitted from API requests. See 294 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 295 // details. 296 ForceSendFields []string `json:"-"` 297 // NullFields is a list of field names (e.g. "ShellCmd") to include in API 298 // requests with the JSON null value. By default, fields with empty values are 299 // omitted from API requests. See 300 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 301 NullFields []string `json:"-"` 302 } 303 304 func (s *AdbShellCommandEvent) MarshalJSON() ([]byte, error) { 305 type NoMethod AdbShellCommandEvent 306 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 307 } 308 309 // AdbShellInteractiveEvent: An ADB interactive shell was opened via “adb 310 // shell”. Intentionally empty. 311 type AdbShellInteractiveEvent struct { 312 } 313 314 // AdvancedSecurityOverrides: Advanced security settings. In most cases, 315 // setting these is not needed. 316 type AdvancedSecurityOverrides struct { 317 // CommonCriteriaMode: Controls Common Criteria Mode—security standards 318 // defined in the Common Criteria for Information Technology Security 319 // Evaluation (https://www.commoncriteriaportal.org/) (CC). Enabling Common 320 // Criteria Mode increases certain security components on a device, including 321 // AES-GCM encryption of Bluetooth Long Term Keys, and Wi-Fi configuration 322 // stores.Warning: Common Criteria Mode enforces a strict security model 323 // typically only required for IT products used in national security systems 324 // and other highly sensitive organizations. Standard device use may be 325 // affected. Only enabled if required. 326 // 327 // Possible values: 328 // "COMMON_CRITERIA_MODE_UNSPECIFIED" - Unspecified. Defaults to 329 // COMMON_CRITERIA_MODE_DISABLED. 330 // "COMMON_CRITERIA_MODE_DISABLED" - Default. Disables Common Criteria Mode. 331 // "COMMON_CRITERIA_MODE_ENABLED" - Enables Common Criteria Mode. 332 CommonCriteriaMode string `json:"commonCriteriaMode,omitempty"` 333 // DeveloperSettings: Controls access to developer settings: developer options 334 // and safe boot. Replaces safeBootDisabled (deprecated) and 335 // debuggingFeaturesAllowed (deprecated). 336 // 337 // Possible values: 338 // "DEVELOPER_SETTINGS_UNSPECIFIED" - Unspecified. Defaults to 339 // DEVELOPER_SETTINGS_DISABLED. 340 // "DEVELOPER_SETTINGS_DISABLED" - Default. Disables all developer settings 341 // and prevents the user from accessing them. 342 // "DEVELOPER_SETTINGS_ALLOWED" - Allows all developer settings. The user can 343 // access and optionally configure the settings. 344 DeveloperSettings string `json:"developerSettings,omitempty"` 345 // GooglePlayProtectVerifyApps: Whether Google Play Protect verification 346 // (https://support.google.com/accounts/answer/2812853) is enforced. Replaces 347 // ensureVerifyAppsEnabled (deprecated). 348 // 349 // Possible values: 350 // "GOOGLE_PLAY_PROTECT_VERIFY_APPS_UNSPECIFIED" - Unspecified. Defaults to 351 // VERIFY_APPS_ENFORCED. 352 // "VERIFY_APPS_ENFORCED" - Default. Force-enables app verification. 353 // "VERIFY_APPS_USER_CHOICE" - Allows the user to choose whether to enable 354 // app verification. 355 GooglePlayProtectVerifyApps string `json:"googlePlayProtectVerifyApps,omitempty"` 356 // MtePolicy: Optional. Controls Memory Tagging Extension (MTE) 357 // (https://source.android.com/docs/security/test/memory-safety/arm-mte) on the 358 // device. The device needs to be rebooted to apply changes to the MTE policy. 359 // 360 // Possible values: 361 // "MTE_POLICY_UNSPECIFIED" - Unspecified. Defaults to MTE_USER_CHOICE. 362 // "MTE_USER_CHOICE" - The user can choose to enable or disable MTE on the 363 // device if the device supports this. 364 // "MTE_ENFORCED" - MTE is enabled on the device and the user is not allowed 365 // to change this setting. This can be set on fully managed devices and work 366 // profiles on company-owned devices. A nonComplianceDetail with 367 // MANAGEMENT_MODE is reported for other management modes. A 368 // nonComplianceDetail with DEVICE_INCOMPATIBLE is reported if the device does 369 // not support MTE.Supported on Android 14 and above. A nonComplianceDetail 370 // with API_LEVEL is reported if the Android version is less than 14. 371 // "MTE_DISABLED" - MTE is disabled on the device and the user is not allowed 372 // to change this setting. This applies only on fully managed devices. In other 373 // cases, a nonComplianceDetail with MANAGEMENT_MODE is reported. A 374 // nonComplianceDetail with DEVICE_INCOMPATIBLE is reported if the device does 375 // not support MTE.Supported on Android 14 and above. A nonComplianceDetail 376 // with API_LEVEL is reported if the Android version is less than 14. 377 MtePolicy string `json:"mtePolicy,omitempty"` 378 // PersonalAppsThatCanReadWorkNotifications: Personal apps that can read work 379 // profile notifications using a NotificationListenerService 380 // (https://developer.android.com/reference/android/service/notification/NotificationListenerService). 381 // By default, no personal apps (aside from system apps) can read work 382 // notifications. Each value in the list must be a package name. 383 PersonalAppsThatCanReadWorkNotifications []string `json:"personalAppsThatCanReadWorkNotifications,omitempty"` 384 // UntrustedAppsPolicy: The policy for untrusted apps (apps from unknown 385 // sources) enforced on the device. Replaces install_unknown_sources_allowed 386 // (deprecated). 387 // 388 // Possible values: 389 // "UNTRUSTED_APPS_POLICY_UNSPECIFIED" - Unspecified. Defaults to 390 // DISALLOW_INSTALL. 391 // "DISALLOW_INSTALL" - Default. Disallow untrusted app installs on entire 392 // device. 393 // "ALLOW_INSTALL_IN_PERSONAL_PROFILE_ONLY" - For devices with work profiles, 394 // allow untrusted app installs in the device's personal profile only. 395 // "ALLOW_INSTALL_DEVICE_WIDE" - Allow untrusted app installs on entire 396 // device. 397 UntrustedAppsPolicy string `json:"untrustedAppsPolicy,omitempty"` 398 // ForceSendFields is a list of field names (e.g. "CommonCriteriaMode") to 399 // unconditionally include in API requests. By default, fields with empty or 400 // default values are omitted from API requests. See 401 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 402 // details. 403 ForceSendFields []string `json:"-"` 404 // NullFields is a list of field names (e.g. "CommonCriteriaMode") to include 405 // in API requests with the JSON null value. By default, fields with empty 406 // values are omitted from API requests. See 407 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 408 NullFields []string `json:"-"` 409 } 410 411 func (s *AdvancedSecurityOverrides) MarshalJSON() ([]byte, error) { 412 type NoMethod AdvancedSecurityOverrides 413 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 414 } 415 416 // AlwaysOnVpnPackage: Configuration for an always-on VPN connection. 417 type AlwaysOnVpnPackage struct { 418 // LockdownEnabled: Disallows networking when the VPN is not connected. 419 LockdownEnabled bool `json:"lockdownEnabled,omitempty"` 420 // PackageName: The package name of the VPN app. 421 PackageName string `json:"packageName,omitempty"` 422 // ForceSendFields is a list of field names (e.g. "LockdownEnabled") to 423 // unconditionally include in API requests. By default, fields with empty or 424 // default values are omitted from API requests. See 425 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 426 // details. 427 ForceSendFields []string `json:"-"` 428 // NullFields is a list of field names (e.g. "LockdownEnabled") to include in 429 // API requests with the JSON null value. By default, fields with empty values 430 // are omitted from API requests. See 431 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 432 NullFields []string `json:"-"` 433 } 434 435 func (s *AlwaysOnVpnPackage) MarshalJSON() ([]byte, error) { 436 type NoMethod AlwaysOnVpnPackage 437 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 438 } 439 440 // ApiLevelCondition: A compliance rule condition which is satisfied if the 441 // Android Framework API level on the device doesn't meet a minimum 442 // requirement. There can only be one rule with this type of condition per 443 // policy. 444 type ApiLevelCondition struct { 445 // MinApiLevel: The minimum desired Android Framework API level. If the device 446 // doesn't meet the minimum requirement, this condition is satisfied. Must be 447 // greater than zero. 448 MinApiLevel int64 `json:"minApiLevel,omitempty"` 449 // ForceSendFields is a list of field names (e.g. "MinApiLevel") to 450 // unconditionally include in API requests. By default, fields with empty or 451 // default values are omitted from API requests. See 452 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 453 // details. 454 ForceSendFields []string `json:"-"` 455 // NullFields is a list of field names (e.g. "MinApiLevel") to include in API 456 // requests with the JSON null value. By default, fields with empty values are 457 // omitted from API requests. See 458 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 459 NullFields []string `json:"-"` 460 } 461 462 func (s *ApiLevelCondition) MarshalJSON() ([]byte, error) { 463 type NoMethod ApiLevelCondition 464 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 465 } 466 467 // AppProcessInfo: Information about a process. It contains process name, start 468 // time, app Uid, app Pid, seinfo tag, hash of the base APK. 469 type AppProcessInfo struct { 470 // ApkSha256Hash: SHA-256 hash of the base APK, in hexadecimal format. 471 ApkSha256Hash string `json:"apkSha256Hash,omitempty"` 472 // PackageNames: Package names of all packages that are associated with the 473 // particular user ID. In most cases, this will be a single package name, the 474 // package that has been assigned that user ID. If multiple application share a 475 // UID then all packages sharing UID will be included. 476 PackageNames []string `json:"packageNames,omitempty"` 477 // Pid: Process ID. 478 Pid int64 `json:"pid,omitempty"` 479 // ProcessName: Process name. 480 ProcessName string `json:"processName,omitempty"` 481 // Seinfo: SELinux policy info. 482 Seinfo string `json:"seinfo,omitempty"` 483 // StartTime: Process start time. 484 StartTime string `json:"startTime,omitempty"` 485 // Uid: UID of the package. 486 Uid int64 `json:"uid,omitempty"` 487 // ForceSendFields is a list of field names (e.g. "ApkSha256Hash") to 488 // unconditionally include in API requests. By default, fields with empty or 489 // default values are omitted from API requests. See 490 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 491 // details. 492 ForceSendFields []string `json:"-"` 493 // NullFields is a list of field names (e.g. "ApkSha256Hash") to include in API 494 // requests with the JSON null value. By default, fields with empty values are 495 // omitted from API requests. See 496 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 497 NullFields []string `json:"-"` 498 } 499 500 func (s *AppProcessInfo) MarshalJSON() ([]byte, error) { 501 type NoMethod AppProcessInfo 502 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 503 } 504 505 // AppProcessStartEvent: An app process was started. This is available 506 // device-wide on fully managed devices and within the work profile on 507 // organization-owned devices with a work profile. 508 type AppProcessStartEvent struct { 509 // ProcessInfo: Information about a process. 510 ProcessInfo *AppProcessInfo `json:"processInfo,omitempty"` 511 // ForceSendFields is a list of field names (e.g. "ProcessInfo") to 512 // unconditionally include in API requests. By default, fields with empty or 513 // default values are omitted from API requests. See 514 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 515 // details. 516 ForceSendFields []string `json:"-"` 517 // NullFields is a list of field names (e.g. "ProcessInfo") to include in API 518 // requests with the JSON null value. By default, fields with empty values are 519 // omitted from API requests. See 520 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 521 NullFields []string `json:"-"` 522 } 523 524 func (s *AppProcessStartEvent) MarshalJSON() ([]byte, error) { 525 type NoMethod AppProcessStartEvent 526 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 527 } 528 529 // AppTrackInfo: Id to name association of a app track. 530 type AppTrackInfo struct { 531 // TrackAlias: The track name associated with the trackId, set in the Play 532 // Console. The name is modifiable from Play Console. 533 TrackAlias string `json:"trackAlias,omitempty"` 534 // TrackId: The unmodifiable unique track identifier, taken from the 535 // releaseTrackId in the URL of the Play Console page that displays the app’s 536 // track information. 537 TrackId string `json:"trackId,omitempty"` 538 // ForceSendFields is a list of field names (e.g. "TrackAlias") to 539 // unconditionally include in API requests. By default, fields with empty or 540 // default values are omitted from API requests. See 541 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 542 // details. 543 ForceSendFields []string `json:"-"` 544 // NullFields is a list of field names (e.g. "TrackAlias") to include in API 545 // requests with the JSON null value. By default, fields with empty values are 546 // omitted from API requests. See 547 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 548 NullFields []string `json:"-"` 549 } 550 551 func (s *AppTrackInfo) MarshalJSON() ([]byte, error) { 552 type NoMethod AppTrackInfo 553 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 554 } 555 556 // AppVersion: This represents a single version of the app. 557 type AppVersion struct { 558 // Production: If the value is True, it indicates that this version is a 559 // production track. 560 Production bool `json:"production,omitempty"` 561 // TrackIds: Track identifiers that the app version is published in. This does 562 // not include the production track (see production instead). 563 TrackIds []string `json:"trackIds,omitempty"` 564 // VersionCode: Unique increasing identifier for the app version. 565 VersionCode int64 `json:"versionCode,omitempty"` 566 // VersionString: The string used in the Play store by the app developer to 567 // identify the version. The string is not necessarily unique or localized (for 568 // example, the string could be "1.4"). 569 VersionString string `json:"versionString,omitempty"` 570 // ForceSendFields is a list of field names (e.g. "Production") to 571 // unconditionally include in API requests. By default, fields with empty or 572 // default values are omitted from API requests. See 573 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 574 // details. 575 ForceSendFields []string `json:"-"` 576 // NullFields is a list of field names (e.g. "Production") to include in API 577 // requests with the JSON null value. By default, fields with empty values are 578 // omitted from API requests. See 579 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 580 NullFields []string `json:"-"` 581 } 582 583 func (s *AppVersion) MarshalJSON() ([]byte, error) { 584 type NoMethod AppVersion 585 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 586 } 587 588 // Application: Information about an app. 589 type Application struct { 590 // AppPricing: Whether this app is free, free with in-app purchases, or paid. 591 // If the pricing is unspecified, this means the app is not generally available 592 // anymore (even though it might still be available to people who own it). 593 // 594 // Possible values: 595 // "APP_PRICING_UNSPECIFIED" - Unknown pricing, used to denote an approved 596 // app that is not generally available. 597 // "FREE" - The app is free. 598 // "FREE_WITH_IN_APP_PURCHASE" - The app is free, but offers in-app 599 // purchases. 600 // "PAID" - The app is paid. 601 AppPricing string `json:"appPricing,omitempty"` 602 // AppTracks: Application tracks visible to the enterprise. 603 AppTracks []*AppTrackInfo `json:"appTracks,omitempty"` 604 // AppVersions: Versions currently available for this app. 605 AppVersions []*AppVersion `json:"appVersions,omitempty"` 606 // Author: The name of the author of the apps (for example, the app developer). 607 Author string `json:"author,omitempty"` 608 // AvailableCountries: The countries which this app is available in as per ISO 609 // 3166-1 alpha-2. 610 AvailableCountries []string `json:"availableCountries,omitempty"` 611 // Category: The app category (e.g. RACING, SOCIAL, etc.) 612 Category string `json:"category,omitempty"` 613 // ContentRating: The content rating for this app. 614 // 615 // Possible values: 616 // "CONTENT_RATING_UNSPECIFIED" - Unspecified. 617 // "THREE_YEARS" - Content suitable for ages 3 and above only. 618 // "SEVEN_YEARS" - Content suitable for ages 7 and above only. 619 // "TWELVE_YEARS" - Content suitable for ages 12 and above only. 620 // "SIXTEEN_YEARS" - Content suitable for ages 16 and above only. 621 // "EIGHTEEN_YEARS" - Content suitable for ages 18 and above only. 622 ContentRating string `json:"contentRating,omitempty"` 623 // Description: The localized promotional description, if available. 624 Description string `json:"description,omitempty"` 625 // DistributionChannel: How and to whom the package is made available. 626 // 627 // Possible values: 628 // "DISTRIBUTION_CHANNEL_UNSPECIFIED" - Unspecified. 629 // "PUBLIC_GOOGLE_HOSTED" - Package is available through the Play store and 630 // not restricted to a specific enterprise. 631 // "PRIVATE_GOOGLE_HOSTED" - Package is a private app (restricted to an 632 // enterprise) but hosted by Google. 633 // "PRIVATE_SELF_HOSTED" - Private app (restricted to an enterprise) and is 634 // privately hosted. 635 DistributionChannel string `json:"distributionChannel,omitempty"` 636 // Features: Noteworthy features (if any) of this app. 637 // 638 // Possible values: 639 // "APP_FEATURE_UNSPECIFIED" - Unspecified. 640 // "VPN_APP" - The app is a VPN. 641 Features []string `json:"features,omitempty"` 642 // FullDescription: Full app description, if available. 643 FullDescription string `json:"fullDescription,omitempty"` 644 // IconUrl: A link to an image that can be used as an icon for the app. This 645 // image is suitable for use up to a pixel size of 512 x 512. 646 IconUrl string `json:"iconUrl,omitempty"` 647 // ManagedProperties: The set of managed properties available to be 648 // pre-configured for the app. 649 ManagedProperties []*ManagedProperty `json:"managedProperties,omitempty"` 650 // MinAndroidSdkVersion: The minimum Android SDK necessary to run the app. 651 MinAndroidSdkVersion int64 `json:"minAndroidSdkVersion,omitempty"` 652 // Name: The name of the app in the form 653 // enterprises/{enterprise}/applications/{package_name}. 654 Name string `json:"name,omitempty"` 655 // Permissions: The permissions required by the app. 656 Permissions []*ApplicationPermission `json:"permissions,omitempty"` 657 // PlayStoreUrl: A link to the (consumer) Google Play details page for the app. 658 PlayStoreUrl string `json:"playStoreUrl,omitempty"` 659 // RecentChanges: A localised description of the recent changes made to the 660 // app. 661 RecentChanges string `json:"recentChanges,omitempty"` 662 // ScreenshotUrls: A list of screenshot links representing the app. 663 ScreenshotUrls []string `json:"screenshotUrls,omitempty"` 664 // SmallIconUrl: A link to a smaller image that can be used as an icon for the 665 // app. This image is suitable for use up to a pixel size of 128 x 128. 666 SmallIconUrl string `json:"smallIconUrl,omitempty"` 667 // Title: The title of the app. Localized. 668 Title string `json:"title,omitempty"` 669 // UpdateTime: Output only. The approximate time (within 7 days) the app was 670 // last published. 671 UpdateTime string `json:"updateTime,omitempty"` 672 673 // ServerResponse contains the HTTP response code and headers from the server. 674 googleapi.ServerResponse `json:"-"` 675 // ForceSendFields is a list of field names (e.g. "AppPricing") to 676 // unconditionally include in API requests. By default, fields with empty or 677 // default values are omitted from API requests. See 678 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 679 // details. 680 ForceSendFields []string `json:"-"` 681 // NullFields is a list of field names (e.g. "AppPricing") to include in API 682 // requests with the JSON null value. By default, fields with empty values are 683 // omitted from API requests. See 684 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 685 NullFields []string `json:"-"` 686 } 687 688 func (s *Application) MarshalJSON() ([]byte, error) { 689 type NoMethod Application 690 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 691 } 692 693 // ApplicationEvent: An app-related event. 694 type ApplicationEvent struct { 695 // CreateTime: The creation time of the event. 696 CreateTime string `json:"createTime,omitempty"` 697 // EventType: App event type. 698 // 699 // Possible values: 700 // "APPLICATION_EVENT_TYPE_UNSPECIFIED" - This value is disallowed. 701 // "INSTALLED" - The app was installed. 702 // "CHANGED" - The app was changed, for example, a component was enabled or 703 // disabled. 704 // "DATA_CLEARED" - The app data was cleared. 705 // "REMOVED" - The app was removed. 706 // "REPLACED" - A new version of the app has been installed, replacing the 707 // old version. 708 // "RESTARTED" - The app was restarted. 709 // "PINNED" - The app was pinned to the foreground. 710 // "UNPINNED" - The app was unpinned. 711 EventType string `json:"eventType,omitempty"` 712 // ForceSendFields is a list of field names (e.g. "CreateTime") to 713 // unconditionally include in API requests. By default, fields with empty or 714 // default values are omitted from API requests. See 715 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 716 // details. 717 ForceSendFields []string `json:"-"` 718 // NullFields is a list of field names (e.g. "CreateTime") to include in API 719 // requests with the JSON null value. By default, fields with empty values are 720 // omitted from API requests. See 721 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 722 NullFields []string `json:"-"` 723 } 724 725 func (s *ApplicationEvent) MarshalJSON() ([]byte, error) { 726 type NoMethod ApplicationEvent 727 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 728 } 729 730 // ApplicationPermission: A permission required by the app. 731 type ApplicationPermission struct { 732 // Description: A longer description of the permission, providing more detail 733 // on what it affects. Localized. 734 Description string `json:"description,omitempty"` 735 // Name: The name of the permission. Localized. 736 Name string `json:"name,omitempty"` 737 // PermissionId: An opaque string uniquely identifying the permission. Not 738 // localized. 739 PermissionId string `json:"permissionId,omitempty"` 740 // ForceSendFields is a list of field names (e.g. "Description") to 741 // unconditionally include in API requests. By default, fields with empty or 742 // default values are omitted from API requests. See 743 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 744 // details. 745 ForceSendFields []string `json:"-"` 746 // NullFields is a list of field names (e.g. "Description") to include in API 747 // requests with the JSON null value. By default, fields with empty values are 748 // omitted from API requests. See 749 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 750 NullFields []string `json:"-"` 751 } 752 753 func (s *ApplicationPermission) MarshalJSON() ([]byte, error) { 754 type NoMethod ApplicationPermission 755 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 756 } 757 758 // ApplicationPolicy: Policy for an individual app. Note: Application 759 // availability on a given device cannot be changed using this policy if 760 // installAppsDisabled is enabled. The maximum number of applications that you 761 // can specify per policy is 3,000. 762 type ApplicationPolicy struct { 763 // AccessibleTrackIds: List of the app’s track IDs that a device belonging to 764 // the enterprise can access. If the list contains multiple track IDs, devices 765 // receive the latest version among all accessible tracks. If the list contains 766 // no track IDs, devices only have access to the app’s production track. More 767 // details about each track are available in AppTrackInfo. 768 AccessibleTrackIds []string `json:"accessibleTrackIds,omitempty"` 769 // AlwaysOnVpnLockdownExemption: Specifies whether the app is allowed 770 // networking when the VPN is not connected and 771 // alwaysOnVpnPackage.lockdownEnabled is enabled. If set to 772 // VPN_LOCKDOWN_ENFORCED, the app is not allowed networking, and if set to 773 // VPN_LOCKDOWN_EXEMPTION, the app is allowed networking. Only supported on 774 // devices running Android 10 and above. If this is not supported by the 775 // device, the device will contain a NonComplianceDetail with 776 // non_compliance_reason set to API_LEVEL and a fieldPath. If this is not 777 // applicable to the app, the device will contain a NonComplianceDetail with 778 // non_compliance_reason set to UNSUPPORTED and a fieldPath. The fieldPath is 779 // set to applications[i].alwaysOnVpnLockdownExemption, where i is the index of 780 // the package in the applications policy. 781 // 782 // Possible values: 783 // "ALWAYS_ON_VPN_LOCKDOWN_EXEMPTION_UNSPECIFIED" - Unspecified. Defaults to 784 // VPN_LOCKDOWN_ENFORCED. 785 // "VPN_LOCKDOWN_ENFORCED" - The app respects the always-on VPN lockdown 786 // setting. 787 // "VPN_LOCKDOWN_EXEMPTION" - The app is exempt from the always-on VPN 788 // lockdown setting. 789 AlwaysOnVpnLockdownExemption string `json:"alwaysOnVpnLockdownExemption,omitempty"` 790 // AutoUpdateMode: Controls the auto-update mode for the app. 791 // 792 // Possible values: 793 // "AUTO_UPDATE_MODE_UNSPECIFIED" - Unspecified. Defaults to 794 // AUTO_UPDATE_DEFAULT. 795 // "AUTO_UPDATE_DEFAULT" - The default update mode.The app is automatically 796 // updated with low priority to minimize the impact on the user.The app is 797 // updated when all of the following constraints are met: The device is not 798 // actively used. The device is connected to an unmetered network. The device 799 // is charging. The app to be updated is not running in the foreground.The 800 // device is notified about a new update within 24 hours after it is published 801 // by the developer, after which the app is updated the next time the 802 // constraints above are met. 803 // "AUTO_UPDATE_POSTPONED" - The app is not automatically updated for a 804 // maximum of 90 days after the app becomes out of date.90 days after the app 805 // becomes out of date, the latest available version is installed automatically 806 // with low priority (see AUTO_UPDATE_DEFAULT). After the app is updated it is 807 // not automatically updated again until 90 days after it becomes out of date 808 // again.The user can still manually update the app from the Play Store at any 809 // time. 810 // "AUTO_UPDATE_HIGH_PRIORITY" - The app is updated as soon as possible. No 811 // constraints are applied.The device is notified as soon as possible about a 812 // new update after it becomes available. 813 AutoUpdateMode string `json:"autoUpdateMode,omitempty"` 814 // ConnectedWorkAndPersonalApp: Controls whether the app can communicate with 815 // itself across a device’s work and personal profiles, subject to user 816 // consent. 817 // 818 // Possible values: 819 // "CONNECTED_WORK_AND_PERSONAL_APP_UNSPECIFIED" - Unspecified. Defaults to 820 // CONNECTED_WORK_AND_PERSONAL_APPS_DISALLOWED. 821 // "CONNECTED_WORK_AND_PERSONAL_APP_DISALLOWED" - Default. Prevents the app 822 // from communicating cross-profile. 823 // "CONNECTED_WORK_AND_PERSONAL_APP_ALLOWED" - Allows the app to communicate 824 // across profiles after receiving user consent. 825 ConnectedWorkAndPersonalApp string `json:"connectedWorkAndPersonalApp,omitempty"` 826 // CredentialProviderPolicy: Optional. Whether the app is allowed to act as a 827 // credential provider on Android 14 and above. 828 // 829 // Possible values: 830 // "CREDENTIAL_PROVIDER_POLICY_UNSPECIFIED" - Unspecified. The behaviour is 831 // governed by credentialProviderPolicyDefault. 832 // "CREDENTIAL_PROVIDER_ALLOWED" - App is allowed to act as a credential 833 // provider. 834 CredentialProviderPolicy string `json:"credentialProviderPolicy,omitempty"` 835 // DefaultPermissionPolicy: The default policy for all permissions requested by 836 // the app. If specified, this overrides the policy-level 837 // default_permission_policy which applies to all apps. It does not override 838 // the permission_grants which applies to all apps. 839 // 840 // Possible values: 841 // "PERMISSION_POLICY_UNSPECIFIED" - Policy not specified. If no policy is 842 // specified for a permission at any level, then the PROMPT behavior is used by 843 // default. 844 // "PROMPT" - Prompt the user to grant a permission. 845 // "GRANT" - Automatically grant a permission.On Android 12 and above, 846 // Manifest.permission.READ_SMS 847 // (https://developer.android.com/reference/android/Manifest.permission#READ_SMS) 848 // and following sensor-related permissions can only be granted on fully 849 // managed devices: Manifest.permission.ACCESS_FINE_LOCATION 850 // (https://developer.android.com/reference/android/Manifest.permission#ACCESS_FINE_LOCATION) 851 // Manifest.permission.ACCESS_BACKGROUND_LOCATION 852 // (https://developer.android.com/reference/android/Manifest.permission#ACCESS_BACKGROUND_LOCATION) 853 // Manifest.permission.ACCESS_COARSE_LOCATION 854 // (https://developer.android.com/reference/android/Manifest.permission#ACCESS_COARSE_LOCATION) 855 // Manifest.permission.CAMERA 856 // (https://developer.android.com/reference/android/Manifest.permission#CAMERA) 857 // Manifest.permission.RECORD_AUDIO 858 // (https://developer.android.com/reference/android/Manifest.permission#RECORD_AUDIO) 859 // Manifest.permission.ACTIVITY_RECOGNITION 860 // (https://developer.android.com/reference/android/Manifest.permission#ACTIVITY_RECOGNITION) 861 // Manifest.permission.BODY_SENSORS 862 // (https://developer.android.com/reference/android/Manifest.permission#BODY_SENSORS) 863 // "DENY" - Automatically deny a permission. 864 DefaultPermissionPolicy string `json:"defaultPermissionPolicy,omitempty"` 865 // DelegatedScopes: The scopes delegated to the app from Android Device Policy. 866 // These provide additional privileges for the applications they are applied 867 // to. 868 // 869 // Possible values: 870 // "DELEGATED_SCOPE_UNSPECIFIED" - No delegation scope specified. 871 // "CERT_INSTALL" - Grants access to certificate installation and management. 872 // "MANAGED_CONFIGURATIONS" - Grants access to managed configurations 873 // management. 874 // "BLOCK_UNINSTALL" - Grants access to blocking uninstallation. 875 // "PERMISSION_GRANT" - Grants access to permission policy and permission 876 // grant state. 877 // "PACKAGE_ACCESS" - Grants access to package access state. 878 // "ENABLE_SYSTEM_APP" - Grants access for enabling system apps. 879 // "NETWORK_ACTIVITY_LOGS" - Grants access to network activity logs. Allows 880 // the delegated application to call setNetworkLoggingEnabled 881 // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setNetworkLoggingEnabled%28android.content.ComponentName,%20boolean%29), 882 // isNetworkLoggingEnabled 883 // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#isNetworkLoggingEnabled%28android.content.ComponentName%29) 884 // and retrieveNetworkLogs 885 // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrieveNetworkLogs%28android.content.ComponentName,%20long%29) 886 // methods. This scope can be delegated to at most one application. Supported 887 // for fully managed devices on Android 10 and above. Supported for a work 888 // profile on Android 12 and above. When delegation is supported and set, 889 // NETWORK_ACTIVITY_LOGS is ignored. 890 // "SECURITY_LOGS" - Grants access to security logs. Allows the delegated 891 // application to call setSecurityLoggingEnabled 892 // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setSecurityLoggingEnabled%28android.content.ComponentName,%20boolean%29), 893 // isSecurityLoggingEnabled 894 // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#isSecurityLoggingEnabled%28android.content.ComponentName%29), 895 // retrieveSecurityLogs 896 // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrieveSecurityLogs%28android.content.ComponentName%29) 897 // and retrievePreRebootSecurityLogs 898 // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrievePreRebootSecurityLogs%28android.content.ComponentName%29) 899 // methods. This scope can be delegated to at most one application. Supported 900 // for fully managed devices and company-owned devices with a work profile on 901 // Android 12 and above. When delegation is supported and set, SECURITY_LOGS is 902 // ignored. 903 // "CERT_SELECTION" - Grants access to selection of KeyChain certificates on 904 // behalf of requesting apps. Once granted, the delegated application will 905 // start receiving DelegatedAdminReceiver#onChoosePrivateKeyAlias 906 // (https://developer.android.com/reference/android/app/admin/DelegatedAdminReceiver#onChoosePrivateKeyAlias%28android.content.Context,%20android.content.Intent,%20int,%20android.net.Uri,%20java.lang.String%29). 907 // Allows the delegated application to call grantKeyPairToApp 908 // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#grantKeyPairToApp%28android.content.ComponentName,%20java.lang.String,%20java.lang.String%29) 909 // and revokeKeyPairFromApp 910 // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#revokeKeyPairFromApp%28android.content.ComponentName,%20java.lang.String,%20java.lang.String%29) 911 // methods. There can be at most one app that has this delegation. 912 // choosePrivateKeyRules must be empty and privateKeySelectionEnabled has no 913 // effect if certificate selection is delegated to an application. 914 DelegatedScopes []string `json:"delegatedScopes,omitempty"` 915 // Disabled: Whether the app is disabled. When disabled, the app data is still 916 // preserved. 917 Disabled bool `json:"disabled,omitempty"` 918 // ExtensionConfig: Configuration to enable this app as an extension app, with 919 // the capability of interacting with Android Device Policy offline.This field 920 // can be set for at most one app. 921 ExtensionConfig *ExtensionConfig `json:"extensionConfig,omitempty"` 922 // InstallConstraint: Optional. The constraints for installing the app. You can 923 // specify a maximum of one InstallConstraint. Multiple constraints are 924 // rejected. 925 InstallConstraint []*InstallConstraint `json:"installConstraint,omitempty"` 926 // InstallPriority: Optional. Amongst apps with installType set to: 927 // FORCE_INSTALLED PREINSTALLEDthis controls the relative priority of 928 // installation. A value of 0 (default) means this app has no priority over 929 // other apps. For values between 1 and 10,000, a lower value means a higher 930 // priority. Values outside of the range 0 to 10,000 inclusive are rejected. 931 InstallPriority int64 `json:"installPriority,omitempty"` 932 // InstallType: The type of installation to perform. 933 // 934 // Possible values: 935 // "INSTALL_TYPE_UNSPECIFIED" - Unspecified. Defaults to AVAILABLE. 936 // "PREINSTALLED" - The app is automatically installed and can be removed by 937 // the user. 938 // "FORCE_INSTALLED" - The app is automatically installed regardless of a set 939 // maintenance window and can't be removed by the user. 940 // "BLOCKED" - The app is blocked and can't be installed. If the app was 941 // installed under a previous policy, it will be uninstalled. This also blocks 942 // its instant app functionality. 943 // "AVAILABLE" - The app is available to install. 944 // "REQUIRED_FOR_SETUP" - The app is automatically installed and can't be 945 // removed by the user and will prevent setup from completion until 946 // installation is complete. 947 // "KIOSK" - The app is automatically installed in kiosk mode: it's set as 948 // the preferred home intent and whitelisted for lock task mode. Device setup 949 // won't complete until the app is installed. After installation, users won't 950 // be able to remove the app. You can only set this installType for one app per 951 // policy. When this is present in the policy, status bar will be automatically 952 // disabled. 953 InstallType string `json:"installType,omitempty"` 954 // LockTaskAllowed: Whether the app is allowed to lock itself in full-screen 955 // mode. DEPRECATED. Use InstallType KIOSK or kioskCustomLauncherEnabled to 956 // configure a dedicated device. 957 LockTaskAllowed bool `json:"lockTaskAllowed,omitempty"` 958 // ManagedConfiguration: Managed configuration applied to the app. The format 959 // for the configuration is dictated by the ManagedProperty values supported by 960 // the app. Each field name in the managed configuration must match the key 961 // field of the ManagedProperty. The field value must be compatible with the 962 // type of the ManagedProperty: *type* *JSON value* BOOL true or false STRING 963 // string INTEGER number CHOICE string MULTISELECT array of strings HIDDEN 964 // string BUNDLE_ARRAY array of objects 965 ManagedConfiguration googleapi.RawMessage `json:"managedConfiguration,omitempty"` 966 // ManagedConfigurationTemplate: The managed configurations template for the 967 // app, saved from the managed configurations iframe. This field is ignored if 968 // managed_configuration is set. 969 ManagedConfigurationTemplate *ManagedConfigurationTemplate `json:"managedConfigurationTemplate,omitempty"` 970 // MinimumVersionCode: The minimum version of the app that runs on the device. 971 // If set, the device attempts to update the app to at least this version code. 972 // If the app is not up-to-date, the device will contain a NonComplianceDetail 973 // with non_compliance_reason set to APP_NOT_UPDATED. The app must already be 974 // published to Google Play with a version code greater than or equal to this 975 // value. At most 20 apps may specify a minimum version code per policy. 976 MinimumVersionCode int64 `json:"minimumVersionCode,omitempty"` 977 // PackageName: The package name of the app. For example, 978 // com.google.android.youtube for the YouTube app. 979 PackageName string `json:"packageName,omitempty"` 980 // PermissionGrants: Explicit permission grants or denials for the app. These 981 // values override the default_permission_policy and permission_grants which 982 // apply to all apps. 983 PermissionGrants []*PermissionGrant `json:"permissionGrants,omitempty"` 984 // WorkProfileWidgets: Specifies whether the app installed in the work profile 985 // is allowed to add widgets to the home screen. 986 // 987 // Possible values: 988 // "WORK_PROFILE_WIDGETS_UNSPECIFIED" - Unspecified. Defaults to 989 // work_profile_widgets_default 990 // "WORK_PROFILE_WIDGETS_ALLOWED" - Work profile widgets are allowed. This 991 // means the application will be able to add widgets to the home screen. 992 // "WORK_PROFILE_WIDGETS_DISALLOWED" - Work profile widgets are disallowed. 993 // This means the application will not be able to add widgets to the home 994 // screen. 995 WorkProfileWidgets string `json:"workProfileWidgets,omitempty"` 996 // ForceSendFields is a list of field names (e.g. "AccessibleTrackIds") to 997 // unconditionally include in API requests. By default, fields with empty or 998 // default values are omitted from API requests. See 999 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1000 // details. 1001 ForceSendFields []string `json:"-"` 1002 // NullFields is a list of field names (e.g. "AccessibleTrackIds") to include 1003 // in API requests with the JSON null value. By default, fields with empty 1004 // values are omitted from API requests. See 1005 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1006 NullFields []string `json:"-"` 1007 } 1008 1009 func (s *ApplicationPolicy) MarshalJSON() ([]byte, error) { 1010 type NoMethod ApplicationPolicy 1011 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1012 } 1013 1014 // ApplicationReport: Information reported about an installed app. 1015 type ApplicationReport struct { 1016 // ApplicationSource: The source of the package. 1017 // 1018 // Possible values: 1019 // "APPLICATION_SOURCE_UNSPECIFIED" - The app was sideloaded from an 1020 // unspecified source. 1021 // "SYSTEM_APP_FACTORY_VERSION" - This is a system app from the device's 1022 // factory image. 1023 // "SYSTEM_APP_UPDATED_VERSION" - This is an updated system app. 1024 // "INSTALLED_FROM_PLAY_STORE" - The app was installed from the Google Play 1025 // Store. 1026 ApplicationSource string `json:"applicationSource,omitempty"` 1027 // DisplayName: The display name of the app. 1028 DisplayName string `json:"displayName,omitempty"` 1029 // Events: The list of app events which have occurred in the last 30 hours. 1030 Events []*ApplicationEvent `json:"events,omitempty"` 1031 // InstallerPackageName: The package name of the app that installed this app. 1032 InstallerPackageName string `json:"installerPackageName,omitempty"` 1033 // KeyedAppStates: List of keyed app states reported by the app. 1034 KeyedAppStates []*KeyedAppState `json:"keyedAppStates,omitempty"` 1035 // PackageName: Package name of the app. 1036 PackageName string `json:"packageName,omitempty"` 1037 // PackageSha256Hash: The SHA-256 hash of the app's APK file, which can be used 1038 // to verify the app hasn't been modified. Each byte of the hash value is 1039 // represented as a two-digit hexadecimal number. 1040 PackageSha256Hash string `json:"packageSha256Hash,omitempty"` 1041 // SigningKeyCertFingerprints: The SHA-1 hash of each 1042 // android.content.pm.Signature 1043 // (https://developer.android.com/reference/android/content/pm/Signature.html) 1044 // associated with the app package. Each byte of each hash value is represented 1045 // as a two-digit hexadecimal number. 1046 SigningKeyCertFingerprints []string `json:"signingKeyCertFingerprints,omitempty"` 1047 // State: Application state. 1048 // 1049 // Possible values: 1050 // "APPLICATION_STATE_UNSPECIFIED" - App state is unspecified 1051 // "REMOVED" - App was removed from the device 1052 // "INSTALLED" - App is installed on the device 1053 State string `json:"state,omitempty"` 1054 // UserFacingType: Whether the app is user facing. 1055 // 1056 // Possible values: 1057 // "USER_FACING_TYPE_UNSPECIFIED" - App user facing type is unspecified. 1058 // "NOT_USER_FACING" - App is not user facing. 1059 // "USER_FACING" - App is user facing. 1060 UserFacingType string `json:"userFacingType,omitempty"` 1061 // VersionCode: The app version code, which can be used to determine whether 1062 // one version is more recent than another. 1063 VersionCode int64 `json:"versionCode,omitempty"` 1064 // VersionName: The app version as displayed to the user. 1065 VersionName string `json:"versionName,omitempty"` 1066 // ForceSendFields is a list of field names (e.g. "ApplicationSource") to 1067 // unconditionally include in API requests. By default, fields with empty or 1068 // default values are omitted from API requests. See 1069 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1070 // details. 1071 ForceSendFields []string `json:"-"` 1072 // NullFields is a list of field names (e.g. "ApplicationSource") to include in 1073 // API requests with the JSON null value. By default, fields with empty values 1074 // are omitted from API requests. See 1075 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1076 NullFields []string `json:"-"` 1077 } 1078 1079 func (s *ApplicationReport) MarshalJSON() ([]byte, error) { 1080 type NoMethod ApplicationReport 1081 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1082 } 1083 1084 // ApplicationReportingSettings: Settings controlling the behavior of 1085 // application reports. 1086 type ApplicationReportingSettings struct { 1087 // IncludeRemovedApps: Whether removed apps are included in application 1088 // reports. 1089 IncludeRemovedApps bool `json:"includeRemovedApps,omitempty"` 1090 // ForceSendFields is a list of field names (e.g. "IncludeRemovedApps") to 1091 // unconditionally include in API requests. By default, fields with empty or 1092 // default values are omitted from API requests. See 1093 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1094 // details. 1095 ForceSendFields []string `json:"-"` 1096 // NullFields is a list of field names (e.g. "IncludeRemovedApps") to include 1097 // in API requests with the JSON null value. By default, fields with empty 1098 // values are omitted from API requests. See 1099 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1100 NullFields []string `json:"-"` 1101 } 1102 1103 func (s *ApplicationReportingSettings) MarshalJSON() ([]byte, error) { 1104 type NoMethod ApplicationReportingSettings 1105 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1106 } 1107 1108 // BatchUsageLogEvents: Batched event logs of events from the device. 1109 type BatchUsageLogEvents struct { 1110 // Device: The name of the device in the form 1111 // ‘enterprises/{enterpriseId}/devices/{deviceId}’ 1112 Device string `json:"device,omitempty"` 1113 // RetrievalTime: The device timestamp when the batch of events were collected 1114 // from the device. 1115 RetrievalTime string `json:"retrievalTime,omitempty"` 1116 // UsageLogEvents: The list of UsageLogEvent that were reported by the device, 1117 // sorted chronologically by the event time. 1118 UsageLogEvents []*UsageLogEvent `json:"usageLogEvents,omitempty"` 1119 // User: The resource name of the user that owns this device in the form 1120 // ‘enterprises/{enterpriseId}/users/{userId}’. 1121 User string `json:"user,omitempty"` 1122 // ForceSendFields is a list of field names (e.g. "Device") to unconditionally 1123 // include in API requests. By default, fields with empty or default values are 1124 // omitted from API requests. See 1125 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1126 // details. 1127 ForceSendFields []string `json:"-"` 1128 // NullFields is a list of field names (e.g. "Device") to include in API 1129 // requests with the JSON null value. By default, fields with empty values are 1130 // omitted from API requests. See 1131 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1132 NullFields []string `json:"-"` 1133 } 1134 1135 func (s *BatchUsageLogEvents) MarshalJSON() ([]byte, error) { 1136 type NoMethod BatchUsageLogEvents 1137 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1138 } 1139 1140 // BlockAction: An action to block access to apps and data on a fully managed 1141 // device or in a work profile. This action also triggers a device or work 1142 // profile to displays a user-facing notification with information (where 1143 // possible) on how to correct the compliance issue. Note: wipeAction must also 1144 // be specified. 1145 type BlockAction struct { 1146 // BlockAfterDays: Number of days the policy is non-compliant before the device 1147 // or work profile is blocked. To block access immediately, set to 0. 1148 // blockAfterDays must be less than wipeAfterDays. 1149 BlockAfterDays int64 `json:"blockAfterDays,omitempty"` 1150 // BlockScope: Specifies the scope of this BlockAction. Only applicable to 1151 // devices that are company-owned. 1152 // 1153 // Possible values: 1154 // "BLOCK_SCOPE_UNSPECIFIED" - Unspecified. Defaults to 1155 // BLOCK_SCOPE_WORK_PROFILE. 1156 // "BLOCK_SCOPE_WORK_PROFILE" - Block action is only applied to apps in the 1157 // work profile. Apps in the personal profile are unaffected. 1158 // "BLOCK_SCOPE_DEVICE" - Block action is applied to the entire device, 1159 // including apps in the personal profile. 1160 BlockScope string `json:"blockScope,omitempty"` 1161 // ForceSendFields is a list of field names (e.g. "BlockAfterDays") to 1162 // unconditionally include in API requests. By default, fields with empty or 1163 // default values are omitted from API requests. See 1164 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1165 // details. 1166 ForceSendFields []string `json:"-"` 1167 // NullFields is a list of field names (e.g. "BlockAfterDays") to include in 1168 // API requests with the JSON null value. By default, fields with empty values 1169 // are omitted from API requests. See 1170 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1171 NullFields []string `json:"-"` 1172 } 1173 1174 func (s *BlockAction) MarshalJSON() ([]byte, error) { 1175 type NoMethod BlockAction 1176 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1177 } 1178 1179 // CertAuthorityInstalledEvent: A new root certificate was installed into the 1180 // system's trusted credential storage. This is available device-wide on fully 1181 // managed devices and within the work profile on organization-owned devices 1182 // with a work profile. 1183 type CertAuthorityInstalledEvent struct { 1184 // Certificate: Subject of the certificate. 1185 Certificate string `json:"certificate,omitempty"` 1186 // Success: Whether the installation event succeeded. 1187 Success bool `json:"success,omitempty"` 1188 // UserId: The user in which the certificate install event happened. Only 1189 // available for devices running Android 11 and above. 1190 UserId int64 `json:"userId,omitempty"` 1191 // ForceSendFields is a list of field names (e.g. "Certificate") to 1192 // unconditionally include in API requests. By default, fields with empty or 1193 // default values are omitted from API requests. See 1194 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1195 // details. 1196 ForceSendFields []string `json:"-"` 1197 // NullFields is a list of field names (e.g. "Certificate") to include in API 1198 // requests with the JSON null value. By default, fields with empty values are 1199 // omitted from API requests. See 1200 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1201 NullFields []string `json:"-"` 1202 } 1203 1204 func (s *CertAuthorityInstalledEvent) MarshalJSON() ([]byte, error) { 1205 type NoMethod CertAuthorityInstalledEvent 1206 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1207 } 1208 1209 // CertAuthorityRemovedEvent: A root certificate was removed from the system's 1210 // trusted credential storage. This is available device-wide on fully managed 1211 // devices and within the work profile on organization-owned devices with a 1212 // work profile. 1213 type CertAuthorityRemovedEvent struct { 1214 // Certificate: Subject of the certificate. 1215 Certificate string `json:"certificate,omitempty"` 1216 // Success: Whether the removal succeeded. 1217 Success bool `json:"success,omitempty"` 1218 // UserId: The user in which the certificate removal event occurred. Only 1219 // available for devices running Android 11 and above. 1220 UserId int64 `json:"userId,omitempty"` 1221 // ForceSendFields is a list of field names (e.g. "Certificate") to 1222 // unconditionally include in API requests. By default, fields with empty or 1223 // default values are omitted from API requests. See 1224 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1225 // details. 1226 ForceSendFields []string `json:"-"` 1227 // NullFields is a list of field names (e.g. "Certificate") to include in API 1228 // requests with the JSON null value. By default, fields with empty values are 1229 // omitted from API requests. See 1230 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1231 NullFields []string `json:"-"` 1232 } 1233 1234 func (s *CertAuthorityRemovedEvent) MarshalJSON() ([]byte, error) { 1235 type NoMethod CertAuthorityRemovedEvent 1236 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1237 } 1238 1239 // CertValidationFailureEvent: An X.509v3 certificate failed to validate, 1240 // currently this validation is performed on the Wi-FI access point and failure 1241 // may be due to a mismatch upon server certificate validation. However it may 1242 // in the future include other validation events of an X.509v3 certificate. 1243 type CertValidationFailureEvent struct { 1244 // FailureReason: The reason why certification validation failed. 1245 FailureReason string `json:"failureReason,omitempty"` 1246 // ForceSendFields is a list of field names (e.g. "FailureReason") to 1247 // unconditionally include in API requests. By default, fields with empty or 1248 // default values are omitted from API requests. See 1249 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1250 // details. 1251 ForceSendFields []string `json:"-"` 1252 // NullFields is a list of field names (e.g. "FailureReason") to include in API 1253 // requests with the JSON null value. By default, fields with empty values are 1254 // omitted from API requests. See 1255 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1256 NullFields []string `json:"-"` 1257 } 1258 1259 func (s *CertValidationFailureEvent) MarshalJSON() ([]byte, error) { 1260 type NoMethod CertValidationFailureEvent 1261 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1262 } 1263 1264 // ChoosePrivateKeyRule: Controls apps' access to private keys. The rule 1265 // determines which private key, if any, Android Device Policy grants to the 1266 // specified app. Access is granted either when the app calls 1267 // KeyChain.choosePrivateKeyAlias 1268 // (https://developer.android.com/reference/android/security/KeyChain#choosePrivateKeyAlias%28android.app.Activity,%20android.security.KeyChainAliasCallback,%20java.lang.String[],%20java.security.Principal[],%20java.lang.String,%20int,%20java.lang.String%29) 1269 // (or any overloads) to request a private key alias for a given URL, or for 1270 // rules that are not URL-specific (that is, if urlPattern is not set, or set 1271 // to the empty string or .*) on Android 11 and above, directly so that the app 1272 // can call KeyChain.getPrivateKey 1273 // (https://developer.android.com/reference/android/security/KeyChain#getPrivateKey%28android.content.Context,%20java.lang.String%29), 1274 // without first having to call KeyChain.choosePrivateKeyAlias.When an app 1275 // calls KeyChain.choosePrivateKeyAlias if more than one choosePrivateKeyRules 1276 // matches, the last matching rule defines which key alias to return. 1277 type ChoosePrivateKeyRule struct { 1278 // PackageNames: The package names to which this rule applies. The hash of the 1279 // signing certificate for each app is verified against the hash provided by 1280 // Play. If no package names are specified, then the alias is provided to all 1281 // apps that call KeyChain.choosePrivateKeyAlias 1282 // (https://developer.android.com/reference/android/security/KeyChain#choosePrivateKeyAlias%28android.app.Activity,%20android.security.KeyChainAliasCallback,%20java.lang.String[],%20java.security.Principal[],%20java.lang.String,%20int,%20java.lang.String%29) 1283 // or any overloads (but not without calling KeyChain.choosePrivateKeyAlias, 1284 // even on Android 11 and above). Any app with the same Android UID as a 1285 // package specified here will have access when they call 1286 // KeyChain.choosePrivateKeyAlias. 1287 PackageNames []string `json:"packageNames,omitempty"` 1288 // PrivateKeyAlias: The alias of the private key to be used. 1289 PrivateKeyAlias string `json:"privateKeyAlias,omitempty"` 1290 // UrlPattern: The URL pattern to match against the URL of the request. If not 1291 // set or empty, it matches all URLs. This uses the regular expression syntax 1292 // of java.util.regex.Pattern. 1293 UrlPattern string `json:"urlPattern,omitempty"` 1294 // ForceSendFields is a list of field names (e.g. "PackageNames") to 1295 // unconditionally include in API requests. By default, fields with empty or 1296 // default values are omitted from API requests. See 1297 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1298 // details. 1299 ForceSendFields []string `json:"-"` 1300 // NullFields is a list of field names (e.g. "PackageNames") to include in API 1301 // requests with the JSON null value. By default, fields with empty values are 1302 // omitted from API requests. See 1303 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1304 NullFields []string `json:"-"` 1305 } 1306 1307 func (s *ChoosePrivateKeyRule) MarshalJSON() ([]byte, error) { 1308 type NoMethod ChoosePrivateKeyRule 1309 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1310 } 1311 1312 // ClearAppsDataParams: Parameters associated with the CLEAR_APP_DATA command 1313 // to clear the data of specified apps from the device. 1314 type ClearAppsDataParams struct { 1315 // PackageNames: The package names of the apps whose data will be cleared when 1316 // the command is executed. 1317 PackageNames []string `json:"packageNames,omitempty"` 1318 // ForceSendFields is a list of field names (e.g. "PackageNames") to 1319 // unconditionally include in API requests. By default, fields with empty or 1320 // default values are omitted from API requests. See 1321 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1322 // details. 1323 ForceSendFields []string `json:"-"` 1324 // NullFields is a list of field names (e.g. "PackageNames") to include in API 1325 // requests with the JSON null value. By default, fields with empty values are 1326 // omitted from API requests. See 1327 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1328 NullFields []string `json:"-"` 1329 } 1330 1331 func (s *ClearAppsDataParams) MarshalJSON() ([]byte, error) { 1332 type NoMethod ClearAppsDataParams 1333 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1334 } 1335 1336 // ClearAppsDataStatus: Status of the CLEAR_APP_DATA command to clear the data 1337 // of specified apps from the device. 1338 type ClearAppsDataStatus struct { 1339 // Results: The per-app results, a mapping from package names to the respective 1340 // clearing result. 1341 Results map[string]PerAppResult `json:"results,omitempty"` 1342 // ForceSendFields is a list of field names (e.g. "Results") to unconditionally 1343 // include in API requests. By default, fields with empty or default values are 1344 // omitted from API requests. See 1345 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1346 // details. 1347 ForceSendFields []string `json:"-"` 1348 // NullFields is a list of field names (e.g. "Results") to include in API 1349 // requests with the JSON null value. By default, fields with empty values are 1350 // omitted from API requests. See 1351 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1352 NullFields []string `json:"-"` 1353 } 1354 1355 func (s *ClearAppsDataStatus) MarshalJSON() ([]byte, error) { 1356 type NoMethod ClearAppsDataStatus 1357 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1358 } 1359 1360 // Command: A command. 1361 type Command struct { 1362 // ClearAppsDataParams: Parameters for the CLEAR_APP_DATA command to clear the 1363 // data of specified apps from the device. See ClearAppsDataParams. If this is 1364 // set, then it is suggested that type should not be set. In this case, the 1365 // server automatically sets it to CLEAR_APP_DATA. It is also acceptable to 1366 // explicitly set type to CLEAR_APP_DATA. 1367 ClearAppsDataParams *ClearAppsDataParams `json:"clearAppsDataParams,omitempty"` 1368 // ClearAppsDataStatus: Output only. Status of the CLEAR_APP_DATA command to 1369 // clear the data of specified apps from the device. See ClearAppsDataStatus. 1370 ClearAppsDataStatus *ClearAppsDataStatus `json:"clearAppsDataStatus,omitempty"` 1371 // CreateTime: The timestamp at which the command was created. The timestamp is 1372 // automatically generated by the server. 1373 CreateTime string `json:"createTime,omitempty"` 1374 // Duration: The duration for which the command is valid. The command will 1375 // expire if not executed by the device during this time. The default duration 1376 // if unspecified is ten minutes. There is no maximum duration. 1377 Duration string `json:"duration,omitempty"` 1378 // ErrorCode: If the command failed, an error code explaining the failure. This 1379 // is not set when the command is cancelled by the caller. 1380 // 1381 // Possible values: 1382 // "COMMAND_ERROR_CODE_UNSPECIFIED" - There was no error. 1383 // "UNKNOWN" - An unknown error occurred. 1384 // "API_LEVEL" - The API level of the device does not support this command. 1385 // "MANAGEMENT_MODE" - The management mode (profile owner, device owner, 1386 // etc.) does not support the command. 1387 // "INVALID_VALUE" - The command has an invalid parameter value. 1388 // "UNSUPPORTED" - The device doesn't support the command. Updating Android 1389 // Device Policy to the latest version may resolve the issue. 1390 ErrorCode string `json:"errorCode,omitempty"` 1391 // NewPassword: For commands of type RESET_PASSWORD, optionally specifies the 1392 // new password. Note: The new password must be at least 6 characters long if 1393 // it is numeric in case of Android 14 devices. Else the command will fail with 1394 // INVALID_VALUE. 1395 NewPassword string `json:"newPassword,omitempty"` 1396 // ResetPasswordFlags: For commands of type RESET_PASSWORD, optionally 1397 // specifies flags. 1398 // 1399 // Possible values: 1400 // "RESET_PASSWORD_FLAG_UNSPECIFIED" - This value is ignored. 1401 // "REQUIRE_ENTRY" - Don't allow other admins to change the password again 1402 // until the user has entered it. 1403 // "DO_NOT_ASK_CREDENTIALS_ON_BOOT" - Don't ask for user credentials on 1404 // device boot. 1405 // "LOCK_NOW" - Lock the device after password reset. 1406 ResetPasswordFlags []string `json:"resetPasswordFlags,omitempty"` 1407 // StartLostModeParams: Parameters for the START_LOST_MODE command to put the 1408 // device into lost mode. See StartLostModeParams. If this is set, then it is 1409 // suggested that type should not be set. In this case, the server 1410 // automatically sets it to START_LOST_MODE. It is also acceptable to 1411 // explicitly set type to START_LOST_MODE. 1412 StartLostModeParams *StartLostModeParams `json:"startLostModeParams,omitempty"` 1413 // StartLostModeStatus: Output only. Status of the START_LOST_MODE command to 1414 // put the device into lost mode. See StartLostModeStatus. 1415 StartLostModeStatus *StartLostModeStatus `json:"startLostModeStatus,omitempty"` 1416 // StopLostModeParams: Parameters for the STOP_LOST_MODE command to take the 1417 // device out of lost mode. See StopLostModeParams. If this is set, then it is 1418 // suggested that type should not be set. In this case, the server 1419 // automatically sets it to STOP_LOST_MODE. It is also acceptable to explicitly 1420 // set type to STOP_LOST_MODE. 1421 StopLostModeParams *StopLostModeParams `json:"stopLostModeParams,omitempty"` 1422 // StopLostModeStatus: Output only. Status of the STOP_LOST_MODE command to 1423 // take the device out of lost mode. See StopLostModeStatus. 1424 StopLostModeStatus *StopLostModeStatus `json:"stopLostModeStatus,omitempty"` 1425 // Type: The type of the command. 1426 // 1427 // Possible values: 1428 // "COMMAND_TYPE_UNSPECIFIED" - This value is disallowed. 1429 // "LOCK" - Lock the device, as if the lock screen timeout had expired. 1430 // "RESET_PASSWORD" - Reset the user's password. 1431 // "REBOOT" - Reboot the device. Only supported on fully managed devices 1432 // running Android 7.0 (API level 24) or higher. 1433 // "RELINQUISH_OWNERSHIP" - Removes the work profile and all policies from a 1434 // company-owned Android 8.0+ device, relinquishing the device for personal 1435 // use. Apps and data associated with the personal profile(s) are preserved. 1436 // The device will be deleted from the server after it acknowledges the 1437 // command. 1438 // "CLEAR_APP_DATA" - Clears the application data of specified apps. This is 1439 // supported on Android 9 and above. Note that an application can store data 1440 // outside of its application data, for example in external storage or in a 1441 // user dictionary. See also clear_apps_data_params. 1442 // "START_LOST_MODE" - Puts the device into lost mode. Only supported on 1443 // fully managed devices or organization-owned devices with a managed profile. 1444 // See also start_lost_mode_params. 1445 // "STOP_LOST_MODE" - Takes the device out of lost mode. Only supported on 1446 // fully managed devices or organization-owned devices with a managed profile. 1447 // See also stop_lost_mode_params. 1448 Type string `json:"type,omitempty"` 1449 // UserName: The resource name of the user that owns the device in the form 1450 // enterprises/{enterpriseId}/users/{userId}. This is automatically generated 1451 // by the server based on the device the command is sent to. 1452 UserName string `json:"userName,omitempty"` 1453 // ForceSendFields is a list of field names (e.g. "ClearAppsDataParams") to 1454 // unconditionally include in API requests. By default, fields with empty or 1455 // default values are omitted from API requests. See 1456 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1457 // details. 1458 ForceSendFields []string `json:"-"` 1459 // NullFields is a list of field names (e.g. "ClearAppsDataParams") to include 1460 // in API requests with the JSON null value. By default, fields with empty 1461 // values are omitted from API requests. See 1462 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1463 NullFields []string `json:"-"` 1464 } 1465 1466 func (s *Command) MarshalJSON() ([]byte, error) { 1467 type NoMethod Command 1468 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1469 } 1470 1471 // CommonCriteriaModeInfo: Information about Common Criteria Mode—security 1472 // standards defined in the Common Criteria for Information Technology Security 1473 // Evaluation (https://www.commoncriteriaportal.org/) (CC).This information is 1474 // only available if statusReportingSettings.commonCriteriaModeEnabled is true 1475 // in the device's policy. 1476 type CommonCriteriaModeInfo struct { 1477 // CommonCriteriaModeStatus: Whether Common Criteria Mode is enabled. 1478 // 1479 // Possible values: 1480 // "COMMON_CRITERIA_MODE_STATUS_UNKNOWN" - Unknown status. 1481 // "COMMON_CRITERIA_MODE_DISABLED" - Common Criteria Mode is currently 1482 // disabled. 1483 // "COMMON_CRITERIA_MODE_ENABLED" - Common Criteria Mode is currently 1484 // enabled. 1485 CommonCriteriaModeStatus string `json:"commonCriteriaModeStatus,omitempty"` 1486 // ForceSendFields is a list of field names (e.g. "CommonCriteriaModeStatus") 1487 // to unconditionally include in API requests. By default, fields with empty or 1488 // default values are omitted from API requests. See 1489 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1490 // details. 1491 ForceSendFields []string `json:"-"` 1492 // NullFields is a list of field names (e.g. "CommonCriteriaModeStatus") to 1493 // include in API requests with the JSON null value. By default, fields with 1494 // empty values are omitted from API requests. See 1495 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1496 NullFields []string `json:"-"` 1497 } 1498 1499 func (s *CommonCriteriaModeInfo) MarshalJSON() ([]byte, error) { 1500 type NoMethod CommonCriteriaModeInfo 1501 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1502 } 1503 1504 // ComplianceRule: A rule declaring which mitigating actions to take when a 1505 // device is not compliant with its policy. For every rule, there is always an 1506 // implicit mitigating action to set policy_compliant to false for the Device 1507 // resource, and display a message on the device indicating that the device is 1508 // not compliant with its policy. Other mitigating actions may optionally be 1509 // taken as well, depending on the field values in the rule. 1510 type ComplianceRule struct { 1511 // ApiLevelCondition: A condition which is satisfied if the Android Framework 1512 // API level on the device doesn't meet a minimum requirement. 1513 ApiLevelCondition *ApiLevelCondition `json:"apiLevelCondition,omitempty"` 1514 // DisableApps: If set to true, the rule includes a mitigating action to 1515 // disable apps so that the device is effectively disabled, but app data is 1516 // preserved. If the device is running an app in locked task mode, the app will 1517 // be closed and a UI showing the reason for non-compliance will be displayed. 1518 DisableApps bool `json:"disableApps,omitempty"` 1519 // NonComplianceDetailCondition: A condition which is satisfied if there exists 1520 // any matching NonComplianceDetail for the device. 1521 NonComplianceDetailCondition *NonComplianceDetailCondition `json:"nonComplianceDetailCondition,omitempty"` 1522 // PackageNamesToDisable: If set, the rule includes a mitigating action to 1523 // disable apps specified in the list, but app data is preserved. 1524 PackageNamesToDisable []string `json:"packageNamesToDisable,omitempty"` 1525 // ForceSendFields is a list of field names (e.g. "ApiLevelCondition") to 1526 // unconditionally include in API requests. By default, fields with empty or 1527 // default values are omitted from API requests. See 1528 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1529 // details. 1530 ForceSendFields []string `json:"-"` 1531 // NullFields is a list of field names (e.g. "ApiLevelCondition") to include in 1532 // API requests with the JSON null value. By default, fields with empty values 1533 // are omitted from API requests. See 1534 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1535 NullFields []string `json:"-"` 1536 } 1537 1538 func (s *ComplianceRule) MarshalJSON() ([]byte, error) { 1539 type NoMethod ComplianceRule 1540 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1541 } 1542 1543 // ConnectEvent: A TCP connect event was initiated through the standard network 1544 // stack. 1545 type ConnectEvent struct { 1546 // DestinationIpAddress: The destination IP address of the connect call. 1547 DestinationIpAddress string `json:"destinationIpAddress,omitempty"` 1548 // DestinationPort: The destination port of the connect call. 1549 DestinationPort int64 `json:"destinationPort,omitempty"` 1550 // PackageName: The package name of the UID that performed the connect call. 1551 PackageName string `json:"packageName,omitempty"` 1552 // ForceSendFields is a list of field names (e.g. "DestinationIpAddress") to 1553 // unconditionally include in API requests. By default, fields with empty or 1554 // default values are omitted from API requests. See 1555 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1556 // details. 1557 ForceSendFields []string `json:"-"` 1558 // NullFields is a list of field names (e.g. "DestinationIpAddress") to include 1559 // in API requests with the JSON null value. By default, fields with empty 1560 // values are omitted from API requests. See 1561 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1562 NullFields []string `json:"-"` 1563 } 1564 1565 func (s *ConnectEvent) MarshalJSON() ([]byte, error) { 1566 type NoMethod ConnectEvent 1567 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1568 } 1569 1570 // ContactInfo: Contact details for managed Google Play enterprises. 1571 type ContactInfo struct { 1572 // ContactEmail: Email address for a point of contact, which will be used to 1573 // send important announcements related to managed Google Play. 1574 ContactEmail string `json:"contactEmail,omitempty"` 1575 // DataProtectionOfficerEmail: The email of the data protection officer. The 1576 // email is validated but not verified. 1577 DataProtectionOfficerEmail string `json:"dataProtectionOfficerEmail,omitempty"` 1578 // DataProtectionOfficerName: The name of the data protection officer. 1579 DataProtectionOfficerName string `json:"dataProtectionOfficerName,omitempty"` 1580 // DataProtectionOfficerPhone: The phone number of the data protection officer 1581 // The phone number is validated but not verified. 1582 DataProtectionOfficerPhone string `json:"dataProtectionOfficerPhone,omitempty"` 1583 // EuRepresentativeEmail: The email of the EU representative. The email is 1584 // validated but not verified. 1585 EuRepresentativeEmail string `json:"euRepresentativeEmail,omitempty"` 1586 // EuRepresentativeName: The name of the EU representative. 1587 EuRepresentativeName string `json:"euRepresentativeName,omitempty"` 1588 // EuRepresentativePhone: The phone number of the EU representative. The phone 1589 // number is validated but not verified. 1590 EuRepresentativePhone string `json:"euRepresentativePhone,omitempty"` 1591 // ForceSendFields is a list of field names (e.g. "ContactEmail") to 1592 // unconditionally include in API requests. By default, fields with empty or 1593 // default values are omitted from API requests. See 1594 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1595 // details. 1596 ForceSendFields []string `json:"-"` 1597 // NullFields is a list of field names (e.g. "ContactEmail") to include in API 1598 // requests with the JSON null value. By default, fields with empty values are 1599 // omitted from API requests. See 1600 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1601 NullFields []string `json:"-"` 1602 } 1603 1604 func (s *ContactInfo) MarshalJSON() ([]byte, error) { 1605 type NoMethod ContactInfo 1606 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1607 } 1608 1609 // ContentProviderEndpoint: This feature is not generally available. 1610 type ContentProviderEndpoint struct { 1611 // PackageName: This feature is not generally available. 1612 PackageName string `json:"packageName,omitempty"` 1613 // SigningCertsSha256: Required. This feature is not generally available. 1614 SigningCertsSha256 []string `json:"signingCertsSha256,omitempty"` 1615 // Uri: This feature is not generally available. 1616 Uri string `json:"uri,omitempty"` 1617 // ForceSendFields is a list of field names (e.g. "PackageName") to 1618 // unconditionally include in API requests. By default, fields with empty or 1619 // default values are omitted from API requests. See 1620 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1621 // details. 1622 ForceSendFields []string `json:"-"` 1623 // NullFields is a list of field names (e.g. "PackageName") to include in API 1624 // requests with the JSON null value. By default, fields with empty values are 1625 // omitted from API requests. See 1626 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1627 NullFields []string `json:"-"` 1628 } 1629 1630 func (s *ContentProviderEndpoint) MarshalJSON() ([]byte, error) { 1631 type NoMethod ContentProviderEndpoint 1632 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1633 } 1634 1635 // CrossProfilePolicies: Controls the data from the work profile that can be 1636 // accessed from the personal profile and vice versa. A nonComplianceDetail 1637 // with MANAGEMENT_MODE is reported if the device does not have a work profile. 1638 type CrossProfilePolicies struct { 1639 // CrossProfileCopyPaste: Whether text copied from one profile (personal or 1640 // work) can be pasted in the other profile. 1641 // 1642 // Possible values: 1643 // "CROSS_PROFILE_COPY_PASTE_UNSPECIFIED" - Unspecified. Defaults to 1644 // COPY_FROM_WORK_TO_PERSONAL_DISALLOWED 1645 // "COPY_FROM_WORK_TO_PERSONAL_DISALLOWED" - Default. Prevents users from 1646 // pasting into the personal profile text copied from the work profile. Text 1647 // copied from the personal profile can be pasted into the work profile, and 1648 // text copied from the work profile can be pasted into the work profile. 1649 // "CROSS_PROFILE_COPY_PASTE_ALLOWED" - Text copied in either profile can be 1650 // pasted in the other profile. 1651 CrossProfileCopyPaste string `json:"crossProfileCopyPaste,omitempty"` 1652 // CrossProfileDataSharing: Whether data from one profile (personal or work) 1653 // can be shared with apps in the other profile. Specifically controls simple 1654 // data sharing via intents. Management of other cross-profile communication 1655 // channels, such as contact search, copy/paste, or connected work & personal 1656 // apps, are configured separately. 1657 // 1658 // Possible values: 1659 // "CROSS_PROFILE_DATA_SHARING_UNSPECIFIED" - Unspecified. Defaults to 1660 // DATA_SHARING_FROM_WORK_TO_PERSONAL_DISALLOWED. 1661 // "CROSS_PROFILE_DATA_SHARING_DISALLOWED" - Prevents data from being shared 1662 // from both the personal profile to the work profile and the work profile to 1663 // the personal profile. 1664 // "DATA_SHARING_FROM_WORK_TO_PERSONAL_DISALLOWED" - Default. Prevents users 1665 // from sharing data from the work profile to apps in the personal profile. 1666 // Personal data can be shared with work apps. 1667 // "CROSS_PROFILE_DATA_SHARING_ALLOWED" - Data from either profile can be 1668 // shared with the other profile. 1669 CrossProfileDataSharing string `json:"crossProfileDataSharing,omitempty"` 1670 // ExemptionsToShowWorkContactsInPersonalProfile: List of apps which are 1671 // excluded from the ShowWorkContactsInPersonalProfile setting. For this to be 1672 // set, ShowWorkContactsInPersonalProfile must be set to one of the following 1673 // values: SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_ALLOWED. In this case, these 1674 // exemptions act as a blocklist. 1675 // SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_DISALLOWED. In this case, these 1676 // exemptions act as an allowlist. 1677 // SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_DISALLOWED_EXCEPT_SYSTEM. In this 1678 // case, these exemptions act as an allowlist, in addition to the already 1679 // allowlisted system apps.Supported on Android 14 and above. A 1680 // nonComplianceDetail with API_LEVEL is reported if the Android version is 1681 // less than 14. 1682 ExemptionsToShowWorkContactsInPersonalProfile *PackageNameList `json:"exemptionsToShowWorkContactsInPersonalProfile,omitempty"` 1683 // ShowWorkContactsInPersonalProfile: Whether personal apps can access contacts 1684 // stored in the work profile.See also 1685 // exemptions_to_show_work_contacts_in_personal_profile. 1686 // 1687 // Possible values: 1688 // "SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_UNSPECIFIED" - Unspecified. 1689 // Defaults to SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_ALLOWED.When this is set, 1690 // exemptions_to_show_work_contacts_in_personal_profile must not be set. 1691 // "SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_DISALLOWED" - Prevents personal 1692 // apps from accessing work profile contacts and looking up work contacts.When 1693 // this is set, personal apps specified in 1694 // exemptions_to_show_work_contacts_in_personal_profile are allowlisted and can 1695 // access work profile contacts directly.Supported on Android 7.0 and above. A 1696 // nonComplianceDetail with API_LEVEL is reported if the Android version is 1697 // less than 7.0. 1698 // "SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_ALLOWED" - Default. Allows apps in 1699 // the personal profile to access work profile contacts including contact 1700 // searches and incoming calls.When this is set, personal apps specified in 1701 // exemptions_to_show_work_contacts_in_personal_profile are blocklisted and can 1702 // not access work profile contacts directly.Supported on Android 7.0 and 1703 // above. A nonComplianceDetail with API_LEVEL is reported if the Android 1704 // version is less than 7.0. 1705 // "SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_DISALLOWED_EXCEPT_SYSTEM" - 1706 // Prevents most personal apps from accessing work profile contacts including 1707 // contact searches and incoming calls, except for the OEM default Dialer, 1708 // Messages, and Contacts apps. Neither user-configured Dialer, Messages, and 1709 // Contacts apps, nor any other system or play installed apps, will be able to 1710 // query work contacts directly.When this is set, personal apps specified in 1711 // exemptions_to_show_work_contacts_in_personal_profile are allowlisted and can 1712 // access work profile contacts.Supported on Android 14 and above. If this is 1713 // set on a device with Android version less than 14, the behaviour falls back 1714 // to SHOW_WORK_CONTACTS_IN_PERSONAL_PROFILE_DISALLOWED and a 1715 // nonComplianceDetail with API_LEVEL is reported. 1716 ShowWorkContactsInPersonalProfile string `json:"showWorkContactsInPersonalProfile,omitempty"` 1717 // WorkProfileWidgetsDefault: Specifies the default behaviour for work profile 1718 // widgets. If the policy does not specify work_profile_widgets for a specific 1719 // application, it will behave according to the value specified here. 1720 // 1721 // Possible values: 1722 // "WORK_PROFILE_WIDGETS_DEFAULT_UNSPECIFIED" - Unspecified. Defaults to 1723 // WORK_PROFILE_WIDGETS_DEFAULT_DISALLOWED. 1724 // "WORK_PROFILE_WIDGETS_DEFAULT_ALLOWED" - Work profile widgets are allowed 1725 // by default. This means that if the policy does not specify 1726 // work_profile_widgets as WORK_PROFILE_WIDGETS_DISALLOWED for the application, 1727 // it will be able to add widgets to the home screen. 1728 // "WORK_PROFILE_WIDGETS_DEFAULT_DISALLOWED" - Work profile widgets are 1729 // disallowed by default. This means that if the policy does not specify 1730 // work_profile_widgets as WORK_PROFILE_WIDGETS_ALLOWED for the application, it 1731 // will be unable to add widgets to the home screen. 1732 WorkProfileWidgetsDefault string `json:"workProfileWidgetsDefault,omitempty"` 1733 // ForceSendFields is a list of field names (e.g. "CrossProfileCopyPaste") to 1734 // unconditionally include in API requests. By default, fields with empty or 1735 // default values are omitted from API requests. See 1736 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1737 // details. 1738 ForceSendFields []string `json:"-"` 1739 // NullFields is a list of field names (e.g. "CrossProfileCopyPaste") to 1740 // include in API requests with the JSON null value. By default, fields with 1741 // empty values are omitted from API requests. See 1742 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1743 NullFields []string `json:"-"` 1744 } 1745 1746 func (s *CrossProfilePolicies) MarshalJSON() ([]byte, error) { 1747 type NoMethod CrossProfilePolicies 1748 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1749 } 1750 1751 // CryptoSelfTestCompletedEvent: Validates whether Android’s built-in 1752 // cryptographic library (BoringSSL) is valid. Should always succeed on device 1753 // boot, if it fails, the device should be considered untrusted. 1754 type CryptoSelfTestCompletedEvent struct { 1755 // Success: Whether the test succeeded. 1756 Success bool `json:"success,omitempty"` 1757 // ForceSendFields is a list of field names (e.g. "Success") to unconditionally 1758 // include in API requests. By default, fields with empty or default values are 1759 // omitted from API requests. See 1760 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1761 // details. 1762 ForceSendFields []string `json:"-"` 1763 // NullFields is a list of field names (e.g. "Success") to include in API 1764 // requests with the JSON null value. By default, fields with empty values are 1765 // omitted from API requests. See 1766 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1767 NullFields []string `json:"-"` 1768 } 1769 1770 func (s *CryptoSelfTestCompletedEvent) MarshalJSON() ([]byte, error) { 1771 type NoMethod CryptoSelfTestCompletedEvent 1772 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1773 } 1774 1775 // Date: Represents a whole or partial calendar date, such as a birthday. The 1776 // time of day and time zone are either specified elsewhere or are 1777 // insignificant. The date is relative to the Gregorian Calendar. This can 1778 // represent one of the following: A full date, with non-zero year, month, and 1779 // day values. A month and day, with a zero year (for example, an anniversary). 1780 // A year on its own, with a zero month and a zero day. A year and month, with 1781 // a zero day (for example, a credit card expiration date).Related types: 1782 // google.type.TimeOfDay google.type.DateTime google.protobuf.Timestamp 1783 type Date struct { 1784 // Day: Day of a month. Must be from 1 to 31 and valid for the year and month, 1785 // or 0 to specify a year by itself or a year and month where the day isn't 1786 // significant. 1787 Day int64 `json:"day,omitempty"` 1788 // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without 1789 // a month and day. 1790 Month int64 `json:"month,omitempty"` 1791 // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date 1792 // without a year. 1793 Year int64 `json:"year,omitempty"` 1794 // ForceSendFields is a list of field names (e.g. "Day") to unconditionally 1795 // include in API requests. By default, fields with empty or default values are 1796 // omitted from API requests. See 1797 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1798 // details. 1799 ForceSendFields []string `json:"-"` 1800 // NullFields is a list of field names (e.g. "Day") to include in API requests 1801 // with the JSON null value. By default, fields with empty values are omitted 1802 // from API requests. See 1803 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1804 NullFields []string `json:"-"` 1805 } 1806 1807 func (s *Date) MarshalJSON() ([]byte, error) { 1808 type NoMethod Date 1809 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1810 } 1811 1812 // Device: A device owned by an enterprise. Unless otherwise noted, all fields 1813 // are read-only and can't be modified by enterprises.devices.patch. 1814 type Device struct { 1815 // ApiLevel: The API level of the Android platform version running on the 1816 // device. 1817 ApiLevel int64 `json:"apiLevel,omitempty"` 1818 // ApplicationReports: Reports for apps installed on the device. This 1819 // information is only available when application_reports_enabled is true in 1820 // the device's policy. 1821 ApplicationReports []*ApplicationReport `json:"applicationReports,omitempty"` 1822 // AppliedPasswordPolicies: The password requirements currently applied to the 1823 // device. The applied requirements may be slightly different from those 1824 // specified in passwordPolicies in some cases. fieldPath is set based on 1825 // passwordPolicies. 1826 AppliedPasswordPolicies []*PasswordRequirements `json:"appliedPasswordPolicies,omitempty"` 1827 // AppliedPolicyName: The name of the policy currently applied to the device. 1828 AppliedPolicyName string `json:"appliedPolicyName,omitempty"` 1829 // AppliedPolicyVersion: The version of the policy currently applied to the 1830 // device. 1831 AppliedPolicyVersion int64 `json:"appliedPolicyVersion,omitempty,string"` 1832 // AppliedState: The state currently applied to the device. 1833 // 1834 // Possible values: 1835 // "DEVICE_STATE_UNSPECIFIED" - This value is disallowed. 1836 // "ACTIVE" - The device is active. 1837 // "DISABLED" - The device is disabled. 1838 // "DELETED" - The device was deleted. This state is never returned by an API 1839 // call, but is used in the final status report when the device acknowledges 1840 // the deletion. If the device is deleted via the API call, this state is 1841 // published to Pub/Sub. If the user deletes the work profile or resets the 1842 // device, the device state will remain unknown to the server. 1843 // "PROVISIONING" - The device is being provisioned. Newly enrolled devices 1844 // are in this state until they have a policy applied. 1845 // "LOST" - The device is lost. This state is only possible on 1846 // organization-owned devices. 1847 // "PREPARING_FOR_MIGRATION" - The device is preparing for migrating to 1848 // Android Management API. No further action is needed for the migration to 1849 // continue. 1850 AppliedState string `json:"appliedState,omitempty"` 1851 // CommonCriteriaModeInfo: Information about Common Criteria Mode—security 1852 // standards defined in the Common Criteria for Information Technology Security 1853 // Evaluation (https://www.commoncriteriaportal.org/) (CC).This information is 1854 // only available if statusReportingSettings.commonCriteriaModeEnabled is true 1855 // in the device's policy. 1856 CommonCriteriaModeInfo *CommonCriteriaModeInfo `json:"commonCriteriaModeInfo,omitempty"` 1857 // DeviceSettings: Device settings information. This information is only 1858 // available if deviceSettingsEnabled is true in the device's policy. 1859 DeviceSettings *DeviceSettings `json:"deviceSettings,omitempty"` 1860 // DisabledReason: If the device state is DISABLED, an optional message that is 1861 // displayed on the device indicating the reason the device is disabled. This 1862 // field can be modified by a patch request. 1863 DisabledReason *UserFacingMessage `json:"disabledReason,omitempty"` 1864 // Displays: Detailed information about displays on the device. This 1865 // information is only available if displayInfoEnabled is true in the device's 1866 // policy. 1867 Displays []*Display `json:"displays,omitempty"` 1868 // DpcMigrationInfo: Output only. Information related to whether this device 1869 // was migrated from being managed by another Device Policy Controller (DPC). 1870 DpcMigrationInfo *DpcMigrationInfo `json:"dpcMigrationInfo,omitempty"` 1871 // EnrollmentTime: The time of device enrollment. 1872 EnrollmentTime string `json:"enrollmentTime,omitempty"` 1873 // EnrollmentTokenData: If the device was enrolled with an enrollment token 1874 // with additional data provided, this field contains that data. 1875 EnrollmentTokenData string `json:"enrollmentTokenData,omitempty"` 1876 // EnrollmentTokenName: If the device was enrolled with an enrollment token, 1877 // this field contains the name of the token. 1878 EnrollmentTokenName string `json:"enrollmentTokenName,omitempty"` 1879 // HardwareInfo: Detailed information about the device hardware. 1880 HardwareInfo *HardwareInfo `json:"hardwareInfo,omitempty"` 1881 // HardwareStatusSamples: Hardware status samples in chronological order. This 1882 // information is only available if hardwareStatusEnabled is true in the 1883 // device's policy. 1884 HardwareStatusSamples []*HardwareStatus `json:"hardwareStatusSamples,omitempty"` 1885 // LastPolicyComplianceReportTime: Deprecated. 1886 LastPolicyComplianceReportTime string `json:"lastPolicyComplianceReportTime,omitempty"` 1887 // LastPolicySyncTime: The last time the device fetched its policy. 1888 LastPolicySyncTime string `json:"lastPolicySyncTime,omitempty"` 1889 // LastStatusReportTime: The last time the device sent a status report. 1890 LastStatusReportTime string `json:"lastStatusReportTime,omitempty"` 1891 // ManagementMode: The type of management mode Android Device Policy takes on 1892 // the device. This influences which policy settings are supported. 1893 // 1894 // Possible values: 1895 // "MANAGEMENT_MODE_UNSPECIFIED" - This value is disallowed. 1896 // "DEVICE_OWNER" - Device owner. Android Device Policy has full control over 1897 // the device. 1898 // "PROFILE_OWNER" - Profile owner. Android Device Policy has control over a 1899 // managed profile on the device. 1900 ManagementMode string `json:"managementMode,omitempty"` 1901 // MemoryEvents: Events related to memory and storage measurements in 1902 // chronological order. This information is only available if memoryInfoEnabled 1903 // is true in the device's policy.Events are retained for a certain period of 1904 // time and old events are deleted. 1905 MemoryEvents []*MemoryEvent `json:"memoryEvents,omitempty"` 1906 // MemoryInfo: Memory information: contains information about device memory and 1907 // storage. 1908 MemoryInfo *MemoryInfo `json:"memoryInfo,omitempty"` 1909 // Name: The name of the device in the form 1910 // enterprises/{enterpriseId}/devices/{deviceId}. 1911 Name string `json:"name,omitempty"` 1912 // NetworkInfo: Device network information. This information is only available 1913 // if networkInfoEnabled is true in the device's policy. 1914 NetworkInfo *NetworkInfo `json:"networkInfo,omitempty"` 1915 // NonComplianceDetails: Details about policy settings that the device is not 1916 // compliant with. 1917 NonComplianceDetails []*NonComplianceDetail `json:"nonComplianceDetails,omitempty"` 1918 // Ownership: Ownership of the managed device. 1919 // 1920 // Possible values: 1921 // "OWNERSHIP_UNSPECIFIED" - Ownership is unspecified. 1922 // "COMPANY_OWNED" - Device is company-owned. 1923 // "PERSONALLY_OWNED" - Device is personally-owned. 1924 Ownership string `json:"ownership,omitempty"` 1925 // PolicyCompliant: Whether the device is compliant with its policy. 1926 PolicyCompliant bool `json:"policyCompliant,omitempty"` 1927 // PolicyName: The name of the policy applied to the device, in the form 1928 // enterprises/{enterpriseId}/policies/{policyId}. If not specified, the 1929 // policy_name for the device's user is applied. This field can be modified by 1930 // a patch request. You can specify only the policyId when calling 1931 // enterprises.devices.patch, as long as the policyId doesn’t contain any 1932 // slashes. The rest of the policy name is inferred. 1933 PolicyName string `json:"policyName,omitempty"` 1934 // PowerManagementEvents: Power management events on the device in 1935 // chronological order. This information is only available if 1936 // powerManagementEventsEnabled is true in the device's policy. 1937 PowerManagementEvents []*PowerManagementEvent `json:"powerManagementEvents,omitempty"` 1938 // PreviousDeviceNames: If the same physical device has been enrolled multiple 1939 // times, this field contains its previous device names. The serial number is 1940 // used as the unique identifier to determine if the same physical device has 1941 // enrolled previously. The names are in chronological order. 1942 PreviousDeviceNames []string `json:"previousDeviceNames,omitempty"` 1943 // SecurityPosture: Device's security posture value that reflects how secure 1944 // the device is. 1945 SecurityPosture *SecurityPosture `json:"securityPosture,omitempty"` 1946 // SoftwareInfo: Detailed information about the device software. This 1947 // information is only available if softwareInfoEnabled is true in the device's 1948 // policy. 1949 SoftwareInfo *SoftwareInfo `json:"softwareInfo,omitempty"` 1950 // State: The state to be applied to the device. This field can be modified by 1951 // a patch request. Note that when calling enterprises.devices.patch, ACTIVE 1952 // and DISABLED are the only allowable values. To enter the device into a 1953 // DELETED state, call enterprises.devices.delete. 1954 // 1955 // Possible values: 1956 // "DEVICE_STATE_UNSPECIFIED" - This value is disallowed. 1957 // "ACTIVE" - The device is active. 1958 // "DISABLED" - The device is disabled. 1959 // "DELETED" - The device was deleted. This state is never returned by an API 1960 // call, but is used in the final status report when the device acknowledges 1961 // the deletion. If the device is deleted via the API call, this state is 1962 // published to Pub/Sub. If the user deletes the work profile or resets the 1963 // device, the device state will remain unknown to the server. 1964 // "PROVISIONING" - The device is being provisioned. Newly enrolled devices 1965 // are in this state until they have a policy applied. 1966 // "LOST" - The device is lost. This state is only possible on 1967 // organization-owned devices. 1968 // "PREPARING_FOR_MIGRATION" - The device is preparing for migrating to 1969 // Android Management API. No further action is needed for the migration to 1970 // continue. 1971 State string `json:"state,omitempty"` 1972 // SystemProperties: Map of selected system properties name and value related 1973 // to the device. This information is only available if systemPropertiesEnabled 1974 // is true in the device's policy. 1975 SystemProperties map[string]string `json:"systemProperties,omitempty"` 1976 // User: The user who owns the device. 1977 User *User `json:"user,omitempty"` 1978 // UserName: The resource name of the user that owns this device in the form 1979 // enterprises/{enterpriseId}/users/{userId}. 1980 UserName string `json:"userName,omitempty"` 1981 1982 // ServerResponse contains the HTTP response code and headers from the server. 1983 googleapi.ServerResponse `json:"-"` 1984 // ForceSendFields is a list of field names (e.g. "ApiLevel") to 1985 // unconditionally include in API requests. By default, fields with empty or 1986 // default values are omitted from API requests. See 1987 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1988 // details. 1989 ForceSendFields []string `json:"-"` 1990 // NullFields is a list of field names (e.g. "ApiLevel") to include in API 1991 // requests with the JSON null value. By default, fields with empty values are 1992 // omitted from API requests. See 1993 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1994 NullFields []string `json:"-"` 1995 } 1996 1997 func (s *Device) MarshalJSON() ([]byte, error) { 1998 type NoMethod Device 1999 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2000 } 2001 2002 // DeviceConnectivityManagement: Covers controls for device connectivity such 2003 // as Wi-Fi, USB data access, keyboard/mouse connections, and more. 2004 type DeviceConnectivityManagement struct { 2005 // ConfigureWifi: Controls Wi-Fi configuring privileges. Based on the option 2006 // set, user will have either full or limited or no control in configuring 2007 // Wi-Fi networks. 2008 // 2009 // Possible values: 2010 // "CONFIGURE_WIFI_UNSPECIFIED" - Unspecified. Defaults to 2011 // ALLOW_CONFIGURING_WIFI unless wifiConfigDisabled is set to true. If 2012 // wifiConfigDisabled is set to true, this is equivalent to 2013 // DISALLOW_CONFIGURING_WIFI. 2014 // "ALLOW_CONFIGURING_WIFI" - The user is allowed to configure Wi-Fi. 2015 // wifiConfigDisabled is ignored. 2016 // "DISALLOW_ADD_WIFI_CONFIG" - Adding new Wi-Fi configurations is 2017 // disallowed. The user is only able to switch between already configured 2018 // networks. Supported on Android 13 and above, on fully managed devices and 2019 // work profiles on company-owned devices. If the setting is not supported, 2020 // ALLOW_CONFIGURING_WIFI is set. A nonComplianceDetail with API_LEVEL is 2021 // reported if the Android version is less than 13. wifiConfigDisabled is 2022 // ignored. 2023 // "DISALLOW_CONFIGURING_WIFI" - Disallows configuring Wi-Fi networks. The 2024 // setting wifiConfigDisabled is ignored when this value is set. Supported on 2025 // fully managed devices and work profile on company-owned devices, on all 2026 // supported API levels. For fully managed devices, setting this removes all 2027 // configured networks and retains only the networks configured using 2028 // openNetworkConfiguration policy. For work profiles on company-owned devices, 2029 // existing configured networks are not affected and the user is not allowed to 2030 // add, remove, or modify Wi-Fi networks. Note: If a network connection can't 2031 // be made at boot time and configuring Wi-Fi is disabled then network escape 2032 // hatch will be shown in order to refresh the device policy (see 2033 // networkEscapeHatchEnabled). 2034 ConfigureWifi string `json:"configureWifi,omitempty"` 2035 // TetheringSettings: Controls tethering settings. Based on the value set, the 2036 // user is partially or fully disallowed from using different forms of 2037 // tethering. 2038 // 2039 // Possible values: 2040 // "TETHERING_SETTINGS_UNSPECIFIED" - Unspecified. Defaults to 2041 // ALLOW_ALL_TETHERING unless tetheringConfigDisabled is set to true. If 2042 // tetheringConfigDisabled is set to true, this is equivalent to 2043 // DISALLOW_ALL_TETHERING. 2044 // "ALLOW_ALL_TETHERING" - Allows configuration and use of all forms of 2045 // tethering. tetheringConfigDisabled is ignored. 2046 // "DISALLOW_WIFI_TETHERING" - Disallows the user from using Wi-Fi tethering. 2047 // Supported on company owned devices running Android 13 and above. If the 2048 // setting is not supported, ALLOW_ALL_TETHERING will be set. A 2049 // nonComplianceDetail with API_LEVEL is reported if the Android version is 2050 // less than 13. tetheringConfigDisabled is ignored. 2051 // "DISALLOW_ALL_TETHERING" - Disallows all forms of tethering. Supported on 2052 // fully managed devices and work profile on company-owned devices, on all 2053 // supported android versions. The setting tetheringConfigDisabled is ignored. 2054 TetheringSettings string `json:"tetheringSettings,omitempty"` 2055 // UsbDataAccess: Controls what files and/or data can be transferred via USB. 2056 // Supported only on company-owned devices. 2057 // 2058 // Possible values: 2059 // "USB_DATA_ACCESS_UNSPECIFIED" - Unspecified. Defaults to 2060 // DISALLOW_USB_FILE_TRANSFER. 2061 // "ALLOW_USB_DATA_TRANSFER" - All types of USB data transfers are allowed. 2062 // usbFileTransferDisabled is ignored. 2063 // "DISALLOW_USB_FILE_TRANSFER" - Transferring files over USB is disallowed. 2064 // Other types of USB data connections, such as mouse and keyboard connection, 2065 // are allowed. usbFileTransferDisabled is ignored. 2066 // "DISALLOW_USB_DATA_TRANSFER" - When set, all types of USB data transfers 2067 // are prohibited. Supported for devices running Android 12 or above with USB 2068 // HAL 1.3 or above. If the setting is not supported, 2069 // DISALLOW_USB_FILE_TRANSFER will be set. A nonComplianceDetail with API_LEVEL 2070 // is reported if the Android version is less than 12. A nonComplianceDetail 2071 // with DEVICE_INCOMPATIBLE is reported if the device does not have USB HAL 1.3 2072 // or above. usbFileTransferDisabled is ignored. 2073 UsbDataAccess string `json:"usbDataAccess,omitempty"` 2074 // WifiDirectSettings: Controls configuring and using Wi-Fi direct settings. 2075 // Supported on company-owned devices running Android 13 and above. 2076 // 2077 // Possible values: 2078 // "WIFI_DIRECT_SETTINGS_UNSPECIFIED" - Unspecified. Defaults to 2079 // ALLOW_WIFI_DIRECT 2080 // "ALLOW_WIFI_DIRECT" - The user is allowed to use Wi-Fi direct. 2081 // "DISALLOW_WIFI_DIRECT" - The user is not allowed to use Wi-Fi direct. A 2082 // nonComplianceDetail with API_LEVEL is reported if the Android version is 2083 // less than 13. 2084 WifiDirectSettings string `json:"wifiDirectSettings,omitempty"` 2085 // WifiSsidPolicy: Restrictions on which Wi-Fi SSIDs the device can connect to. 2086 // Note that this does not affect which networks can be configured on the 2087 // device. Supported on company-owned devices running Android 13 and above. 2088 WifiSsidPolicy *WifiSsidPolicy `json:"wifiSsidPolicy,omitempty"` 2089 // ForceSendFields is a list of field names (e.g. "ConfigureWifi") to 2090 // unconditionally include in API requests. By default, fields with empty or 2091 // default values are omitted from API requests. See 2092 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2093 // details. 2094 ForceSendFields []string `json:"-"` 2095 // NullFields is a list of field names (e.g. "ConfigureWifi") to include in API 2096 // requests with the JSON null value. By default, fields with empty values are 2097 // omitted from API requests. See 2098 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2099 NullFields []string `json:"-"` 2100 } 2101 2102 func (s *DeviceConnectivityManagement) MarshalJSON() ([]byte, error) { 2103 type NoMethod DeviceConnectivityManagement 2104 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2105 } 2106 2107 // DeviceRadioState: Controls for device radio settings. 2108 type DeviceRadioState struct { 2109 // AirplaneModeState: Controls whether airplane mode can be toggled by the user 2110 // or not. 2111 // 2112 // Possible values: 2113 // "AIRPLANE_MODE_STATE_UNSPECIFIED" - Unspecified. Defaults to 2114 // AIRPLANE_MODE_USER_CHOICE. 2115 // "AIRPLANE_MODE_USER_CHOICE" - The user is allowed to toggle airplane mode 2116 // on or off. 2117 // "AIRPLANE_MODE_DISABLED" - Airplane mode is disabled. The user is not 2118 // allowed to toggle airplane mode on. A nonComplianceDetail with API_LEVEL is 2119 // reported if the Android version is less than 9. 2120 AirplaneModeState string `json:"airplaneModeState,omitempty"` 2121 // CellularTwoGState: Controls whether cellular 2G setting can be toggled by 2122 // the user or not. 2123 // 2124 // Possible values: 2125 // "CELLULAR_TWO_G_STATE_UNSPECIFIED" - Unspecified. Defaults to 2126 // CELLULAR_TWO_G_USER_CHOICE. 2127 // "CELLULAR_TWO_G_USER_CHOICE" - The user is allowed to toggle cellular 2G 2128 // on or off. 2129 // "CELLULAR_TWO_G_DISABLED" - Cellular 2G is disabled. The user is not 2130 // allowed to toggle cellular 2G on via settings. A nonComplianceDetail with 2131 // API_LEVEL is reported if the Android version is less than 14. 2132 CellularTwoGState string `json:"cellularTwoGState,omitempty"` 2133 // MinimumWifiSecurityLevel: The minimum required security level of Wi-Fi 2134 // networks that the device can connect to. 2135 // 2136 // Possible values: 2137 // "MINIMUM_WIFI_SECURITY_LEVEL_UNSPECIFIED" - Defaults to 2138 // OPEN_NETWORK_SECURITY, which means the device will be able to connect to all 2139 // types of Wi-Fi networks. 2140 // "OPEN_NETWORK_SECURITY" - The device will be able to connect to all types 2141 // of Wi-Fi networks. 2142 // "PERSONAL_NETWORK_SECURITY" - A personal network such as WEP, WPA2-PSK is 2143 // the minimum required security. The device will not be able to connect to 2144 // open wifi networks. This is stricter than OPEN_NETWORK_SECURITY. A 2145 // nonComplianceDetail with API_LEVEL is reported if the Android version is 2146 // less than 13. 2147 // "ENTERPRISE_NETWORK_SECURITY" - An enterprise EAP network is the minimum 2148 // required security level. The device will not be able to connect to Wi-Fi 2149 // network below this security level. This is stricter than 2150 // PERSONAL_NETWORK_SECURITY. A nonComplianceDetail with API_LEVEL is reported 2151 // if the Android version is less than 13. 2152 // "ENTERPRISE_BIT192_NETWORK_SECURITY" - A 192-bit enterprise network is the 2153 // minimum required security level. The device will not be able to connect to 2154 // Wi-Fi network below this security level. This is stricter than 2155 // ENTERPRISE_NETWORK_SECURITY. A nonComplianceDetail with API_LEVEL is 2156 // reported if the Android version is less than 13. 2157 MinimumWifiSecurityLevel string `json:"minimumWifiSecurityLevel,omitempty"` 2158 // UltraWidebandState: Controls the state of the ultra wideband setting and 2159 // whether the user can toggle it on or off. 2160 // 2161 // Possible values: 2162 // "ULTRA_WIDEBAND_STATE_UNSPECIFIED" - Unspecified. Defaults to 2163 // ULTRA_WIDEBAND_USER_CHOICE. 2164 // "ULTRA_WIDEBAND_USER_CHOICE" - The user is allowed to toggle ultra 2165 // wideband on or off. 2166 // "ULTRA_WIDEBAND_DISABLED" - Ultra wideband is disabled. The user is not 2167 // allowed to toggle ultra wideband on via settings. A nonComplianceDetail with 2168 // API_LEVEL is reported if the Android version is less than 14. 2169 UltraWidebandState string `json:"ultraWidebandState,omitempty"` 2170 // WifiState: Controls current state of Wi-Fi and if user can change its state. 2171 // 2172 // Possible values: 2173 // "WIFI_STATE_UNSPECIFIED" - Unspecified. Defaults to WIFI_STATE_USER_CHOICE 2174 // "WIFI_STATE_USER_CHOICE" - User is allowed to enable/disable Wi-Fi. 2175 // "WIFI_ENABLED" - Wi-Fi is on and the user is not allowed to turn it off. A 2176 // nonComplianceDetail with API_LEVEL is reported if the Android version is 2177 // less than 13. 2178 // "WIFI_DISABLED" - Wi-Fi is off and the user is not allowed to turn it on. 2179 // A nonComplianceDetail with API_LEVEL is reported if the Android version is 2180 // less than 13. 2181 WifiState string `json:"wifiState,omitempty"` 2182 // ForceSendFields is a list of field names (e.g. "AirplaneModeState") to 2183 // unconditionally include in API requests. By default, fields with empty or 2184 // default values are omitted from API requests. See 2185 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2186 // details. 2187 ForceSendFields []string `json:"-"` 2188 // NullFields is a list of field names (e.g. "AirplaneModeState") to include in 2189 // API requests with the JSON null value. By default, fields with empty values 2190 // are omitted from API requests. See 2191 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2192 NullFields []string `json:"-"` 2193 } 2194 2195 func (s *DeviceRadioState) MarshalJSON() ([]byte, error) { 2196 type NoMethod DeviceRadioState 2197 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2198 } 2199 2200 // DeviceSettings: Information about security related device settings on 2201 // device. 2202 type DeviceSettings struct { 2203 // AdbEnabled: Whether ADB 2204 // (https://developer.android.com/studio/command-line/adb.html) is enabled on 2205 // the device. 2206 AdbEnabled bool `json:"adbEnabled,omitempty"` 2207 // DevelopmentSettingsEnabled: Whether developer mode is enabled on the device. 2208 DevelopmentSettingsEnabled bool `json:"developmentSettingsEnabled,omitempty"` 2209 // EncryptionStatus: Encryption status from DevicePolicyManager. 2210 // 2211 // Possible values: 2212 // "ENCRYPTION_STATUS_UNSPECIFIED" - Unspecified. No device should have this 2213 // type. 2214 // "UNSUPPORTED" - Encryption is not supported by the device. 2215 // "INACTIVE" - Encryption is supported by the device, but is not currently 2216 // active. 2217 // "ACTIVATING" - Encryption is not currently active, but is currently being 2218 // activated. 2219 // "ACTIVE" - Encryption is active. 2220 // "ACTIVE_DEFAULT_KEY" - Encryption is active, but an encryption key is not 2221 // set by the user. 2222 // "ACTIVE_PER_USER" - Encryption is active, and the encryption key is tied 2223 // to the user profile. 2224 EncryptionStatus string `json:"encryptionStatus,omitempty"` 2225 // IsDeviceSecure: Whether the device is secured with PIN/password. 2226 IsDeviceSecure bool `json:"isDeviceSecure,omitempty"` 2227 // IsEncrypted: Whether the storage encryption is enabled. 2228 IsEncrypted bool `json:"isEncrypted,omitempty"` 2229 // UnknownSourcesEnabled: Whether installing apps from unknown sources is 2230 // enabled. 2231 UnknownSourcesEnabled bool `json:"unknownSourcesEnabled,omitempty"` 2232 // VerifyAppsEnabled: Whether Google Play Protect verification 2233 // (https://support.google.com/accounts/answer/2812853) is enforced on the 2234 // device. 2235 VerifyAppsEnabled bool `json:"verifyAppsEnabled,omitempty"` 2236 // ForceSendFields is a list of field names (e.g. "AdbEnabled") to 2237 // unconditionally include in API requests. By default, fields with empty or 2238 // default values are omitted from API requests. See 2239 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2240 // details. 2241 ForceSendFields []string `json:"-"` 2242 // NullFields is a list of field names (e.g. "AdbEnabled") to include in API 2243 // requests with the JSON null value. By default, fields with empty values are 2244 // omitted from API requests. See 2245 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2246 NullFields []string `json:"-"` 2247 } 2248 2249 func (s *DeviceSettings) MarshalJSON() ([]byte, error) { 2250 type NoMethod DeviceSettings 2251 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2252 } 2253 2254 // Display: Device display information. 2255 type Display struct { 2256 // Density: Display density expressed as dots-per-inch. 2257 Density int64 `json:"density,omitempty"` 2258 // DisplayId: Unique display id. 2259 DisplayId int64 `json:"displayId,omitempty"` 2260 // Height: Display height in pixels. 2261 Height int64 `json:"height,omitempty"` 2262 // Name: Name of the display. 2263 Name string `json:"name,omitempty"` 2264 // RefreshRate: Refresh rate of the display in frames per second. 2265 RefreshRate int64 `json:"refreshRate,omitempty"` 2266 // State: State of the display. 2267 // 2268 // Possible values: 2269 // "DISPLAY_STATE_UNSPECIFIED" - This value is disallowed. 2270 // "OFF" - Display is off. 2271 // "ON" - Display is on. 2272 // "DOZE" - Display is dozing in a low power state 2273 // "SUSPENDED" - Display is dozing in a suspended low power state. 2274 State string `json:"state,omitempty"` 2275 // Width: Display width in pixels. 2276 Width int64 `json:"width,omitempty"` 2277 // ForceSendFields is a list of field names (e.g. "Density") to unconditionally 2278 // include in API requests. By default, fields with empty or default values are 2279 // omitted from API requests. See 2280 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2281 // details. 2282 ForceSendFields []string `json:"-"` 2283 // NullFields is a list of field names (e.g. "Density") to include in API 2284 // requests with the JSON null value. By default, fields with empty values are 2285 // omitted from API requests. See 2286 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2287 NullFields []string `json:"-"` 2288 } 2289 2290 func (s *Display) MarshalJSON() ([]byte, error) { 2291 type NoMethod Display 2292 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2293 } 2294 2295 // DnsEvent: A DNS lookup event was initiated through the standard network 2296 // stack. 2297 type DnsEvent struct { 2298 // Hostname: The hostname that was looked up. 2299 Hostname string `json:"hostname,omitempty"` 2300 // IpAddresses: The (possibly truncated) list of the IP addresses returned for 2301 // DNS lookup (max 10 IPv4 or IPv6 addresses). 2302 IpAddresses []string `json:"ipAddresses,omitempty"` 2303 // PackageName: The package name of the UID that performed the DNS lookup. 2304 PackageName string `json:"packageName,omitempty"` 2305 // TotalIpAddressesReturned: The number of IP addresses returned from the DNS 2306 // lookup event. May be higher than the amount of ip_addresses if there were 2307 // too many addresses to log. 2308 TotalIpAddressesReturned int64 `json:"totalIpAddressesReturned,omitempty,string"` 2309 // ForceSendFields is a list of field names (e.g. "Hostname") to 2310 // unconditionally include in API requests. By default, fields with empty or 2311 // default values are omitted from API requests. See 2312 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2313 // details. 2314 ForceSendFields []string `json:"-"` 2315 // NullFields is a list of field names (e.g. "Hostname") to include in API 2316 // requests with the JSON null value. By default, fields with empty values are 2317 // omitted from API requests. See 2318 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2319 NullFields []string `json:"-"` 2320 } 2321 2322 func (s *DnsEvent) MarshalJSON() ([]byte, error) { 2323 type NoMethod DnsEvent 2324 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2325 } 2326 2327 // DpcMigrationInfo: Information related to whether this device was migrated 2328 // from being managed by another Device Policy Controller (DPC). 2329 type DpcMigrationInfo struct { 2330 // AdditionalData: Output only. If this device was migrated from another DPC, 2331 // the additionalData field of the migration token is populated here. 2332 AdditionalData string `json:"additionalData,omitempty"` 2333 // PreviousDpc: Output only. If this device was migrated from another DPC, this 2334 // is its package name. Not populated otherwise. 2335 PreviousDpc string `json:"previousDpc,omitempty"` 2336 // ForceSendFields is a list of field names (e.g. "AdditionalData") to 2337 // unconditionally include in API requests. By default, fields with empty or 2338 // default values are omitted from API requests. See 2339 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2340 // details. 2341 ForceSendFields []string `json:"-"` 2342 // NullFields is a list of field names (e.g. "AdditionalData") to include in 2343 // API requests with the JSON null value. By default, fields with empty values 2344 // are omitted from API requests. See 2345 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2346 NullFields []string `json:"-"` 2347 } 2348 2349 func (s *DpcMigrationInfo) MarshalJSON() ([]byte, error) { 2350 type NoMethod DpcMigrationInfo 2351 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2352 } 2353 2354 // Empty: A generic empty message that you can re-use to avoid defining 2355 // duplicated empty messages in your APIs. A typical example is to use it as 2356 // the request or the response type of an API method. For instance: service Foo 2357 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } 2358 type Empty struct { 2359 // ServerResponse contains the HTTP response code and headers from the server. 2360 googleapi.ServerResponse `json:"-"` 2361 } 2362 2363 // EnrollmentCompleteEvent: Represents that the device has completed 2364 // enrollment. User should be in the launcher at this point, device at this 2365 // point will be compliant and all setup steps have been completed. 2366 // Intentionally empty. 2367 type EnrollmentCompleteEvent struct { 2368 } 2369 2370 // EnrollmentToken: An enrollment token. 2371 type EnrollmentToken struct { 2372 // AdditionalData: Optional, arbitrary data associated with the enrollment 2373 // token. This could contain, for example, the ID of an org unit the device is 2374 // assigned to after enrollment. After a device enrolls with the token, this 2375 // data will be exposed in the enrollment_token_data field of the Device 2376 // resource. The data must be 1024 characters or less; otherwise, the creation 2377 // request will fail. 2378 AdditionalData string `json:"additionalData,omitempty"` 2379 // AllowPersonalUsage: Controls whether personal usage is allowed on a device 2380 // provisioned with this enrollment token.For company-owned devices: Enabling 2381 // personal usage allows the user to set up a work profile on the device. 2382 // Disabling personal usage requires the user provision the device as a fully 2383 // managed device.For personally-owned devices: Enabling personal usage allows 2384 // the user to set up a work profile on the device. Disabling personal usage 2385 // will prevent the device from provisioning. Personal usage cannot be disabled 2386 // on personally-owned device. 2387 // 2388 // Possible values: 2389 // "ALLOW_PERSONAL_USAGE_UNSPECIFIED" - Personal usage restriction is not 2390 // specified 2391 // "PERSONAL_USAGE_ALLOWED" - Personal usage is allowed 2392 // "PERSONAL_USAGE_DISALLOWED" - Personal usage is disallowed 2393 AllowPersonalUsage string `json:"allowPersonalUsage,omitempty"` 2394 // Duration: The length of time the enrollment token is valid, ranging from 1 2395 // minute to Durations.MAX_VALUE 2396 // (https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/util/Durations.html#MAX_VALUE), 2397 // approximately 10,000 years. If not specified, the default duration is 1 2398 // hour. Please note that if requested duration causes the resulting 2399 // expiration_timestamp to exceed Timestamps.MAX_VALUE 2400 // (https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/util/Timestamps.html#MAX_VALUE), 2401 // then expiration_timestamp is coerced to Timestamps.MAX_VALUE. 2402 Duration string `json:"duration,omitempty"` 2403 // ExpirationTimestamp: The expiration time of the token. This is a read-only 2404 // field generated by the server. 2405 ExpirationTimestamp string `json:"expirationTimestamp,omitempty"` 2406 // Name: The name of the enrollment token, which is generated by the server 2407 // during creation, in the form 2408 // enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}. 2409 Name string `json:"name,omitempty"` 2410 // OneTimeOnly: Whether the enrollment token is for one time use only. If the 2411 // flag is set to true, only one device can use it for registration. 2412 OneTimeOnly bool `json:"oneTimeOnly,omitempty"` 2413 // PolicyName: The name of the policy initially applied to the enrolled device, 2414 // in the form enterprises/{enterpriseId}/policies/{policyId}. If not 2415 // specified, the policy_name for the device’s user is applied. If user_name 2416 // is also not specified, enterprises/{enterpriseId}/policies/default is 2417 // applied by default. When updating this field, you can specify only the 2418 // policyId as long as the policyId doesn’t contain any slashes. The rest of 2419 // the policy name will be inferred. 2420 PolicyName string `json:"policyName,omitempty"` 2421 // QrCode: A JSON string whose UTF-8 representation can be used to generate a 2422 // QR code to enroll a device with this enrollment token. To enroll a device 2423 // using NFC, the NFC record must contain a serialized java.util.Properties 2424 // representation of the properties in the JSON. 2425 QrCode string `json:"qrCode,omitempty"` 2426 // User: This field is deprecated and the value is ignored. 2427 User *User `json:"user,omitempty"` 2428 // Value: The token value that's passed to the device and authorizes the device 2429 // to enroll. This is a read-only field generated by the server. 2430 Value string `json:"value,omitempty"` 2431 2432 // ServerResponse contains the HTTP response code and headers from the server. 2433 googleapi.ServerResponse `json:"-"` 2434 // ForceSendFields is a list of field names (e.g. "AdditionalData") to 2435 // unconditionally include in API requests. By default, fields with empty or 2436 // default values are omitted from API requests. See 2437 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2438 // details. 2439 ForceSendFields []string `json:"-"` 2440 // NullFields is a list of field names (e.g. "AdditionalData") to include in 2441 // API requests with the JSON null value. By default, fields with empty values 2442 // are omitted from API requests. See 2443 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2444 NullFields []string `json:"-"` 2445 } 2446 2447 func (s *EnrollmentToken) MarshalJSON() ([]byte, error) { 2448 type NoMethod EnrollmentToken 2449 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2450 } 2451 2452 // Enterprise: The configuration applied to an enterprise. 2453 type Enterprise struct { 2454 // AppAutoApprovalEnabled: Deprecated and unused. 2455 AppAutoApprovalEnabled bool `json:"appAutoApprovalEnabled,omitempty"` 2456 // ContactInfo: The enterprise contact info of an EMM-managed enterprise. 2457 ContactInfo *ContactInfo `json:"contactInfo,omitempty"` 2458 // EnabledNotificationTypes: The types of Google Pub/Sub notifications enabled 2459 // for the enterprise. 2460 // 2461 // Possible values: 2462 // "NOTIFICATION_TYPE_UNSPECIFIED" - This value is ignored. 2463 // "ENROLLMENT" - A notification sent when a device enrolls. 2464 // "COMPLIANCE_REPORT" - Deprecated. 2465 // "STATUS_REPORT" - A notification sent when a device issues a status 2466 // report. 2467 // "COMMAND" - A notification sent when a device command has completed. 2468 // "USAGE_LOGS" - A notification sent when device sends BatchUsageLogEvents. 2469 EnabledNotificationTypes []string `json:"enabledNotificationTypes,omitempty"` 2470 // EnterpriseDisplayName: The name of the enterprise displayed to users. This 2471 // field has a maximum length of 100 characters. 2472 EnterpriseDisplayName string `json:"enterpriseDisplayName,omitempty"` 2473 // Logo: An image displayed as a logo during device provisioning. Supported 2474 // types are: image/bmp, image/gif, image/x-ico, image/jpeg, image/png, 2475 // image/webp, image/vnd.wap.wbmp, image/x-adobe-dng. 2476 Logo *ExternalData `json:"logo,omitempty"` 2477 // Name: The name of the enterprise which is generated by the server during 2478 // creation, in the form enterprises/{enterpriseId}. 2479 Name string `json:"name,omitempty"` 2480 // PrimaryColor: A color in RGB format that indicates the predominant color to 2481 // display in the device management app UI. The color components are stored as 2482 // follows: (red << 16) | (green << 8) | blue, where the value of each 2483 // component is between 0 and 255, inclusive. 2484 PrimaryColor int64 `json:"primaryColor,omitempty"` 2485 // PubsubTopic: The topic which Pub/Sub notifications are published to, in the 2486 // form projects/{project}/topics/{topic}. This field is only required if 2487 // Pub/Sub notifications are enabled. 2488 PubsubTopic string `json:"pubsubTopic,omitempty"` 2489 // SigninDetails: Sign-in details of the enterprise. 2490 SigninDetails []*SigninDetail `json:"signinDetails,omitempty"` 2491 // TermsAndConditions: Terms and conditions that must be accepted when 2492 // provisioning a device for this enterprise. A page of terms is generated for 2493 // each value in this list. 2494 TermsAndConditions []*TermsAndConditions `json:"termsAndConditions,omitempty"` 2495 2496 // ServerResponse contains the HTTP response code and headers from the server. 2497 googleapi.ServerResponse `json:"-"` 2498 // ForceSendFields is a list of field names (e.g. "AppAutoApprovalEnabled") to 2499 // unconditionally include in API requests. By default, fields with empty or 2500 // default values are omitted from API requests. See 2501 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2502 // details. 2503 ForceSendFields []string `json:"-"` 2504 // NullFields is a list of field names (e.g. "AppAutoApprovalEnabled") to 2505 // include in API requests with the JSON null value. By default, fields with 2506 // empty values are omitted from API requests. See 2507 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2508 NullFields []string `json:"-"` 2509 } 2510 2511 func (s *Enterprise) MarshalJSON() ([]byte, error) { 2512 type NoMethod Enterprise 2513 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2514 } 2515 2516 // ExtensionConfig: Configuration to enable an app as an extension app, with 2517 // the capability of interacting with Android Device Policy offline. For 2518 // Android versions 13 and above, extension apps are exempt from battery 2519 // restrictions so will not be placed into the restricted App Standby Bucket 2520 // (https://developer.android.com/topic/performance/appstandby#restricted-bucket). 2521 // Extensions apps are also protected against users clearing their data or 2522 // force-closing the application, although admins can continue to use the clear 2523 // app data command on extension apps if needed for Android 13 and above. 2524 type ExtensionConfig struct { 2525 // NotificationReceiver: Fully qualified class name of the receiver service 2526 // class for Android Device Policy to notify the extension app of any local 2527 // command status updates. 2528 NotificationReceiver string `json:"notificationReceiver,omitempty"` 2529 // SigningKeyFingerprintsSha256: Hex-encoded SHA-256 hash of the signing 2530 // certificate of the extension app. Only hexadecimal string representations of 2531 // 64 characters are valid.If not specified, the signature for the 2532 // corresponding package name is obtained from the Play Store instead.If this 2533 // list is empty, the signature of the extension app on the device must match 2534 // the signature obtained from the Play Store for the app to be able to 2535 // communicate with Android Device Policy.If this list is not empty, the 2536 // signature of the extension app on the device must match one of the entries 2537 // in this list for the app to be able to communicate with Android Device 2538 // Policy.In production use cases, it is recommended to leave this empty. 2539 SigningKeyFingerprintsSha256 []string `json:"signingKeyFingerprintsSha256,omitempty"` 2540 // ForceSendFields is a list of field names (e.g. "NotificationReceiver") to 2541 // unconditionally include in API requests. By default, fields with empty or 2542 // default values are omitted from API requests. See 2543 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2544 // details. 2545 ForceSendFields []string `json:"-"` 2546 // NullFields is a list of field names (e.g. "NotificationReceiver") to include 2547 // in API requests with the JSON null value. By default, fields with empty 2548 // values are omitted from API requests. See 2549 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2550 NullFields []string `json:"-"` 2551 } 2552 2553 func (s *ExtensionConfig) MarshalJSON() ([]byte, error) { 2554 type NoMethod ExtensionConfig 2555 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2556 } 2557 2558 // ExternalData: Data hosted at an external location. The data is to be 2559 // downloaded by Android Device Policy and verified against the hash. 2560 type ExternalData struct { 2561 // Sha256Hash: The base-64 encoded SHA-256 hash of the content hosted at url. 2562 // If the content doesn't match this hash, Android Device Policy won't use the 2563 // data. 2564 Sha256Hash string `json:"sha256Hash,omitempty"` 2565 // Url: The absolute URL to the data, which must use either the http or https 2566 // scheme. Android Device Policy doesn't provide any credentials in the GET 2567 // request, so the URL must be publicly accessible. Including a long, random 2568 // component in the URL may be used to prevent attackers from discovering the 2569 // URL. 2570 Url string `json:"url,omitempty"` 2571 // ForceSendFields is a list of field names (e.g. "Sha256Hash") to 2572 // unconditionally include in API requests. By default, fields with empty or 2573 // default values are omitted from API requests. See 2574 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2575 // details. 2576 ForceSendFields []string `json:"-"` 2577 // NullFields is a list of field names (e.g. "Sha256Hash") to include in API 2578 // requests with the JSON null value. By default, fields with empty values are 2579 // omitted from API requests. See 2580 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2581 NullFields []string `json:"-"` 2582 } 2583 2584 func (s *ExternalData) MarshalJSON() ([]byte, error) { 2585 type NoMethod ExternalData 2586 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2587 } 2588 2589 // FilePulledEvent: A file was downloaded from the device. 2590 type FilePulledEvent struct { 2591 // FilePath: The path of the file being pulled. 2592 FilePath string `json:"filePath,omitempty"` 2593 // ForceSendFields is a list of field names (e.g. "FilePath") to 2594 // unconditionally include in API requests. By default, fields with empty or 2595 // default values are omitted from API requests. See 2596 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2597 // details. 2598 ForceSendFields []string `json:"-"` 2599 // NullFields is a list of field names (e.g. "FilePath") to include in API 2600 // requests with the JSON null value. By default, fields with empty values are 2601 // omitted from API requests. See 2602 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2603 NullFields []string `json:"-"` 2604 } 2605 2606 func (s *FilePulledEvent) MarshalJSON() ([]byte, error) { 2607 type NoMethod FilePulledEvent 2608 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2609 } 2610 2611 // FilePushedEvent: A file was uploaded onto the device. 2612 type FilePushedEvent struct { 2613 // FilePath: The path of the file being pushed. 2614 FilePath string `json:"filePath,omitempty"` 2615 // ForceSendFields is a list of field names (e.g. "FilePath") to 2616 // unconditionally include in API requests. By default, fields with empty or 2617 // default values are omitted from API requests. See 2618 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2619 // details. 2620 ForceSendFields []string `json:"-"` 2621 // NullFields is a list of field names (e.g. "FilePath") to include in API 2622 // requests with the JSON null value. By default, fields with empty values are 2623 // omitted from API requests. See 2624 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2625 NullFields []string `json:"-"` 2626 } 2627 2628 func (s *FilePushedEvent) MarshalJSON() ([]byte, error) { 2629 type NoMethod FilePushedEvent 2630 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2631 } 2632 2633 // FreezePeriod: A system freeze period. When a device’s clock is within the 2634 // freeze period, all incoming system updates (including security patches) are 2635 // blocked and won’t be installed.When the device is outside any set freeze 2636 // periods, the normal policy behavior (automatic, windowed, or postponed) 2637 // applies.Leap years are ignored in freeze period calculations, in particular: 2638 // If Feb. 29th is set as the start or end date of a freeze period, the freeze 2639 // period will start or end on Feb. 28th instead. When a device’s system 2640 // clock reads Feb. 29th, it’s treated as Feb. 28th. When calculating the 2641 // number of days in a freeze period or the time between two freeze periods, 2642 // Feb. 29th is ignored and not counted as a day.Note: For Freeze Periods to 2643 // take effect, SystemUpdateType cannot be specified as 2644 // SYSTEM_UPDATE_TYPE_UNSPECIFIED, because freeze periods require a defined 2645 // policy to be specified. 2646 type FreezePeriod struct { 2647 // EndDate: The end date (inclusive) of the freeze period. Must be no later 2648 // than 90 days from the start date. If the end date is earlier than the start 2649 // date, the freeze period is considered wrapping year-end. Note: year must not 2650 // be set. For example, {"month": 1,"date": 30}. 2651 EndDate *Date `json:"endDate,omitempty"` 2652 // StartDate: The start date (inclusive) of the freeze period. Note: year must 2653 // not be set. For example, {"month": 1,"date": 30}. 2654 StartDate *Date `json:"startDate,omitempty"` 2655 // ForceSendFields is a list of field names (e.g. "EndDate") to unconditionally 2656 // include in API requests. By default, fields with empty or default values are 2657 // omitted from API requests. See 2658 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2659 // details. 2660 ForceSendFields []string `json:"-"` 2661 // NullFields is a list of field names (e.g. "EndDate") to include in API 2662 // requests with the JSON null value. By default, fields with empty values are 2663 // omitted from API requests. See 2664 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2665 NullFields []string `json:"-"` 2666 } 2667 2668 func (s *FreezePeriod) MarshalJSON() ([]byte, error) { 2669 type NoMethod FreezePeriod 2670 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2671 } 2672 2673 // HardwareInfo: Information about device hardware. The fields related to 2674 // temperature thresholds are only available if hardwareStatusEnabled is true 2675 // in the device's policy. 2676 type HardwareInfo struct { 2677 // BatteryShutdownTemperatures: Battery shutdown temperature thresholds in 2678 // Celsius for each battery on the device. 2679 BatteryShutdownTemperatures []float64 `json:"batteryShutdownTemperatures,omitempty"` 2680 // BatteryThrottlingTemperatures: Battery throttling temperature thresholds in 2681 // Celsius for each battery on the device. 2682 BatteryThrottlingTemperatures []float64 `json:"batteryThrottlingTemperatures,omitempty"` 2683 // Brand: Brand of the device. For example, Google. 2684 Brand string `json:"brand,omitempty"` 2685 // CpuShutdownTemperatures: CPU shutdown temperature thresholds in Celsius for 2686 // each CPU on the device. 2687 CpuShutdownTemperatures []float64 `json:"cpuShutdownTemperatures,omitempty"` 2688 // CpuThrottlingTemperatures: CPU throttling temperature thresholds in Celsius 2689 // for each CPU on the device. 2690 CpuThrottlingTemperatures []float64 `json:"cpuThrottlingTemperatures,omitempty"` 2691 // DeviceBasebandVersion: Baseband version. For example, 2692 // MDM9625_104662.22.05.34p. 2693 DeviceBasebandVersion string `json:"deviceBasebandVersion,omitempty"` 2694 // EnterpriseSpecificId: Output only. ID that uniquely identifies a 2695 // personally-owned device in a particular organization. On the same physical 2696 // device when enrolled with the same organization, this ID persists across 2697 // setups and even factory resets. This ID is available on personally-owned 2698 // devices with a work profile on devices running Android 12 and above. 2699 EnterpriseSpecificId string `json:"enterpriseSpecificId,omitempty"` 2700 // GpuShutdownTemperatures: GPU shutdown temperature thresholds in Celsius for 2701 // each GPU on the device. 2702 GpuShutdownTemperatures []float64 `json:"gpuShutdownTemperatures,omitempty"` 2703 // GpuThrottlingTemperatures: GPU throttling temperature thresholds in Celsius 2704 // for each GPU on the device. 2705 GpuThrottlingTemperatures []float64 `json:"gpuThrottlingTemperatures,omitempty"` 2706 // Hardware: Name of the hardware. For example, Angler. 2707 Hardware string `json:"hardware,omitempty"` 2708 // Manufacturer: Manufacturer. For example, Motorola. 2709 Manufacturer string `json:"manufacturer,omitempty"` 2710 // Model: The model of the device. For example, Asus Nexus 7. 2711 Model string `json:"model,omitempty"` 2712 // SerialNumber: The device serial number. 2713 SerialNumber string `json:"serialNumber,omitempty"` 2714 // SkinShutdownTemperatures: Device skin shutdown temperature thresholds in 2715 // Celsius. 2716 SkinShutdownTemperatures []float64 `json:"skinShutdownTemperatures,omitempty"` 2717 // SkinThrottlingTemperatures: Device skin throttling temperature thresholds in 2718 // Celsius. 2719 SkinThrottlingTemperatures []float64 `json:"skinThrottlingTemperatures,omitempty"` 2720 // ForceSendFields is a list of field names (e.g. 2721 // "BatteryShutdownTemperatures") to unconditionally include in API requests. 2722 // By default, fields with empty or default values are omitted from API 2723 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields 2724 // for more details. 2725 ForceSendFields []string `json:"-"` 2726 // NullFields is a list of field names (e.g. "BatteryShutdownTemperatures") to 2727 // include in API requests with the JSON null value. By default, fields with 2728 // empty values are omitted from API requests. See 2729 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2730 NullFields []string `json:"-"` 2731 } 2732 2733 func (s *HardwareInfo) MarshalJSON() ([]byte, error) { 2734 type NoMethod HardwareInfo 2735 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2736 } 2737 2738 func (s *HardwareInfo) UnmarshalJSON(data []byte) error { 2739 type NoMethod HardwareInfo 2740 var s1 struct { 2741 BatteryShutdownTemperatures []gensupport.JSONFloat64 `json:"batteryShutdownTemperatures"` 2742 BatteryThrottlingTemperatures []gensupport.JSONFloat64 `json:"batteryThrottlingTemperatures"` 2743 CpuShutdownTemperatures []gensupport.JSONFloat64 `json:"cpuShutdownTemperatures"` 2744 CpuThrottlingTemperatures []gensupport.JSONFloat64 `json:"cpuThrottlingTemperatures"` 2745 GpuShutdownTemperatures []gensupport.JSONFloat64 `json:"gpuShutdownTemperatures"` 2746 GpuThrottlingTemperatures []gensupport.JSONFloat64 `json:"gpuThrottlingTemperatures"` 2747 SkinShutdownTemperatures []gensupport.JSONFloat64 `json:"skinShutdownTemperatures"` 2748 SkinThrottlingTemperatures []gensupport.JSONFloat64 `json:"skinThrottlingTemperatures"` 2749 *NoMethod 2750 } 2751 s1.NoMethod = (*NoMethod)(s) 2752 if err := json.Unmarshal(data, &s1); err != nil { 2753 return err 2754 } 2755 s.BatteryShutdownTemperatures = make([]float64, len(s1.BatteryShutdownTemperatures)) 2756 for i := range s1.BatteryShutdownTemperatures { 2757 s.BatteryShutdownTemperatures[i] = float64(s1.BatteryShutdownTemperatures[i]) 2758 } 2759 s.BatteryThrottlingTemperatures = make([]float64, len(s1.BatteryThrottlingTemperatures)) 2760 for i := range s1.BatteryThrottlingTemperatures { 2761 s.BatteryThrottlingTemperatures[i] = float64(s1.BatteryThrottlingTemperatures[i]) 2762 } 2763 s.CpuShutdownTemperatures = make([]float64, len(s1.CpuShutdownTemperatures)) 2764 for i := range s1.CpuShutdownTemperatures { 2765 s.CpuShutdownTemperatures[i] = float64(s1.CpuShutdownTemperatures[i]) 2766 } 2767 s.CpuThrottlingTemperatures = make([]float64, len(s1.CpuThrottlingTemperatures)) 2768 for i := range s1.CpuThrottlingTemperatures { 2769 s.CpuThrottlingTemperatures[i] = float64(s1.CpuThrottlingTemperatures[i]) 2770 } 2771 s.GpuShutdownTemperatures = make([]float64, len(s1.GpuShutdownTemperatures)) 2772 for i := range s1.GpuShutdownTemperatures { 2773 s.GpuShutdownTemperatures[i] = float64(s1.GpuShutdownTemperatures[i]) 2774 } 2775 s.GpuThrottlingTemperatures = make([]float64, len(s1.GpuThrottlingTemperatures)) 2776 for i := range s1.GpuThrottlingTemperatures { 2777 s.GpuThrottlingTemperatures[i] = float64(s1.GpuThrottlingTemperatures[i]) 2778 } 2779 s.SkinShutdownTemperatures = make([]float64, len(s1.SkinShutdownTemperatures)) 2780 for i := range s1.SkinShutdownTemperatures { 2781 s.SkinShutdownTemperatures[i] = float64(s1.SkinShutdownTemperatures[i]) 2782 } 2783 s.SkinThrottlingTemperatures = make([]float64, len(s1.SkinThrottlingTemperatures)) 2784 for i := range s1.SkinThrottlingTemperatures { 2785 s.SkinThrottlingTemperatures[i] = float64(s1.SkinThrottlingTemperatures[i]) 2786 } 2787 return nil 2788 } 2789 2790 // HardwareStatus: Hardware status. Temperatures may be compared to the 2791 // temperature thresholds available in hardwareInfo to determine hardware 2792 // health. 2793 type HardwareStatus struct { 2794 // BatteryTemperatures: Current battery temperatures in Celsius for each 2795 // battery on the device. 2796 BatteryTemperatures []float64 `json:"batteryTemperatures,omitempty"` 2797 // CpuTemperatures: Current CPU temperatures in Celsius for each CPU on the 2798 // device. 2799 CpuTemperatures []float64 `json:"cpuTemperatures,omitempty"` 2800 // CpuUsages: CPU usages in percentage for each core available on the device. 2801 // Usage is 0 for each unplugged core. Empty array implies that CPU usage is 2802 // not supported in the system. 2803 CpuUsages []float64 `json:"cpuUsages,omitempty"` 2804 // CreateTime: The time the measurements were taken. 2805 CreateTime string `json:"createTime,omitempty"` 2806 // FanSpeeds: Fan speeds in RPM for each fan on the device. Empty array means 2807 // that there are no fans or fan speed is not supported on the system. 2808 FanSpeeds []float64 `json:"fanSpeeds,omitempty"` 2809 // GpuTemperatures: Current GPU temperatures in Celsius for each GPU on the 2810 // device. 2811 GpuTemperatures []float64 `json:"gpuTemperatures,omitempty"` 2812 // SkinTemperatures: Current device skin temperatures in Celsius. 2813 SkinTemperatures []float64 `json:"skinTemperatures,omitempty"` 2814 // ForceSendFields is a list of field names (e.g. "BatteryTemperatures") to 2815 // unconditionally include in API requests. By default, fields with empty or 2816 // default values are omitted from API requests. See 2817 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2818 // details. 2819 ForceSendFields []string `json:"-"` 2820 // NullFields is a list of field names (e.g. "BatteryTemperatures") to include 2821 // in API requests with the JSON null value. By default, fields with empty 2822 // values are omitted from API requests. See 2823 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2824 NullFields []string `json:"-"` 2825 } 2826 2827 func (s *HardwareStatus) MarshalJSON() ([]byte, error) { 2828 type NoMethod HardwareStatus 2829 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2830 } 2831 2832 func (s *HardwareStatus) UnmarshalJSON(data []byte) error { 2833 type NoMethod HardwareStatus 2834 var s1 struct { 2835 BatteryTemperatures []gensupport.JSONFloat64 `json:"batteryTemperatures"` 2836 CpuTemperatures []gensupport.JSONFloat64 `json:"cpuTemperatures"` 2837 CpuUsages []gensupport.JSONFloat64 `json:"cpuUsages"` 2838 FanSpeeds []gensupport.JSONFloat64 `json:"fanSpeeds"` 2839 GpuTemperatures []gensupport.JSONFloat64 `json:"gpuTemperatures"` 2840 SkinTemperatures []gensupport.JSONFloat64 `json:"skinTemperatures"` 2841 *NoMethod 2842 } 2843 s1.NoMethod = (*NoMethod)(s) 2844 if err := json.Unmarshal(data, &s1); err != nil { 2845 return err 2846 } 2847 s.BatteryTemperatures = make([]float64, len(s1.BatteryTemperatures)) 2848 for i := range s1.BatteryTemperatures { 2849 s.BatteryTemperatures[i] = float64(s1.BatteryTemperatures[i]) 2850 } 2851 s.CpuTemperatures = make([]float64, len(s1.CpuTemperatures)) 2852 for i := range s1.CpuTemperatures { 2853 s.CpuTemperatures[i] = float64(s1.CpuTemperatures[i]) 2854 } 2855 s.CpuUsages = make([]float64, len(s1.CpuUsages)) 2856 for i := range s1.CpuUsages { 2857 s.CpuUsages[i] = float64(s1.CpuUsages[i]) 2858 } 2859 s.FanSpeeds = make([]float64, len(s1.FanSpeeds)) 2860 for i := range s1.FanSpeeds { 2861 s.FanSpeeds[i] = float64(s1.FanSpeeds[i]) 2862 } 2863 s.GpuTemperatures = make([]float64, len(s1.GpuTemperatures)) 2864 for i := range s1.GpuTemperatures { 2865 s.GpuTemperatures[i] = float64(s1.GpuTemperatures[i]) 2866 } 2867 s.SkinTemperatures = make([]float64, len(s1.SkinTemperatures)) 2868 for i := range s1.SkinTemperatures { 2869 s.SkinTemperatures[i] = float64(s1.SkinTemperatures[i]) 2870 } 2871 return nil 2872 } 2873 2874 // InstallConstraint: Amongst apps with InstallType set to: FORCE_INSTALLED 2875 // PREINSTALLEDthis defines a set of restrictions for the app installation. At 2876 // least one of the fields must be set. When multiple fields are set, then all 2877 // the constraints need to be satisfied for the app to be installed. 2878 type InstallConstraint struct { 2879 // ChargingConstraint: Optional. Charging constraint. 2880 // 2881 // Possible values: 2882 // "CHARGING_CONSTRAINT_UNSPECIFIED" - Unspecified. Default to 2883 // CHARGING_NOT_REQUIRED. 2884 // "CHARGING_NOT_REQUIRED" - Device doesn't have to be charging. 2885 // "INSTALL_ONLY_WHEN_CHARGING" - Device has to be charging. 2886 ChargingConstraint string `json:"chargingConstraint,omitempty"` 2887 // DeviceIdleConstraint: Optional. Device idle constraint. 2888 // 2889 // Possible values: 2890 // "DEVICE_IDLE_CONSTRAINT_UNSPECIFIED" - Unspecified. Default to 2891 // DEVICE_IDLE_NOT_REQUIRED. 2892 // "DEVICE_IDLE_NOT_REQUIRED" - Device doesn't have to be idle, app can be 2893 // installed while the user is interacting with the device. 2894 // "INSTALL_ONLY_WHEN_DEVICE_IDLE" - Device has to be idle. 2895 DeviceIdleConstraint string `json:"deviceIdleConstraint,omitempty"` 2896 // NetworkTypeConstraint: Optional. Network type constraint. 2897 // 2898 // Possible values: 2899 // "NETWORK_TYPE_CONSTRAINT_UNSPECIFIED" - Unspecified. Default to 2900 // INSTALL_ON_ANY_NETWORK. 2901 // "INSTALL_ON_ANY_NETWORK" - Any active networks (Wi-Fi, cellular, etc.). 2902 // "INSTALL_ONLY_ON_UNMETERED_NETWORK" - Any unmetered network (e.g. Wi-FI). 2903 NetworkTypeConstraint string `json:"networkTypeConstraint,omitempty"` 2904 // ForceSendFields is a list of field names (e.g. "ChargingConstraint") to 2905 // unconditionally include in API requests. By default, fields with empty or 2906 // default values are omitted from API requests. See 2907 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2908 // details. 2909 ForceSendFields []string `json:"-"` 2910 // NullFields is a list of field names (e.g. "ChargingConstraint") to include 2911 // in API requests with the JSON null value. By default, fields with empty 2912 // values are omitted from API requests. See 2913 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2914 NullFields []string `json:"-"` 2915 } 2916 2917 func (s *InstallConstraint) MarshalJSON() ([]byte, error) { 2918 type NoMethod InstallConstraint 2919 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2920 } 2921 2922 // IssueCommandResponse: Response on issuing a command. This is currently empty 2923 // as a placeholder. 2924 type IssueCommandResponse struct { 2925 } 2926 2927 // KeyDestructionEvent: A cryptographic key including user installed, admin 2928 // installed and system maintained private key is removed from the device 2929 // either by the user or management. This is available device-wide on fully 2930 // managed devices and within the work profile on organization-owned devices 2931 // with a work profile. 2932 type KeyDestructionEvent struct { 2933 // ApplicationUid: UID of the application which owns the key. 2934 ApplicationUid int64 `json:"applicationUid,omitempty"` 2935 // KeyAlias: Alias of the key. 2936 KeyAlias string `json:"keyAlias,omitempty"` 2937 // Success: Whether the operation was successful. 2938 Success bool `json:"success,omitempty"` 2939 // ForceSendFields is a list of field names (e.g. "ApplicationUid") to 2940 // unconditionally include in API requests. By default, fields with empty or 2941 // default values are omitted from API requests. See 2942 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2943 // details. 2944 ForceSendFields []string `json:"-"` 2945 // NullFields is a list of field names (e.g. "ApplicationUid") to include in 2946 // API requests with the JSON null value. By default, fields with empty values 2947 // are omitted from API requests. See 2948 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2949 NullFields []string `json:"-"` 2950 } 2951 2952 func (s *KeyDestructionEvent) MarshalJSON() ([]byte, error) { 2953 type NoMethod KeyDestructionEvent 2954 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2955 } 2956 2957 // KeyGeneratedEvent: A cryptographic key including user installed, admin 2958 // installed and system maintained private key is installed on the device 2959 // either by the user or management.This is available device-wide on fully 2960 // managed devices and within the work profile on organization-owned devices 2961 // with a work profile. 2962 type KeyGeneratedEvent struct { 2963 // ApplicationUid: UID of the application which generated the key. 2964 ApplicationUid int64 `json:"applicationUid,omitempty"` 2965 // KeyAlias: Alias of the key. 2966 KeyAlias string `json:"keyAlias,omitempty"` 2967 // Success: Whether the operation was successful. 2968 Success bool `json:"success,omitempty"` 2969 // ForceSendFields is a list of field names (e.g. "ApplicationUid") to 2970 // unconditionally include in API requests. By default, fields with empty or 2971 // default values are omitted from API requests. See 2972 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2973 // details. 2974 ForceSendFields []string `json:"-"` 2975 // NullFields is a list of field names (e.g. "ApplicationUid") to include in 2976 // API requests with the JSON null value. By default, fields with empty values 2977 // are omitted from API requests. See 2978 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2979 NullFields []string `json:"-"` 2980 } 2981 2982 func (s *KeyGeneratedEvent) MarshalJSON() ([]byte, error) { 2983 type NoMethod KeyGeneratedEvent 2984 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2985 } 2986 2987 // KeyImportEvent: A cryptographic key including user installed, admin 2988 // installed and system maintained private key is imported on the device either 2989 // by the user or management. This is available device-wide on fully managed 2990 // devices and within the work profile on organization-owned devices with a 2991 // work profile. 2992 type KeyImportEvent struct { 2993 // ApplicationUid: UID of the application which imported the key 2994 ApplicationUid int64 `json:"applicationUid,omitempty"` 2995 // KeyAlias: Alias of the key. 2996 KeyAlias string `json:"keyAlias,omitempty"` 2997 // Success: Whether the operation was successful. 2998 Success bool `json:"success,omitempty"` 2999 // ForceSendFields is a list of field names (e.g. "ApplicationUid") to 3000 // unconditionally include in API requests. By default, fields with empty or 3001 // default values are omitted from API requests. See 3002 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3003 // details. 3004 ForceSendFields []string `json:"-"` 3005 // NullFields is a list of field names (e.g. "ApplicationUid") to include in 3006 // API requests with the JSON null value. By default, fields with empty values 3007 // are omitted from API requests. See 3008 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3009 NullFields []string `json:"-"` 3010 } 3011 3012 func (s *KeyImportEvent) MarshalJSON() ([]byte, error) { 3013 type NoMethod KeyImportEvent 3014 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3015 } 3016 3017 // KeyIntegrityViolationEvent: A cryptographic key including user installed, 3018 // admin installed and system maintained private key is determined to be 3019 // corrupted due to storage corruption, hardware failure or some OS issue. This 3020 // is available device-wide on fully managed devices and within the work 3021 // profile on organization-owned devices with a work profile. 3022 type KeyIntegrityViolationEvent struct { 3023 // ApplicationUid: UID of the application which owns the key 3024 ApplicationUid int64 `json:"applicationUid,omitempty"` 3025 // KeyAlias: Alias of the key. 3026 KeyAlias string `json:"keyAlias,omitempty"` 3027 // ForceSendFields is a list of field names (e.g. "ApplicationUid") to 3028 // unconditionally include in API requests. By default, fields with empty or 3029 // default values are omitted from API requests. See 3030 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3031 // details. 3032 ForceSendFields []string `json:"-"` 3033 // NullFields is a list of field names (e.g. "ApplicationUid") to include in 3034 // API requests with the JSON null value. By default, fields with empty values 3035 // are omitted from API requests. See 3036 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3037 NullFields []string `json:"-"` 3038 } 3039 3040 func (s *KeyIntegrityViolationEvent) MarshalJSON() ([]byte, error) { 3041 type NoMethod KeyIntegrityViolationEvent 3042 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3043 } 3044 3045 // KeyedAppState: Keyed app state reported by the app. 3046 type KeyedAppState struct { 3047 // CreateTime: The creation time of the app state on the device. 3048 CreateTime string `json:"createTime,omitempty"` 3049 // Data: Optionally, a machine-readable value to be read by the EMM. For 3050 // example, setting values that the admin can choose to query against in the 3051 // EMM console (e.g. “notify me if the battery_warning data < 10”). 3052 Data string `json:"data,omitempty"` 3053 // Key: The key for the app state. Acts as a point of reference for what the 3054 // app is providing state for. For example, when providing managed 3055 // configuration feedback, this key could be the managed configuration key. 3056 Key string `json:"key,omitempty"` 3057 // LastUpdateTime: The time the app state was most recently updated. 3058 LastUpdateTime string `json:"lastUpdateTime,omitempty"` 3059 // Message: Optionally, a free-form message string to explain the app state. If 3060 // the state was triggered by a particular value (e.g. a managed configuration 3061 // value), it should be included in the message. 3062 Message string `json:"message,omitempty"` 3063 // Severity: The severity of the app state. 3064 // 3065 // Possible values: 3066 // "SEVERITY_UNSPECIFIED" - Unspecified severity level. 3067 // "INFO" - Information severity level. 3068 // "ERROR" - Error severity level. This should only be set for genuine error 3069 // conditions that a management organization needs to take action to fix. 3070 Severity string `json:"severity,omitempty"` 3071 // ForceSendFields is a list of field names (e.g. "CreateTime") to 3072 // unconditionally include in API requests. By default, fields with empty or 3073 // default values are omitted from API requests. See 3074 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3075 // details. 3076 ForceSendFields []string `json:"-"` 3077 // NullFields is a list of field names (e.g. "CreateTime") to include in API 3078 // requests with the JSON null value. By default, fields with empty values are 3079 // omitted from API requests. See 3080 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3081 NullFields []string `json:"-"` 3082 } 3083 3084 func (s *KeyedAppState) MarshalJSON() ([]byte, error) { 3085 type NoMethod KeyedAppState 3086 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3087 } 3088 3089 // KeyguardDismissAuthAttemptEvent: An attempt was made to unlock the device. 3090 type KeyguardDismissAuthAttemptEvent struct { 3091 // StrongAuthMethodUsed: Whether a strong form of authentication (password, 3092 // PIN, or pattern) was used to unlock device. 3093 StrongAuthMethodUsed bool `json:"strongAuthMethodUsed,omitempty"` 3094 // Success: Whether the unlock attempt was successful. 3095 Success bool `json:"success,omitempty"` 3096 // ForceSendFields is a list of field names (e.g. "StrongAuthMethodUsed") to 3097 // unconditionally include in API requests. By default, fields with empty or 3098 // default values are omitted from API requests. See 3099 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3100 // details. 3101 ForceSendFields []string `json:"-"` 3102 // NullFields is a list of field names (e.g. "StrongAuthMethodUsed") to include 3103 // in API requests with the JSON null value. By default, fields with empty 3104 // values are omitted from API requests. See 3105 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3106 NullFields []string `json:"-"` 3107 } 3108 3109 func (s *KeyguardDismissAuthAttemptEvent) MarshalJSON() ([]byte, error) { 3110 type NoMethod KeyguardDismissAuthAttemptEvent 3111 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3112 } 3113 3114 // KeyguardDismissedEvent: The keyguard was dismissed. Intentionally empty. 3115 type KeyguardDismissedEvent struct { 3116 } 3117 3118 // KeyguardSecuredEvent: The device was locked either by user or timeout. 3119 // Intentionally empty. 3120 type KeyguardSecuredEvent struct { 3121 } 3122 3123 // KioskCustomization: Settings controlling the behavior of a device in kiosk 3124 // mode. To enable kiosk mode, set kioskCustomLauncherEnabled to true or 3125 // specify an app in the policy with installType KIOSK. 3126 type KioskCustomization struct { 3127 // DeviceSettings: Specifies whether the Settings app is allowed in kiosk mode. 3128 // 3129 // Possible values: 3130 // "DEVICE_SETTINGS_UNSPECIFIED" - Unspecified, defaults to 3131 // SETTINGS_ACCESS_ALLOWED. 3132 // "SETTINGS_ACCESS_ALLOWED" - Access to the Settings app is allowed in kiosk 3133 // mode. 3134 // "SETTINGS_ACCESS_BLOCKED" - Access to the Settings app is not allowed in 3135 // kiosk mode. 3136 DeviceSettings string `json:"deviceSettings,omitempty"` 3137 // PowerButtonActions: Sets the behavior of a device in kiosk mode when a user 3138 // presses and holds (long-presses) the Power button. 3139 // 3140 // Possible values: 3141 // "POWER_BUTTON_ACTIONS_UNSPECIFIED" - Unspecified, defaults to 3142 // POWER_BUTTON_AVAILABLE. 3143 // "POWER_BUTTON_AVAILABLE" - The power menu (e.g. Power off, Restart) is 3144 // shown when a user long-presses the Power button of a device in kiosk mode. 3145 // "POWER_BUTTON_BLOCKED" - The power menu (e.g. Power off, Restart) is not 3146 // shown when a user long-presses the Power button of a device in kiosk mode. 3147 // Note: this may prevent users from turning off the device. 3148 PowerButtonActions string `json:"powerButtonActions,omitempty"` 3149 // StatusBar: Specifies whether system info and notifications are disabled in 3150 // kiosk mode. 3151 // 3152 // Possible values: 3153 // "STATUS_BAR_UNSPECIFIED" - Unspecified, defaults to 3154 // INFO_AND_NOTIFICATIONS_DISABLED. 3155 // "NOTIFICATIONS_AND_SYSTEM_INFO_ENABLED" - System info and notifications 3156 // are shown on the status bar in kiosk mode.Note: For this policy to take 3157 // effect, the device's home button must be enabled using 3158 // kioskCustomization.systemNavigation. 3159 // "NOTIFICATIONS_AND_SYSTEM_INFO_DISABLED" - System info and notifications 3160 // are disabled in kiosk mode. 3161 // "SYSTEM_INFO_ONLY" - Only system info is shown on the status bar. 3162 StatusBar string `json:"statusBar,omitempty"` 3163 // SystemErrorWarnings: Specifies whether system error dialogs for crashed or 3164 // unresponsive apps are blocked in kiosk mode. When blocked, the system will 3165 // force-stop the app as if the user chooses the "close app" option on the UI. 3166 // 3167 // Possible values: 3168 // "SYSTEM_ERROR_WARNINGS_UNSPECIFIED" - Unspecified, defaults to 3169 // ERROR_AND_WARNINGS_MUTED. 3170 // "ERROR_AND_WARNINGS_ENABLED" - All system error dialogs such as crash and 3171 // app not responding (ANR) are displayed. 3172 // "ERROR_AND_WARNINGS_MUTED" - All system error dialogs, such as crash and 3173 // app not responding (ANR) are blocked. When blocked, the system force-stops 3174 // the app as if the user closes the app from the UI. 3175 SystemErrorWarnings string `json:"systemErrorWarnings,omitempty"` 3176 // SystemNavigation: Specifies which navigation features are enabled (e.g. 3177 // Home, Overview buttons) in kiosk mode. 3178 // 3179 // Possible values: 3180 // "SYSTEM_NAVIGATION_UNSPECIFIED" - Unspecified, defaults to 3181 // NAVIGATION_DISABLED. 3182 // "NAVIGATION_ENABLED" - Home and overview buttons are enabled. 3183 // "NAVIGATION_DISABLED" - The home and Overview buttons are not accessible. 3184 // "HOME_BUTTON_ONLY" - Only the home button is enabled. 3185 SystemNavigation string `json:"systemNavigation,omitempty"` 3186 // ForceSendFields is a list of field names (e.g. "DeviceSettings") to 3187 // unconditionally include in API requests. By default, fields with empty or 3188 // default values are omitted from API requests. See 3189 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3190 // details. 3191 ForceSendFields []string `json:"-"` 3192 // NullFields is a list of field names (e.g. "DeviceSettings") to include in 3193 // API requests with the JSON null value. By default, fields with empty values 3194 // are omitted from API requests. See 3195 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3196 NullFields []string `json:"-"` 3197 } 3198 3199 func (s *KioskCustomization) MarshalJSON() ([]byte, error) { 3200 type NoMethod KioskCustomization 3201 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3202 } 3203 3204 // LaunchAppAction: An action to launch an app. 3205 type LaunchAppAction struct { 3206 // PackageName: Package name of app to be launched 3207 PackageName string `json:"packageName,omitempty"` 3208 // ForceSendFields is a list of field names (e.g. "PackageName") to 3209 // unconditionally include in API requests. By default, fields with empty or 3210 // default values are omitted from API requests. See 3211 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3212 // details. 3213 ForceSendFields []string `json:"-"` 3214 // NullFields is a list of field names (e.g. "PackageName") to include in API 3215 // requests with the JSON null value. By default, fields with empty values are 3216 // omitted from API requests. See 3217 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3218 NullFields []string `json:"-"` 3219 } 3220 3221 func (s *LaunchAppAction) MarshalJSON() ([]byte, error) { 3222 type NoMethod LaunchAppAction 3223 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3224 } 3225 3226 // ListDevicesResponse: Response to a request to list devices for a given 3227 // enterprise. 3228 type ListDevicesResponse struct { 3229 // Devices: The list of devices. 3230 Devices []*Device `json:"devices,omitempty"` 3231 // NextPageToken: If there are more results, a token to retrieve next page of 3232 // results. 3233 NextPageToken string `json:"nextPageToken,omitempty"` 3234 3235 // ServerResponse contains the HTTP response code and headers from the server. 3236 googleapi.ServerResponse `json:"-"` 3237 // ForceSendFields is a list of field names (e.g. "Devices") to unconditionally 3238 // include in API requests. By default, fields with empty or default values are 3239 // omitted from API requests. See 3240 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3241 // details. 3242 ForceSendFields []string `json:"-"` 3243 // NullFields is a list of field names (e.g. "Devices") to include in API 3244 // requests with the JSON null value. By default, fields with empty values are 3245 // omitted from API requests. See 3246 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3247 NullFields []string `json:"-"` 3248 } 3249 3250 func (s *ListDevicesResponse) MarshalJSON() ([]byte, error) { 3251 type NoMethod ListDevicesResponse 3252 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3253 } 3254 3255 // ListEnrollmentTokensResponse: Response to a request to list enrollment 3256 // tokens for a given enterprise. 3257 type ListEnrollmentTokensResponse struct { 3258 // EnrollmentTokens: The list of enrollment tokens. 3259 EnrollmentTokens []*EnrollmentToken `json:"enrollmentTokens,omitempty"` 3260 // NextPageToken: If there are more results, a token to retrieve next page of 3261 // results. 3262 NextPageToken string `json:"nextPageToken,omitempty"` 3263 3264 // ServerResponse contains the HTTP response code and headers from the server. 3265 googleapi.ServerResponse `json:"-"` 3266 // ForceSendFields is a list of field names (e.g. "EnrollmentTokens") to 3267 // unconditionally include in API requests. By default, fields with empty or 3268 // default values are omitted from API requests. See 3269 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3270 // details. 3271 ForceSendFields []string `json:"-"` 3272 // NullFields is a list of field names (e.g. "EnrollmentTokens") to include in 3273 // API requests with the JSON null value. By default, fields with empty values 3274 // are omitted from API requests. See 3275 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3276 NullFields []string `json:"-"` 3277 } 3278 3279 func (s *ListEnrollmentTokensResponse) MarshalJSON() ([]byte, error) { 3280 type NoMethod ListEnrollmentTokensResponse 3281 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3282 } 3283 3284 // ListEnterprisesResponse: Response to a request to list enterprises. 3285 type ListEnterprisesResponse struct { 3286 // Enterprises: The list of enterprises. 3287 Enterprises []*Enterprise `json:"enterprises,omitempty"` 3288 // NextPageToken: If there are more results, a token to retrieve next page of 3289 // results. 3290 NextPageToken string `json:"nextPageToken,omitempty"` 3291 3292 // ServerResponse contains the HTTP response code and headers from the server. 3293 googleapi.ServerResponse `json:"-"` 3294 // ForceSendFields is a list of field names (e.g. "Enterprises") to 3295 // unconditionally include in API requests. By default, fields with empty or 3296 // default values are omitted from API requests. See 3297 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3298 // details. 3299 ForceSendFields []string `json:"-"` 3300 // NullFields is a list of field names (e.g. "Enterprises") to include in API 3301 // requests with the JSON null value. By default, fields with empty values are 3302 // omitted from API requests. See 3303 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3304 NullFields []string `json:"-"` 3305 } 3306 3307 func (s *ListEnterprisesResponse) MarshalJSON() ([]byte, error) { 3308 type NoMethod ListEnterprisesResponse 3309 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3310 } 3311 3312 // ListMigrationTokensResponse: Response to a request to list migration tokens 3313 // for a given enterprise. 3314 type ListMigrationTokensResponse struct { 3315 // MigrationTokens: The migration tokens from the specified enterprise. 3316 MigrationTokens []*MigrationToken `json:"migrationTokens,omitempty"` 3317 // NextPageToken: A token, which can be sent as page_token to retrieve the next 3318 // page. If this field is omitted, there are no subsequent pages. 3319 NextPageToken string `json:"nextPageToken,omitempty"` 3320 3321 // ServerResponse contains the HTTP response code and headers from the server. 3322 googleapi.ServerResponse `json:"-"` 3323 // ForceSendFields is a list of field names (e.g. "MigrationTokens") to 3324 // unconditionally include in API requests. By default, fields with empty or 3325 // default values are omitted from API requests. See 3326 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3327 // details. 3328 ForceSendFields []string `json:"-"` 3329 // NullFields is a list of field names (e.g. "MigrationTokens") to include in 3330 // API requests with the JSON null value. By default, fields with empty values 3331 // are omitted from API requests. See 3332 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3333 NullFields []string `json:"-"` 3334 } 3335 3336 func (s *ListMigrationTokensResponse) MarshalJSON() ([]byte, error) { 3337 type NoMethod ListMigrationTokensResponse 3338 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3339 } 3340 3341 // ListOperationsResponse: The response message for Operations.ListOperations. 3342 type ListOperationsResponse struct { 3343 // NextPageToken: The standard List next-page token. 3344 NextPageToken string `json:"nextPageToken,omitempty"` 3345 // Operations: A list of operations that matches the specified filter in the 3346 // request. 3347 Operations []*Operation `json:"operations,omitempty"` 3348 3349 // ServerResponse contains the HTTP response code and headers from the server. 3350 googleapi.ServerResponse `json:"-"` 3351 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3352 // unconditionally include in API requests. By default, fields with empty or 3353 // default values are omitted from API requests. See 3354 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3355 // details. 3356 ForceSendFields []string `json:"-"` 3357 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 3358 // requests with the JSON null value. By default, fields with empty values are 3359 // omitted from API requests. See 3360 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3361 NullFields []string `json:"-"` 3362 } 3363 3364 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 3365 type NoMethod ListOperationsResponse 3366 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3367 } 3368 3369 // ListPoliciesResponse: Response to a request to list policies for a given 3370 // enterprise. 3371 type ListPoliciesResponse struct { 3372 // NextPageToken: If there are more results, a token to retrieve next page of 3373 // results. 3374 NextPageToken string `json:"nextPageToken,omitempty"` 3375 // Policies: The list of policies. 3376 Policies []*Policy `json:"policies,omitempty"` 3377 3378 // ServerResponse contains the HTTP response code and headers from the server. 3379 googleapi.ServerResponse `json:"-"` 3380 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3381 // unconditionally include in API requests. By default, fields with empty or 3382 // default values are omitted from API requests. See 3383 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3384 // details. 3385 ForceSendFields []string `json:"-"` 3386 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 3387 // requests with the JSON null value. By default, fields with empty values are 3388 // omitted from API requests. See 3389 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3390 NullFields []string `json:"-"` 3391 } 3392 3393 func (s *ListPoliciesResponse) MarshalJSON() ([]byte, error) { 3394 type NoMethod ListPoliciesResponse 3395 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3396 } 3397 3398 // ListWebAppsResponse: Response to a request to list web apps for a given 3399 // enterprise. 3400 type ListWebAppsResponse struct { 3401 // NextPageToken: If there are more results, a token to retrieve next page of 3402 // results. 3403 NextPageToken string `json:"nextPageToken,omitempty"` 3404 // WebApps: The list of web apps. 3405 WebApps []*WebApp `json:"webApps,omitempty"` 3406 3407 // ServerResponse contains the HTTP response code and headers from the server. 3408 googleapi.ServerResponse `json:"-"` 3409 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3410 // unconditionally include in API requests. By default, fields with empty or 3411 // default values are omitted from API requests. See 3412 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3413 // details. 3414 ForceSendFields []string `json:"-"` 3415 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 3416 // requests with the JSON null value. By default, fields with empty values are 3417 // omitted from API requests. See 3418 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3419 NullFields []string `json:"-"` 3420 } 3421 3422 func (s *ListWebAppsResponse) MarshalJSON() ([]byte, error) { 3423 type NoMethod ListWebAppsResponse 3424 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3425 } 3426 3427 // Location: The device location containing the latitude and longitude. 3428 type Location struct { 3429 // Latitude: The latitude position of the location 3430 Latitude float64 `json:"latitude,omitempty"` 3431 // Longitude: The longitude position of the location 3432 Longitude float64 `json:"longitude,omitempty"` 3433 // ForceSendFields is a list of field names (e.g. "Latitude") to 3434 // unconditionally include in API requests. By default, fields with empty or 3435 // default values are omitted from API requests. See 3436 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3437 // details. 3438 ForceSendFields []string `json:"-"` 3439 // NullFields is a list of field names (e.g. "Latitude") to include in API 3440 // requests with the JSON null value. By default, fields with empty values are 3441 // omitted from API requests. See 3442 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3443 NullFields []string `json:"-"` 3444 } 3445 3446 func (s *Location) MarshalJSON() ([]byte, error) { 3447 type NoMethod Location 3448 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3449 } 3450 3451 func (s *Location) UnmarshalJSON(data []byte) error { 3452 type NoMethod Location 3453 var s1 struct { 3454 Latitude gensupport.JSONFloat64 `json:"latitude"` 3455 Longitude gensupport.JSONFloat64 `json:"longitude"` 3456 *NoMethod 3457 } 3458 s1.NoMethod = (*NoMethod)(s) 3459 if err := json.Unmarshal(data, &s1); err != nil { 3460 return err 3461 } 3462 s.Latitude = float64(s1.Latitude) 3463 s.Longitude = float64(s1.Longitude) 3464 return nil 3465 } 3466 3467 // LogBufferSizeCriticalEvent: The usageLog buffer on the device has reached 3468 // 90% of its capacity, therefore older events may be dropped. Intentionally 3469 // empty. 3470 type LogBufferSizeCriticalEvent struct { 3471 } 3472 3473 // LoggingStartedEvent: usageLog policy has been enabled. Intentionally empty. 3474 type LoggingStartedEvent struct { 3475 } 3476 3477 // LoggingStoppedEvent: usageLog policy has been disabled. Intentionally empty. 3478 type LoggingStoppedEvent struct { 3479 } 3480 3481 // LostModeLocationEvent: A lost mode event containing the device location and 3482 // battery level as a percentage. 3483 type LostModeLocationEvent struct { 3484 // BatteryLevel: The battery level as a number between 0 and 100 inclusive 3485 BatteryLevel int64 `json:"batteryLevel,omitempty"` 3486 // Location: The device location 3487 Location *Location `json:"location,omitempty"` 3488 // ForceSendFields is a list of field names (e.g. "BatteryLevel") to 3489 // unconditionally include in API requests. By default, fields with empty or 3490 // default values are omitted from API requests. See 3491 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3492 // details. 3493 ForceSendFields []string `json:"-"` 3494 // NullFields is a list of field names (e.g. "BatteryLevel") to include in API 3495 // requests with the JSON null value. By default, fields with empty values are 3496 // omitted from API requests. See 3497 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3498 NullFields []string `json:"-"` 3499 } 3500 3501 func (s *LostModeLocationEvent) MarshalJSON() ([]byte, error) { 3502 type NoMethod LostModeLocationEvent 3503 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3504 } 3505 3506 // LostModeOutgoingPhoneCallEvent: An event indicating an outgoing phone call 3507 // has been made when a device is in lost mode. Intentionally empty. 3508 type LostModeOutgoingPhoneCallEvent struct { 3509 } 3510 3511 // ManagedConfigurationTemplate: The managed configurations template for the 3512 // app, saved from the managed configurations iframe. 3513 type ManagedConfigurationTemplate struct { 3514 // ConfigurationVariables: Optional, a map containing configuration variables 3515 // defined for the configuration. 3516 ConfigurationVariables map[string]string `json:"configurationVariables,omitempty"` 3517 // TemplateId: The ID of the managed configurations template. 3518 TemplateId string `json:"templateId,omitempty"` 3519 // ForceSendFields is a list of field names (e.g. "ConfigurationVariables") to 3520 // unconditionally include in API requests. By default, fields with empty or 3521 // default values are omitted from API requests. See 3522 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3523 // details. 3524 ForceSendFields []string `json:"-"` 3525 // NullFields is a list of field names (e.g. "ConfigurationVariables") to 3526 // include in API requests with the JSON null value. By default, fields with 3527 // empty values are omitted from API requests. See 3528 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3529 NullFields []string `json:"-"` 3530 } 3531 3532 func (s *ManagedConfigurationTemplate) MarshalJSON() ([]byte, error) { 3533 type NoMethod ManagedConfigurationTemplate 3534 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3535 } 3536 3537 // ManagedProperty: Managed property. 3538 type ManagedProperty struct { 3539 // DefaultValue: The default value of the property. BUNDLE_ARRAY properties 3540 // don't have a default value. 3541 DefaultValue interface{} `json:"defaultValue,omitempty"` 3542 // Description: A longer description of the property, providing more detail of 3543 // what it affects. Localized. 3544 Description string `json:"description,omitempty"` 3545 // Entries: For CHOICE or MULTISELECT properties, the list of possible entries. 3546 Entries []*ManagedPropertyEntry `json:"entries,omitempty"` 3547 // Key: The unique key that the app uses to identify the property, e.g. 3548 // "com.google.android.gm.fieldname". 3549 Key string `json:"key,omitempty"` 3550 // NestedProperties: For BUNDLE_ARRAY properties, the list of nested 3551 // properties. A BUNDLE_ARRAY property is at most two levels deep. 3552 NestedProperties []*ManagedProperty `json:"nestedProperties,omitempty"` 3553 // Title: The name of the property. Localized. 3554 Title string `json:"title,omitempty"` 3555 // Type: The type of the property. 3556 // 3557 // Possible values: 3558 // "MANAGED_PROPERTY_TYPE_UNSPECIFIED" - Not used. 3559 // "BOOL" - A property of boolean type. 3560 // "STRING" - A property of string type. 3561 // "INTEGER" - A property of integer type. 3562 // "CHOICE" - A choice of one item from a set. 3563 // "MULTISELECT" - A choice of multiple items from a set. 3564 // "HIDDEN" - A hidden restriction of string type (the default value can be 3565 // used to pass along information that can't be modified, such as a version 3566 // code). 3567 // "BUNDLE" - A bundle of properties 3568 // "BUNDLE_ARRAY" - An array of property bundles. 3569 Type string `json:"type,omitempty"` 3570 // ForceSendFields is a list of field names (e.g. "DefaultValue") to 3571 // unconditionally include in API requests. By default, fields with empty or 3572 // default values are omitted from API requests. See 3573 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3574 // details. 3575 ForceSendFields []string `json:"-"` 3576 // NullFields is a list of field names (e.g. "DefaultValue") to include in API 3577 // requests with the JSON null value. By default, fields with empty values are 3578 // omitted from API requests. See 3579 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3580 NullFields []string `json:"-"` 3581 } 3582 3583 func (s *ManagedProperty) MarshalJSON() ([]byte, error) { 3584 type NoMethod ManagedProperty 3585 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3586 } 3587 3588 // ManagedPropertyEntry: An entry of a managed property. 3589 type ManagedPropertyEntry struct { 3590 // Name: The human-readable name of the value. Localized. 3591 Name string `json:"name,omitempty"` 3592 // Value: The machine-readable value of the entry, which should be used in the 3593 // configuration. Not localized. 3594 Value string `json:"value,omitempty"` 3595 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 3596 // include in API requests. By default, fields with empty or default values are 3597 // omitted from API requests. See 3598 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3599 // details. 3600 ForceSendFields []string `json:"-"` 3601 // NullFields is a list of field names (e.g. "Name") to include in API requests 3602 // with the JSON null value. By default, fields with empty values are omitted 3603 // from API requests. See 3604 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3605 NullFields []string `json:"-"` 3606 } 3607 3608 func (s *ManagedPropertyEntry) MarshalJSON() ([]byte, error) { 3609 type NoMethod ManagedPropertyEntry 3610 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3611 } 3612 3613 // MediaMountEvent: Removable media was mounted. 3614 type MediaMountEvent struct { 3615 // MountPoint: Mount point. 3616 MountPoint string `json:"mountPoint,omitempty"` 3617 // VolumeLabel: Volume label. Redacted to empty string on organization-owned 3618 // managed profile devices. 3619 VolumeLabel string `json:"volumeLabel,omitempty"` 3620 // ForceSendFields is a list of field names (e.g. "MountPoint") to 3621 // unconditionally include in API requests. By default, fields with empty or 3622 // default values are omitted from API requests. See 3623 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3624 // details. 3625 ForceSendFields []string `json:"-"` 3626 // NullFields is a list of field names (e.g. "MountPoint") to include in API 3627 // requests with the JSON null value. By default, fields with empty values are 3628 // omitted from API requests. See 3629 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3630 NullFields []string `json:"-"` 3631 } 3632 3633 func (s *MediaMountEvent) MarshalJSON() ([]byte, error) { 3634 type NoMethod MediaMountEvent 3635 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3636 } 3637 3638 // MediaUnmountEvent: Removable media was unmounted. 3639 type MediaUnmountEvent struct { 3640 // MountPoint: Mount point. 3641 MountPoint string `json:"mountPoint,omitempty"` 3642 // VolumeLabel: Volume label. Redacted to empty string on organization-owned 3643 // managed profile devices. 3644 VolumeLabel string `json:"volumeLabel,omitempty"` 3645 // ForceSendFields is a list of field names (e.g. "MountPoint") to 3646 // unconditionally include in API requests. By default, fields with empty or 3647 // default values are omitted from API requests. See 3648 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3649 // details. 3650 ForceSendFields []string `json:"-"` 3651 // NullFields is a list of field names (e.g. "MountPoint") to include in API 3652 // requests with the JSON null value. By default, fields with empty values are 3653 // omitted from API requests. See 3654 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3655 NullFields []string `json:"-"` 3656 } 3657 3658 func (s *MediaUnmountEvent) MarshalJSON() ([]byte, error) { 3659 type NoMethod MediaUnmountEvent 3660 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3661 } 3662 3663 // MemoryEvent: An event related to memory and storage measurements.To 3664 // distinguish between new and old events, we recommend using the createTime 3665 // field. 3666 type MemoryEvent struct { 3667 // ByteCount: The number of free bytes in the medium, or for 3668 // EXTERNAL_STORAGE_DETECTED, the total capacity in bytes of the storage 3669 // medium. 3670 ByteCount int64 `json:"byteCount,omitempty,string"` 3671 // CreateTime: The creation time of the event. 3672 CreateTime string `json:"createTime,omitempty"` 3673 // EventType: Event type. 3674 // 3675 // Possible values: 3676 // "MEMORY_EVENT_TYPE_UNSPECIFIED" - Unspecified. No events have this type. 3677 // "RAM_MEASURED" - Free space in RAM was measured. 3678 // "INTERNAL_STORAGE_MEASURED" - Free space in internal storage was measured. 3679 // "EXTERNAL_STORAGE_DETECTED" - A new external storage medium was detected. 3680 // The reported byte count is the total capacity of the storage medium. 3681 // "EXTERNAL_STORAGE_REMOVED" - An external storage medium was removed. The 3682 // reported byte count is zero. 3683 // "EXTERNAL_STORAGE_MEASURED" - Free space in an external storage medium was 3684 // measured. 3685 EventType string `json:"eventType,omitempty"` 3686 // ForceSendFields is a list of field names (e.g. "ByteCount") to 3687 // unconditionally include in API requests. By default, fields with empty or 3688 // default values are omitted from API requests. See 3689 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3690 // details. 3691 ForceSendFields []string `json:"-"` 3692 // NullFields is a list of field names (e.g. "ByteCount") to include in API 3693 // requests with the JSON null value. By default, fields with empty values are 3694 // omitted from API requests. See 3695 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3696 NullFields []string `json:"-"` 3697 } 3698 3699 func (s *MemoryEvent) MarshalJSON() ([]byte, error) { 3700 type NoMethod MemoryEvent 3701 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3702 } 3703 3704 // MemoryInfo: Information about device memory and storage. 3705 type MemoryInfo struct { 3706 // TotalInternalStorage: Total internal storage on device in bytes. 3707 TotalInternalStorage int64 `json:"totalInternalStorage,omitempty,string"` 3708 // TotalRam: Total RAM on device in bytes. 3709 TotalRam int64 `json:"totalRam,omitempty,string"` 3710 // ForceSendFields is a list of field names (e.g. "TotalInternalStorage") to 3711 // unconditionally include in API requests. By default, fields with empty or 3712 // default values are omitted from API requests. See 3713 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3714 // details. 3715 ForceSendFields []string `json:"-"` 3716 // NullFields is a list of field names (e.g. "TotalInternalStorage") to include 3717 // in API requests with the JSON null value. By default, fields with empty 3718 // values are omitted from API requests. See 3719 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3720 NullFields []string `json:"-"` 3721 } 3722 3723 func (s *MemoryInfo) MarshalJSON() ([]byte, error) { 3724 type NoMethod MemoryInfo 3725 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3726 } 3727 3728 // MigrationToken: A token to initiate the migration of a device from being 3729 // managed by a third-party DPC to being managed by Android Management API. A 3730 // migration token is valid only for a single device. See the guide 3731 // (https://developers.google.com/android/management/dpc-migration) for more 3732 // details. 3733 type MigrationToken struct { 3734 // AdditionalData: Immutable. Optional EMM-specified additional data. Once the 3735 // device is migrated this will be populated in the migrationAdditionalData 3736 // field of the Device resource. This must be at most 1024 characters. 3737 AdditionalData string `json:"additionalData,omitempty"` 3738 // CreateTime: Output only. Time when this migration token was created. 3739 CreateTime string `json:"createTime,omitempty"` 3740 // Device: Output only. Once this migration token is used to migrate a device, 3741 // the name of the resulting Device resource will be populated here, in the 3742 // form enterprises/{enterprise}/devices/{device}. 3743 Device string `json:"device,omitempty"` 3744 // DeviceId: Required. Immutable. The id of the device, as in the Play EMM API. 3745 // This corresponds to the deviceId parameter in Play EMM API's Devices.get 3746 // (https://developers.google.com/android/work/play/emm-api/v1/devices/get#parameters) 3747 // call. 3748 DeviceId string `json:"deviceId,omitempty"` 3749 // ExpireTime: Immutable. The time when this migration token expires. This can 3750 // be at most seven days from the time of creation. The migration token is 3751 // deleted seven days after it expires. 3752 ExpireTime string `json:"expireTime,omitempty"` 3753 // ManagementMode: Required. Immutable. The management mode of the device or 3754 // profile being migrated. 3755 // 3756 // Possible values: 3757 // "MANAGEMENT_MODE_UNSPECIFIED" - This value must not be used. 3758 // "WORK_PROFILE_PERSONALLY_OWNED" - A work profile on a personally owned 3759 // device. Supported only on devices running Android 9 and above. 3760 // "WORK_PROFILE_COMPANY_OWNED" - A work profile on a company-owned device. 3761 // Supported only on devices running Android 11 and above. 3762 // "FULLY_MANAGED" - A fully-managed device. Supported only on devices 3763 // running Android 9 and above. 3764 ManagementMode string `json:"managementMode,omitempty"` 3765 // Name: Output only. The name of the migration token, which is generated by 3766 // the server during creation, in the form 3767 // enterprises/{enterprise}/migrationTokens/{migration_token}. 3768 Name string `json:"name,omitempty"` 3769 // Policy: Required. Immutable. The name of the policy initially applied to the 3770 // enrolled device, in the form enterprises/{enterprise}/policies/{policy}. 3771 Policy string `json:"policy,omitempty"` 3772 // Ttl: Input only. The time that this migration token is valid for. This is 3773 // input-only, and for returning a migration token the server will populate the 3774 // expireTime field. This can be at most seven days. The default is seven days. 3775 Ttl string `json:"ttl,omitempty"` 3776 // UserId: Required. Immutable. The user id of the Managed Google Play account 3777 // on the device, as in the Play EMM API. This corresponds to the userId 3778 // parameter in Play EMM API's Devices.get 3779 // (https://developers.google.com/android/work/play/emm-api/v1/devices/get#parameters) 3780 // call. 3781 UserId string `json:"userId,omitempty"` 3782 // Value: Output only. The value of the migration token. 3783 Value string `json:"value,omitempty"` 3784 3785 // ServerResponse contains the HTTP response code and headers from the server. 3786 googleapi.ServerResponse `json:"-"` 3787 // ForceSendFields is a list of field names (e.g. "AdditionalData") to 3788 // unconditionally include in API requests. By default, fields with empty or 3789 // default values are omitted from API requests. See 3790 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3791 // details. 3792 ForceSendFields []string `json:"-"` 3793 // NullFields is a list of field names (e.g. "AdditionalData") to include in 3794 // API requests with the JSON null value. By default, fields with empty values 3795 // are omitted from API requests. See 3796 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3797 NullFields []string `json:"-"` 3798 } 3799 3800 func (s *MigrationToken) MarshalJSON() ([]byte, error) { 3801 type NoMethod MigrationToken 3802 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3803 } 3804 3805 // NetworkInfo: Device network info. 3806 type NetworkInfo struct { 3807 // Imei: IMEI number of the GSM device. For example, A1000031212. 3808 Imei string `json:"imei,omitempty"` 3809 // Meid: MEID number of the CDMA device. For example, A00000292788E1. 3810 Meid string `json:"meid,omitempty"` 3811 // NetworkOperatorName: Alphabetic name of current registered operator. For 3812 // example, Vodafone. 3813 NetworkOperatorName string `json:"networkOperatorName,omitempty"` 3814 // TelephonyInfos: Provides telephony information associated with each SIM card 3815 // on the device. Only supported on fully managed devices starting from Android 3816 // API level 23. 3817 TelephonyInfos []*TelephonyInfo `json:"telephonyInfos,omitempty"` 3818 // WifiMacAddress: Wi-Fi MAC address of the device. For example, 3819 // 7c:11:11:11:11:11. 3820 WifiMacAddress string `json:"wifiMacAddress,omitempty"` 3821 // ForceSendFields is a list of field names (e.g. "Imei") to unconditionally 3822 // include in API requests. By default, fields with empty or default values are 3823 // omitted from API requests. See 3824 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3825 // details. 3826 ForceSendFields []string `json:"-"` 3827 // NullFields is a list of field names (e.g. "Imei") to include in API requests 3828 // with the JSON null value. By default, fields with empty values are omitted 3829 // from API requests. See 3830 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3831 NullFields []string `json:"-"` 3832 } 3833 3834 func (s *NetworkInfo) MarshalJSON() ([]byte, error) { 3835 type NoMethod NetworkInfo 3836 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3837 } 3838 3839 // NonComplianceDetail: Provides detail about non-compliance with a policy 3840 // setting. 3841 type NonComplianceDetail struct { 3842 // CurrentValue: If the policy setting could not be applied, the current value 3843 // of the setting on the device. 3844 CurrentValue interface{} `json:"currentValue,omitempty"` 3845 // FieldPath: For settings with nested fields, if a particular nested field is 3846 // out of compliance, this specifies the full path to the offending field. The 3847 // path is formatted in the same way the policy JSON field would be referenced 3848 // in JavaScript, that is: 1) For object-typed fields, the field name is 3849 // followed by a dot then by a subfield name. 2) For array-typed fields, the 3850 // field name is followed by the array index enclosed in brackets. For example, 3851 // to indicate a problem with the url field in the externalData field in the 3852 // 3rd application, the path would be applications[2].externalData.url 3853 FieldPath string `json:"fieldPath,omitempty"` 3854 // InstallationFailureReason: If package_name is set and the non-compliance 3855 // reason is APP_NOT_INSTALLED or APP_NOT_UPDATED, the detailed reason the app 3856 // can't be installed or updated. 3857 // 3858 // Possible values: 3859 // "INSTALLATION_FAILURE_REASON_UNSPECIFIED" - This value is disallowed. 3860 // "INSTALLATION_FAILURE_REASON_UNKNOWN" - An unknown condition is preventing 3861 // the app from being installed. Some potential reasons are that the device 3862 // doesn't have enough storage, the device network connection is unreliable, or 3863 // the installation is taking longer than expected. The installation will be 3864 // retried automatically. 3865 // "IN_PROGRESS" - The installation is still in progress. 3866 // "NOT_FOUND" - The app was not found in Play. 3867 // "NOT_COMPATIBLE_WITH_DEVICE" - The app is incompatible with the device. 3868 // "NOT_APPROVED" - The app has not been approved by the admin. 3869 // "PERMISSIONS_NOT_ACCEPTED" - The app has new permissions that have not 3870 // been accepted by the admin. 3871 // "NOT_AVAILABLE_IN_COUNTRY" - The app is not available in the user's 3872 // country. 3873 // "NO_LICENSES_REMAINING" - There are no licenses available to assign to the 3874 // user. 3875 // "NOT_ENROLLED" - The enterprise is no longer enrolled with Managed Google 3876 // Play or the admin has not accepted the latest Managed Google Play Terms of 3877 // Service. 3878 // "USER_INVALID" - The user is no longer valid. The user may have been 3879 // deleted or disabled. 3880 // "NETWORK_ERROR_UNRELIABLE_CONNECTION" - A network error on the user's 3881 // device has prevented the install from succeeding. This usually happens when 3882 // the device's internet connectivity is degraded, unavailable or there's a 3883 // network configuration issue. Please ensure the device has access to full 3884 // internet connectivity on a network that meets Android Enterprise Network 3885 // Requirements (https://support.google.com/work/android/answer/10513641). App 3886 // install or update will automatically resume once this is the case. 3887 // "INSUFFICIENT_STORAGE" - The user's device does not have sufficient 3888 // storage space to install the app. This can be resolved by clearing up 3889 // storage space on the device. App install or update will automatically resume 3890 // once the device has sufficient storage. 3891 InstallationFailureReason string `json:"installationFailureReason,omitempty"` 3892 // NonComplianceReason: The reason the device is not in compliance with the 3893 // setting. 3894 // 3895 // Possible values: 3896 // "NON_COMPLIANCE_REASON_UNSPECIFIED" - This value is disallowed. 3897 // "API_LEVEL" - The setting is not supported in the API level of the Android 3898 // version running on the device. 3899 // "MANAGEMENT_MODE" - The management mode (profile owner, device owner, 3900 // etc.) doesn't support the setting. 3901 // "USER_ACTION" - The user has not taken required action to comply with the 3902 // setting. 3903 // "INVALID_VALUE" - The setting has an invalid value. 3904 // "APP_NOT_INSTALLED" - The app required to implement the policy is not 3905 // installed. 3906 // "UNSUPPORTED" - The policy is not supported by the version of Android 3907 // Device Policy on the device. 3908 // "APP_INSTALLED" - A blocked app is installed. 3909 // "PENDING" - The setting hasn't been applied at the time of the report, but 3910 // is expected to be applied shortly. 3911 // "APP_INCOMPATIBLE" - The setting can't be applied to the app because the 3912 // app doesn't support it, for example because its target SDK version is not 3913 // high enough. 3914 // "APP_NOT_UPDATED" - The app is installed, but it hasn't been updated to 3915 // the minimum version code specified by policy. 3916 // "DEVICE_INCOMPATIBLE" - The device is incompatible with the policy 3917 // requirements. 3918 NonComplianceReason string `json:"nonComplianceReason,omitempty"` 3919 // PackageName: The package name indicating which app is out of compliance, if 3920 // applicable. 3921 PackageName string `json:"packageName,omitempty"` 3922 // SettingName: The name of the policy setting. This is the JSON field name of 3923 // a top-level Policy field. 3924 SettingName string `json:"settingName,omitempty"` 3925 // SpecificNonComplianceContext: Additional context for 3926 // specific_non_compliance_reason. 3927 SpecificNonComplianceContext *SpecificNonComplianceContext `json:"specificNonComplianceContext,omitempty"` 3928 // SpecificNonComplianceReason: The policy-specific reason the device is not in 3929 // compliance with the setting. 3930 // 3931 // Possible values: 3932 // "SPECIFIC_NON_COMPLIANCE_REASON_UNSPECIFIED" - Specific non-compliance 3933 // reason is not specified. Fields in specific_non_compliance_context are not 3934 // set. 3935 // "PASSWORD_POLICIES_USER_CREDENTIALS_CONFIRMATION_REQUIRED" - User needs to 3936 // confirm credentials by entering the screen lock. Fields in 3937 // specific_non_compliance_context are not set. nonComplianceReason is set to 3938 // USER_ACTION. 3939 // "PASSWORD_POLICIES_PASSWORD_EXPIRED" - The device or profile password has 3940 // expired. passwordPoliciesContext is set. nonComplianceReason is set to 3941 // USER_ACTION. 3942 // "PASSWORD_POLICIES_PASSWORD_NOT_SUFFICIENT" - The device password does not 3943 // satisfy password requirements. passwordPoliciesContext is set. 3944 // nonComplianceReason is set to USER_ACTION. 3945 // "ONC_WIFI_INVALID_VALUE" - There is an incorrect value in ONC Wi-Fi 3946 // configuration. fieldPath specifies which field value is incorrect. 3947 // oncWifiContext is set. nonComplianceReason is set to INVALID_VALUE. 3948 // "ONC_WIFI_API_LEVEL" - The ONC Wi-Fi setting is not supported in the API 3949 // level of the Android version running on the device. fieldPath specifies 3950 // which field value is not supported. oncWifiContext is set. 3951 // nonComplianceReason is set to API_LEVEL. 3952 // "ONC_WIFI_INVALID_ENTERPRISE_CONFIG" - The enterprise Wi-Fi network is 3953 // missing either the root CA or domain name. nonComplianceReason is set to 3954 // INVALID_VALUE. 3955 // "ONC_WIFI_USER_SHOULD_REMOVE_NETWORK" - User needs to remove the 3956 // configured Wi-Fi network manually. This is applicable only on work profiles 3957 // on personally-owned devices. nonComplianceReason is set to USER_ACTION. 3958 // "ONC_WIFI_KEY_PAIR_ALIAS_NOT_CORRESPONDING_TO_EXISTING_KEY" - Key pair 3959 // alias specified via ClientCertKeyPairAlias 3960 // (https://chromium.googlesource.com/chromium/src/+/main/components/onc/docs/onc_spec.md#eap-type) 3961 // field in openNetworkConfiguration does not correspond to an existing key 3962 // installed on the device. nonComplianceReason is set to INVALID_VALUE. 3963 SpecificNonComplianceReason string `json:"specificNonComplianceReason,omitempty"` 3964 // ForceSendFields is a list of field names (e.g. "CurrentValue") to 3965 // unconditionally include in API requests. By default, fields with empty or 3966 // default values are omitted from API requests. See 3967 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3968 // details. 3969 ForceSendFields []string `json:"-"` 3970 // NullFields is a list of field names (e.g. "CurrentValue") to include in API 3971 // requests with the JSON null value. By default, fields with empty values are 3972 // omitted from API requests. See 3973 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3974 NullFields []string `json:"-"` 3975 } 3976 3977 func (s *NonComplianceDetail) MarshalJSON() ([]byte, error) { 3978 type NoMethod NonComplianceDetail 3979 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3980 } 3981 3982 // NonComplianceDetailCondition: A compliance rule condition which is satisfied 3983 // if there exists any matching NonComplianceDetail for the device. A 3984 // NonComplianceDetail matches a NonComplianceDetailCondition if all the fields 3985 // which are set within the NonComplianceDetailCondition match the 3986 // corresponding NonComplianceDetail fields. 3987 type NonComplianceDetailCondition struct { 3988 // NonComplianceReason: The reason the device is not in compliance with the 3989 // setting. If not set, then this condition matches any reason. 3990 // 3991 // Possible values: 3992 // "NON_COMPLIANCE_REASON_UNSPECIFIED" - This value is disallowed. 3993 // "API_LEVEL" - The setting is not supported in the API level of the Android 3994 // version running on the device. 3995 // "MANAGEMENT_MODE" - The management mode (profile owner, device owner, 3996 // etc.) doesn't support the setting. 3997 // "USER_ACTION" - The user has not taken required action to comply with the 3998 // setting. 3999 // "INVALID_VALUE" - The setting has an invalid value. 4000 // "APP_NOT_INSTALLED" - The app required to implement the policy is not 4001 // installed. 4002 // "UNSUPPORTED" - The policy is not supported by the version of Android 4003 // Device Policy on the device. 4004 // "APP_INSTALLED" - A blocked app is installed. 4005 // "PENDING" - The setting hasn't been applied at the time of the report, but 4006 // is expected to be applied shortly. 4007 // "APP_INCOMPATIBLE" - The setting can't be applied to the app because the 4008 // app doesn't support it, for example because its target SDK version is not 4009 // high enough. 4010 // "APP_NOT_UPDATED" - The app is installed, but it hasn't been updated to 4011 // the minimum version code specified by policy. 4012 // "DEVICE_INCOMPATIBLE" - The device is incompatible with the policy 4013 // requirements. 4014 NonComplianceReason string `json:"nonComplianceReason,omitempty"` 4015 // PackageName: The package name of the app that's out of compliance. If not 4016 // set, then this condition matches any package name. 4017 PackageName string `json:"packageName,omitempty"` 4018 // SettingName: The name of the policy setting. This is the JSON field name of 4019 // a top-level Policy field. If not set, then this condition matches any 4020 // setting name. 4021 SettingName string `json:"settingName,omitempty"` 4022 // ForceSendFields is a list of field names (e.g. "NonComplianceReason") to 4023 // unconditionally include in API requests. By default, fields with empty or 4024 // default values are omitted from API requests. See 4025 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4026 // details. 4027 ForceSendFields []string `json:"-"` 4028 // NullFields is a list of field names (e.g. "NonComplianceReason") to include 4029 // in API requests with the JSON null value. By default, fields with empty 4030 // values are omitted from API requests. See 4031 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4032 NullFields []string `json:"-"` 4033 } 4034 4035 func (s *NonComplianceDetailCondition) MarshalJSON() ([]byte, error) { 4036 type NoMethod NonComplianceDetailCondition 4037 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4038 } 4039 4040 // OncCertificateProvider: This feature is not generally available. 4041 type OncCertificateProvider struct { 4042 // CertificateReferences: This feature is not generally available. 4043 CertificateReferences []string `json:"certificateReferences,omitempty"` 4044 // ContentProviderEndpoint: This feature is not generally available. 4045 ContentProviderEndpoint *ContentProviderEndpoint `json:"contentProviderEndpoint,omitempty"` 4046 // ForceSendFields is a list of field names (e.g. "CertificateReferences") to 4047 // unconditionally include in API requests. By default, fields with empty or 4048 // default values are omitted from API requests. See 4049 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4050 // details. 4051 ForceSendFields []string `json:"-"` 4052 // NullFields is a list of field names (e.g. "CertificateReferences") to 4053 // include in API requests with the JSON null value. By default, fields with 4054 // empty values are omitted from API requests. See 4055 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4056 NullFields []string `json:"-"` 4057 } 4058 4059 func (s *OncCertificateProvider) MarshalJSON() ([]byte, error) { 4060 type NoMethod OncCertificateProvider 4061 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4062 } 4063 4064 // OncWifiContext: Additional context for non-compliance related to Wi-Fi 4065 // configuration. 4066 type OncWifiContext struct { 4067 // WifiGuid: The GUID of non-compliant Wi-Fi configuration. 4068 WifiGuid string `json:"wifiGuid,omitempty"` 4069 // ForceSendFields is a list of field names (e.g. "WifiGuid") to 4070 // unconditionally include in API requests. By default, fields with empty or 4071 // default values are omitted from API requests. See 4072 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4073 // details. 4074 ForceSendFields []string `json:"-"` 4075 // NullFields is a list of field names (e.g. "WifiGuid") to include in API 4076 // requests with the JSON null value. By default, fields with empty values are 4077 // omitted from API requests. See 4078 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4079 NullFields []string `json:"-"` 4080 } 4081 4082 func (s *OncWifiContext) MarshalJSON() ([]byte, error) { 4083 type NoMethod OncWifiContext 4084 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4085 } 4086 4087 // Operation: This resource represents a long-running operation that is the 4088 // result of a network API call. 4089 type Operation struct { 4090 // Done: If the value is false, it means the operation is still in progress. If 4091 // true, the operation is completed, and either error or response is available. 4092 Done bool `json:"done,omitempty"` 4093 // Error: The error result of the operation in case of failure or cancellation. 4094 Error *Status `json:"error,omitempty"` 4095 // Metadata: Service-specific metadata associated with the operation. It 4096 // typically contains progress information and common metadata such as create 4097 // time. Some services might not provide such metadata. Any method that returns 4098 // a long-running operation should document the metadata type, if any. 4099 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 4100 // Name: The server-assigned name, which is only unique within the same service 4101 // that originally returns it. If you use the default HTTP mapping, the name 4102 // should be a resource name ending with operations/{unique_id}. 4103 Name string `json:"name,omitempty"` 4104 // Response: The normal, successful response of the operation. If the original 4105 // method returns no data on success, such as Delete, the response is 4106 // google.protobuf.Empty. If the original method is standard Get/Create/Update, 4107 // the response should be the resource. For other methods, the response should 4108 // have the type XxxResponse, where Xxx is the original method name. For 4109 // example, if the original method name is TakeSnapshot(), the inferred 4110 // response type is TakeSnapshotResponse. 4111 Response googleapi.RawMessage `json:"response,omitempty"` 4112 4113 // ServerResponse contains the HTTP response code and headers from the server. 4114 googleapi.ServerResponse `json:"-"` 4115 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally 4116 // include in API requests. By default, fields with empty or default values are 4117 // omitted from API requests. See 4118 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4119 // details. 4120 ForceSendFields []string `json:"-"` 4121 // NullFields is a list of field names (e.g. "Done") to include in API requests 4122 // with the JSON null value. By default, fields with empty values are omitted 4123 // from API requests. See 4124 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4125 NullFields []string `json:"-"` 4126 } 4127 4128 func (s *Operation) MarshalJSON() ([]byte, error) { 4129 type NoMethod Operation 4130 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4131 } 4132 4133 // OsShutdownEvent: Device was shutdown. Intentionally empty. 4134 type OsShutdownEvent struct { 4135 } 4136 4137 // OsStartupEvent: Device was started. 4138 type OsStartupEvent struct { 4139 // VerifiedBootState: Verified Boot state. 4140 // 4141 // Possible values: 4142 // "VERIFIED_BOOT_STATE_UNSPECIFIED" - Unknown value. 4143 // "GREEN" - Indicates that there is a full chain of trust extending from the 4144 // bootloader to verified partitions including the bootloader, boot partition, 4145 // and all verified partitions. 4146 // "YELLOW" - Indicates that the boot partition has been verified using the 4147 // embedded certificate and the signature is valid. 4148 // "ORANGE" - Indicates that the device may be freely modified. Device 4149 // integrity is left to the user to verify out-of-band. 4150 VerifiedBootState string `json:"verifiedBootState,omitempty"` 4151 // VerityMode: dm-verity mode. 4152 // 4153 // Possible values: 4154 // "DM_VERITY_MODE_UNSPECIFIED" - Unknown value. 4155 // "ENFORCING" - Indicates that the device will be restarted when corruption 4156 // is detected. 4157 // "IO_ERROR" - Indicates that an I/O error will be returned for an attempt 4158 // to read corrupted data blocks (also known as eio boot state). 4159 // "DISABLED" - Indicates that dm-verity is disabled on device. 4160 VerityMode string `json:"verityMode,omitempty"` 4161 // ForceSendFields is a list of field names (e.g. "VerifiedBootState") to 4162 // unconditionally include in API requests. By default, fields with empty or 4163 // default values are omitted from API requests. See 4164 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4165 // details. 4166 ForceSendFields []string `json:"-"` 4167 // NullFields is a list of field names (e.g. "VerifiedBootState") to include in 4168 // API requests with the JSON null value. By default, fields with empty values 4169 // are omitted from API requests. See 4170 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4171 NullFields []string `json:"-"` 4172 } 4173 4174 func (s *OsStartupEvent) MarshalJSON() ([]byte, error) { 4175 type NoMethod OsStartupEvent 4176 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4177 } 4178 4179 // PackageNameList: A list of package names. 4180 type PackageNameList struct { 4181 // PackageNames: A list of package names. 4182 PackageNames []string `json:"packageNames,omitempty"` 4183 // ForceSendFields is a list of field names (e.g. "PackageNames") to 4184 // unconditionally include in API requests. By default, fields with empty or 4185 // default values are omitted from API requests. See 4186 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4187 // details. 4188 ForceSendFields []string `json:"-"` 4189 // NullFields is a list of field names (e.g. "PackageNames") to include in API 4190 // requests with the JSON null value. By default, fields with empty values are 4191 // omitted from API requests. See 4192 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4193 NullFields []string `json:"-"` 4194 } 4195 4196 func (s *PackageNameList) MarshalJSON() ([]byte, error) { 4197 type NoMethod PackageNameList 4198 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4199 } 4200 4201 // PasswordPoliciesContext: Additional context for non-compliance related to 4202 // password policies. 4203 type PasswordPoliciesContext struct { 4204 // PasswordPolicyScope: The scope of non-compliant password. 4205 // 4206 // Possible values: 4207 // "SCOPE_UNSPECIFIED" - The scope is unspecified. The password requirements 4208 // are applied to the work profile for work profile devices and the whole 4209 // device for fully managed or dedicated devices. 4210 // "SCOPE_DEVICE" - The password requirements are only applied to the device. 4211 // "SCOPE_PROFILE" - The password requirements are only applied to the work 4212 // profile. 4213 PasswordPolicyScope string `json:"passwordPolicyScope,omitempty"` 4214 // ForceSendFields is a list of field names (e.g. "PasswordPolicyScope") to 4215 // unconditionally include in API requests. By default, fields with empty or 4216 // default values are omitted from API requests. See 4217 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4218 // details. 4219 ForceSendFields []string `json:"-"` 4220 // NullFields is a list of field names (e.g. "PasswordPolicyScope") to include 4221 // in API requests with the JSON null value. By default, fields with empty 4222 // values are omitted from API requests. See 4223 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4224 NullFields []string `json:"-"` 4225 } 4226 4227 func (s *PasswordPoliciesContext) MarshalJSON() ([]byte, error) { 4228 type NoMethod PasswordPoliciesContext 4229 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4230 } 4231 4232 // PasswordRequirements: Requirements for the password used to unlock a device. 4233 type PasswordRequirements struct { 4234 // MaximumFailedPasswordsForWipe: Number of incorrect device-unlock passwords 4235 // that can be entered before a device is wiped. A value of 0 means there is no 4236 // restriction. 4237 MaximumFailedPasswordsForWipe int64 `json:"maximumFailedPasswordsForWipe,omitempty"` 4238 // PasswordExpirationTimeout: Password expiration timeout. 4239 PasswordExpirationTimeout string `json:"passwordExpirationTimeout,omitempty"` 4240 // PasswordHistoryLength: The length of the password history. After setting 4241 // this field, the user won't be able to enter a new password that is the same 4242 // as any password in the history. A value of 0 means there is no restriction. 4243 PasswordHistoryLength int64 `json:"passwordHistoryLength,omitempty"` 4244 // PasswordMinimumLength: The minimum allowed password length. A value of 0 4245 // means there is no restriction. Only enforced when password_quality is 4246 // NUMERIC, NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, or COMPLEX. 4247 PasswordMinimumLength int64 `json:"passwordMinimumLength,omitempty"` 4248 // PasswordMinimumLetters: Minimum number of letters required in the password. 4249 // Only enforced when password_quality is COMPLEX. 4250 PasswordMinimumLetters int64 `json:"passwordMinimumLetters,omitempty"` 4251 // PasswordMinimumLowerCase: Minimum number of lower case letters required in 4252 // the password. Only enforced when password_quality is COMPLEX. 4253 PasswordMinimumLowerCase int64 `json:"passwordMinimumLowerCase,omitempty"` 4254 // PasswordMinimumNonLetter: Minimum number of non-letter characters (numerical 4255 // digits or symbols) required in the password. Only enforced when 4256 // password_quality is COMPLEX. 4257 PasswordMinimumNonLetter int64 `json:"passwordMinimumNonLetter,omitempty"` 4258 // PasswordMinimumNumeric: Minimum number of numerical digits required in the 4259 // password. Only enforced when password_quality is COMPLEX. 4260 PasswordMinimumNumeric int64 `json:"passwordMinimumNumeric,omitempty"` 4261 // PasswordMinimumSymbols: Minimum number of symbols required in the password. 4262 // Only enforced when password_quality is COMPLEX. 4263 PasswordMinimumSymbols int64 `json:"passwordMinimumSymbols,omitempty"` 4264 // PasswordMinimumUpperCase: Minimum number of upper case letters required in 4265 // the password. Only enforced when password_quality is COMPLEX. 4266 PasswordMinimumUpperCase int64 `json:"passwordMinimumUpperCase,omitempty"` 4267 // PasswordQuality: The required password quality. 4268 // 4269 // Possible values: 4270 // "PASSWORD_QUALITY_UNSPECIFIED" - There are no password requirements. 4271 // "BIOMETRIC_WEAK" - The device must be secured with a low-security 4272 // biometric recognition technology, at minimum. This includes technologies 4273 // that can recognize the identity of an individual that are roughly equivalent 4274 // to a 3-digit PIN (false detection is less than 1 in 1,000).This, when 4275 // applied on personally owned work profile devices on Android 12 4276 // device-scoped, will be treated as COMPLEXITY_LOW for application. See 4277 // PasswordQuality for details. 4278 // "SOMETHING" - A password is required, but there are no restrictions on 4279 // what the password must contain.This, when applied on personally owned work 4280 // profile devices on Android 12 device-scoped, will be treated as 4281 // COMPLEXITY_LOW for application. See PasswordQuality for details. 4282 // "NUMERIC" - The password must contain numeric characters.This, when 4283 // applied on personally owned work profile devices on Android 12 4284 // device-scoped, will be treated as COMPLEXITY_MEDIUM for application. See 4285 // PasswordQuality for details. 4286 // "NUMERIC_COMPLEX" - The password must contain numeric characters with no 4287 // repeating (4444) or ordered (1234, 4321, 2468) sequences.This, when applied 4288 // on personally owned work profile devices on Android 12 device-scoped, will 4289 // be treated as COMPLEXITY_MEDIUM for application. See PasswordQuality for 4290 // details. 4291 // "ALPHABETIC" - The password must contain alphabetic (or symbol) 4292 // characters.This, when applied on personally owned work profile devices on 4293 // Android 12 device-scoped, will be treated as COMPLEXITY_HIGH for 4294 // application. See PasswordQuality for details. 4295 // "ALPHANUMERIC" - The password must contain both numeric and alphabetic (or 4296 // symbol) characters.This, when applied on personally owned work profile 4297 // devices on Android 12 device-scoped, will be treated as COMPLEXITY_HIGH for 4298 // application. See PasswordQuality for details. 4299 // "COMPLEX" - The password must meet the minimum requirements specified in 4300 // passwordMinimumLength, passwordMinimumLetters, passwordMinimumSymbols, etc. 4301 // For example, if passwordMinimumSymbols is 2, the password must contain at 4302 // least two symbols.This, when applied on personally owned work profile 4303 // devices on Android 12 device-scoped, will be treated as COMPLEXITY_HIGH for 4304 // application. In this case, the requirements in passwordMinimumLength, 4305 // passwordMinimumLetters, passwordMinimumSymbols, etc are not applied. See 4306 // PasswordQuality for details. 4307 // "COMPLEXITY_LOW" - Define the low password complexity band as: pattern PIN 4308 // with repeating (4444) or ordered (1234, 4321, 2468) sequencesThis sets the 4309 // minimum complexity band which the password must meet.Enforcement varies 4310 // among different Android versions, management modes and password scopes. See 4311 // PasswordQuality for details. 4312 // "COMPLEXITY_MEDIUM" - Define the medium password complexity band as: PIN 4313 // with no repeating (4444) or ordered (1234, 4321, 2468) sequences, length at 4314 // least 4 alphabetic, length at least 4 alphanumeric, length at least 4This 4315 // sets the minimum complexity band which the password must meet.Enforcement 4316 // varies among different Android versions, management modes and password 4317 // scopes. See PasswordQuality for details. 4318 // "COMPLEXITY_HIGH" - Define the high password complexity band as:On Android 4319 // 12 and above: PIN with no repeating (4444) or ordered (1234, 4321, 2468) 4320 // sequences, length at least 8 alphabetic, length at least 6 alphanumeric, 4321 // length at least 6This sets the minimum complexity band which the password 4322 // must meet.Enforcement varies among different Android versions, management 4323 // modes and password scopes. See PasswordQuality for details. 4324 PasswordQuality string `json:"passwordQuality,omitempty"` 4325 // PasswordScope: The scope that the password requirement applies to. 4326 // 4327 // Possible values: 4328 // "SCOPE_UNSPECIFIED" - The scope is unspecified. The password requirements 4329 // are applied to the work profile for work profile devices and the whole 4330 // device for fully managed or dedicated devices. 4331 // "SCOPE_DEVICE" - The password requirements are only applied to the device. 4332 // "SCOPE_PROFILE" - The password requirements are only applied to the work 4333 // profile. 4334 PasswordScope string `json:"passwordScope,omitempty"` 4335 // RequirePasswordUnlock: The length of time after a device or work profile is 4336 // unlocked using a strong form of authentication (password, PIN, pattern) that 4337 // it can be unlocked using any other authentication method (e.g. fingerprint, 4338 // trust agents, face). After the specified time period elapses, only strong 4339 // forms of authentication can be used to unlock the device or work profile. 4340 // 4341 // Possible values: 4342 // "REQUIRE_PASSWORD_UNLOCK_UNSPECIFIED" - Unspecified. Defaults to 4343 // USE_DEFAULT_DEVICE_TIMEOUT. 4344 // "USE_DEFAULT_DEVICE_TIMEOUT" - The timeout period is set to the device’s 4345 // default. 4346 // "REQUIRE_EVERY_DAY" - The timeout period is set to 24 hours. 4347 RequirePasswordUnlock string `json:"requirePasswordUnlock,omitempty"` 4348 // UnifiedLockSettings: Controls whether a unified lock is allowed for the 4349 // device and the work profile, on devices running Android 9 and above with a 4350 // work profile. This can be set only if password_scope is set to 4351 // SCOPE_PROFILE, the policy will be rejected otherwise. If user has not set a 4352 // separate work lock and this field is set to REQUIRE_SEPARATE_WORK_LOCK, a 4353 // NonComplianceDetail is reported with nonComplianceReason set to USER_ACTION. 4354 // 4355 // Possible values: 4356 // "UNIFIED_LOCK_SETTINGS_UNSPECIFIED" - Unspecified. Defaults to 4357 // ALLOW_UNIFIED_WORK_AND_PERSONAL_LOCK. 4358 // "ALLOW_UNIFIED_WORK_AND_PERSONAL_LOCK" - A common lock for the device and 4359 // the work profile is allowed. 4360 // "REQUIRE_SEPARATE_WORK_LOCK" - A separate lock for the work profile is 4361 // required. 4362 UnifiedLockSettings string `json:"unifiedLockSettings,omitempty"` 4363 // ForceSendFields is a list of field names (e.g. 4364 // "MaximumFailedPasswordsForWipe") to unconditionally include in API requests. 4365 // By default, fields with empty or default values are omitted from API 4366 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields 4367 // for more details. 4368 ForceSendFields []string `json:"-"` 4369 // NullFields is a list of field names (e.g. "MaximumFailedPasswordsForWipe") 4370 // to include in API requests with the JSON null value. By default, fields with 4371 // empty values are omitted from API requests. See 4372 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4373 NullFields []string `json:"-"` 4374 } 4375 4376 func (s *PasswordRequirements) MarshalJSON() ([]byte, error) { 4377 type NoMethod PasswordRequirements 4378 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4379 } 4380 4381 // PerAppResult: The result of an attempt to clear the data of a single app. 4382 type PerAppResult struct { 4383 // ClearingResult: The result of an attempt to clear the data of a single app. 4384 // 4385 // Possible values: 4386 // "CLEARING_RESULT_UNSPECIFIED" - Unspecified result. 4387 // "SUCCESS" - This app’s data was successfully cleared. 4388 // "APP_NOT_FOUND" - This app’s data could not be cleared because the app 4389 // was not found. 4390 // "APP_PROTECTED" - This app’s data could not be cleared because the app 4391 // is protected. For example, this may apply to apps critical to the 4392 // functioning of the device, such as Google Play Store. 4393 // "API_LEVEL" - This app’s data could not be cleared because the device 4394 // API level does not support this command. 4395 ClearingResult string `json:"clearingResult,omitempty"` 4396 // ForceSendFields is a list of field names (e.g. "ClearingResult") to 4397 // unconditionally include in API requests. By default, fields with empty or 4398 // default values are omitted from API requests. See 4399 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4400 // details. 4401 ForceSendFields []string `json:"-"` 4402 // NullFields is a list of field names (e.g. "ClearingResult") to include in 4403 // API requests with the JSON null value. By default, fields with empty values 4404 // are omitted from API requests. See 4405 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4406 NullFields []string `json:"-"` 4407 } 4408 4409 func (s *PerAppResult) MarshalJSON() ([]byte, error) { 4410 type NoMethod PerAppResult 4411 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4412 } 4413 4414 // PermissionGrant: Configuration for an Android permission and its grant 4415 // state. 4416 type PermissionGrant struct { 4417 // Permission: The Android permission or group, e.g. 4418 // android.permission.READ_CALENDAR or android.permission_group.CALENDAR. 4419 Permission string `json:"permission,omitempty"` 4420 // Policy: The policy for granting the permission. 4421 // 4422 // Possible values: 4423 // "PERMISSION_POLICY_UNSPECIFIED" - Policy not specified. If no policy is 4424 // specified for a permission at any level, then the PROMPT behavior is used by 4425 // default. 4426 // "PROMPT" - Prompt the user to grant a permission. 4427 // "GRANT" - Automatically grant a permission.On Android 12 and above, 4428 // Manifest.permission.READ_SMS 4429 // (https://developer.android.com/reference/android/Manifest.permission#READ_SMS) 4430 // and following sensor-related permissions can only be granted on fully 4431 // managed devices: Manifest.permission.ACCESS_FINE_LOCATION 4432 // (https://developer.android.com/reference/android/Manifest.permission#ACCESS_FINE_LOCATION) 4433 // Manifest.permission.ACCESS_BACKGROUND_LOCATION 4434 // (https://developer.android.com/reference/android/Manifest.permission#ACCESS_BACKGROUND_LOCATION) 4435 // Manifest.permission.ACCESS_COARSE_LOCATION 4436 // (https://developer.android.com/reference/android/Manifest.permission#ACCESS_COARSE_LOCATION) 4437 // Manifest.permission.CAMERA 4438 // (https://developer.android.com/reference/android/Manifest.permission#CAMERA) 4439 // Manifest.permission.RECORD_AUDIO 4440 // (https://developer.android.com/reference/android/Manifest.permission#RECORD_AUDIO) 4441 // Manifest.permission.ACTIVITY_RECOGNITION 4442 // (https://developer.android.com/reference/android/Manifest.permission#ACTIVITY_RECOGNITION) 4443 // Manifest.permission.BODY_SENSORS 4444 // (https://developer.android.com/reference/android/Manifest.permission#BODY_SENSORS) 4445 // "DENY" - Automatically deny a permission. 4446 Policy string `json:"policy,omitempty"` 4447 // ForceSendFields is a list of field names (e.g. "Permission") to 4448 // unconditionally include in API requests. By default, fields with empty or 4449 // default values are omitted from API requests. See 4450 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4451 // details. 4452 ForceSendFields []string `json:"-"` 4453 // NullFields is a list of field names (e.g. "Permission") to include in API 4454 // requests with the JSON null value. By default, fields with empty values are 4455 // omitted from API requests. See 4456 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4457 NullFields []string `json:"-"` 4458 } 4459 4460 func (s *PermissionGrant) MarshalJSON() ([]byte, error) { 4461 type NoMethod PermissionGrant 4462 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4463 } 4464 4465 // PersistentPreferredActivity: A default activity for handling intents that 4466 // match a particular intent filter. Note: To set up a kiosk, use InstallType 4467 // to KIOSK rather than use persistent preferred activities. 4468 type PersistentPreferredActivity struct { 4469 // Actions: The intent actions to match in the filter. If any actions are 4470 // included in the filter, then an intent's action must be one of those values 4471 // for it to match. If no actions are included, the intent action is ignored. 4472 Actions []string `json:"actions,omitempty"` 4473 // Categories: The intent categories to match in the filter. An intent includes 4474 // the categories that it requires, all of which must be included in the filter 4475 // in order to match. In other words, adding a category to the filter has no 4476 // impact on matching unless that category is specified in the intent. 4477 Categories []string `json:"categories,omitempty"` 4478 // ReceiverActivity: The activity that should be the default intent handler. 4479 // This should be an Android component name, e.g. 4480 // com.android.enterprise.app/.MainActivity. Alternatively, the value may be 4481 // the package name of an app, which causes Android Device Policy to choose an 4482 // appropriate activity from the app to handle the intent. 4483 ReceiverActivity string `json:"receiverActivity,omitempty"` 4484 // ForceSendFields is a list of field names (e.g. "Actions") to unconditionally 4485 // include in API requests. By default, fields with empty or default values are 4486 // omitted from API requests. See 4487 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4488 // details. 4489 ForceSendFields []string `json:"-"` 4490 // NullFields is a list of field names (e.g. "Actions") to include in API 4491 // requests with the JSON null value. By default, fields with empty values are 4492 // omitted from API requests. See 4493 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4494 NullFields []string `json:"-"` 4495 } 4496 4497 func (s *PersistentPreferredActivity) MarshalJSON() ([]byte, error) { 4498 type NoMethod PersistentPreferredActivity 4499 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4500 } 4501 4502 // PersonalApplicationPolicy: Policies for apps in the personal profile of a 4503 // company-owned device with a work profile. 4504 type PersonalApplicationPolicy struct { 4505 // InstallType: The type of installation to perform. 4506 // 4507 // Possible values: 4508 // "INSTALL_TYPE_UNSPECIFIED" - Unspecified. Defaults to AVAILABLE. 4509 // "BLOCKED" - The app is blocked and can't be installed in the personal 4510 // profile. If the app was previously installed in the device, it will be 4511 // uninstalled. 4512 // "AVAILABLE" - The app is available to install in the personal profile. 4513 InstallType string `json:"installType,omitempty"` 4514 // PackageName: The package name of the application. 4515 PackageName string `json:"packageName,omitempty"` 4516 // ForceSendFields is a list of field names (e.g. "InstallType") to 4517 // unconditionally include in API requests. By default, fields with empty or 4518 // default values are omitted from API requests. See 4519 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4520 // details. 4521 ForceSendFields []string `json:"-"` 4522 // NullFields is a list of field names (e.g. "InstallType") to include in API 4523 // requests with the JSON null value. By default, fields with empty values are 4524 // omitted from API requests. See 4525 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4526 NullFields []string `json:"-"` 4527 } 4528 4529 func (s *PersonalApplicationPolicy) MarshalJSON() ([]byte, error) { 4530 type NoMethod PersonalApplicationPolicy 4531 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4532 } 4533 4534 // PersonalUsagePolicies: Policies controlling personal usage on a 4535 // company-owned device with a work profile. 4536 type PersonalUsagePolicies struct { 4537 // AccountTypesWithManagementDisabled: Account types that can't be managed by 4538 // the user. 4539 AccountTypesWithManagementDisabled []string `json:"accountTypesWithManagementDisabled,omitempty"` 4540 // CameraDisabled: If true, the camera is disabled on the personal profile. 4541 CameraDisabled bool `json:"cameraDisabled,omitempty"` 4542 // MaxDaysWithWorkOff: Controls how long the work profile can stay off. The 4543 // minimum duration must be at least 3 days. Other details are as follows: - If 4544 // the duration is set to 0, the feature is turned off. - If the duration is 4545 // set to a value smaller than the minimum duration, the feature returns an 4546 // error. *Note:* If you want to avoid personal profiles being suspended during 4547 // long periods of off-time, you can temporarily set a large value for this 4548 // parameter. 4549 MaxDaysWithWorkOff int64 `json:"maxDaysWithWorkOff,omitempty"` 4550 // PersonalApplications: Policy applied to applications in the personal 4551 // profile. 4552 PersonalApplications []*PersonalApplicationPolicy `json:"personalApplications,omitempty"` 4553 // PersonalPlayStoreMode: Used together with personalApplications to control 4554 // how apps in the personal profile are allowed or blocked. 4555 // 4556 // Possible values: 4557 // "PLAY_STORE_MODE_UNSPECIFIED" - Unspecified. Defaults to BLOCKLIST. 4558 // "BLACKLIST" - All Play Store apps are available for installation in the 4559 // personal profile, except those whose installType is BLOCKED in 4560 // personalApplications. 4561 // "BLOCKLIST" - All Play Store apps are available for installation in the 4562 // personal profile, except those whose installType is BLOCKED in 4563 // personalApplications. 4564 // "ALLOWLIST" - Only apps explicitly specified in personalApplications with 4565 // installType set to AVAILABLE are allowed to be installed in the personal 4566 // profile. 4567 PersonalPlayStoreMode string `json:"personalPlayStoreMode,omitempty"` 4568 // ScreenCaptureDisabled: If true, screen capture is disabled for all users. 4569 ScreenCaptureDisabled bool `json:"screenCaptureDisabled,omitempty"` 4570 // ForceSendFields is a list of field names (e.g. 4571 // "AccountTypesWithManagementDisabled") to unconditionally include in API 4572 // requests. By default, fields with empty or default values are omitted from 4573 // API requests. See 4574 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4575 // details. 4576 ForceSendFields []string `json:"-"` 4577 // NullFields is a list of field names (e.g. 4578 // "AccountTypesWithManagementDisabled") to include in API requests with the 4579 // JSON null value. By default, fields with empty values are omitted from API 4580 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for 4581 // more details. 4582 NullFields []string `json:"-"` 4583 } 4584 4585 func (s *PersonalUsagePolicies) MarshalJSON() ([]byte, error) { 4586 type NoMethod PersonalUsagePolicies 4587 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4588 } 4589 4590 // Policy: A policy resource represents a group of settings that govern the 4591 // behavior of a managed device and the apps installed on it. 4592 type Policy struct { 4593 // AccountTypesWithManagementDisabled: Account types that can't be managed by 4594 // the user. 4595 AccountTypesWithManagementDisabled []string `json:"accountTypesWithManagementDisabled,omitempty"` 4596 // AddUserDisabled: Whether adding new users and profiles is disabled. 4597 AddUserDisabled bool `json:"addUserDisabled,omitempty"` 4598 // AdjustVolumeDisabled: Whether adjusting the master volume is disabled. Also 4599 // mutes the device. 4600 AdjustVolumeDisabled bool `json:"adjustVolumeDisabled,omitempty"` 4601 // AdvancedSecurityOverrides: Advanced security settings. In most cases, 4602 // setting these is not needed. 4603 AdvancedSecurityOverrides *AdvancedSecurityOverrides `json:"advancedSecurityOverrides,omitempty"` 4604 // AlwaysOnVpnPackage: Configuration for an always-on VPN connection. Use with 4605 // vpn_config_disabled to prevent modification of this setting. 4606 AlwaysOnVpnPackage *AlwaysOnVpnPackage `json:"alwaysOnVpnPackage,omitempty"` 4607 // AndroidDevicePolicyTracks: This setting is not supported. Any value is 4608 // ignored. 4609 // 4610 // Possible values: 4611 // "APP_TRACK_UNSPECIFIED" - This value is ignored. 4612 // "PRODUCTION" - The production track, which provides the latest stable 4613 // release. 4614 // "BETA" - The beta track, which provides the latest beta release. 4615 AndroidDevicePolicyTracks []string `json:"androidDevicePolicyTracks,omitempty"` 4616 // AppAutoUpdatePolicy: Recommended alternative: autoUpdateMode which is set 4617 // per app, provides greater flexibility around update frequency.When 4618 // autoUpdateMode is set to AUTO_UPDATE_POSTPONED or AUTO_UPDATE_HIGH_PRIORITY, 4619 // this field has no effect.The app auto update policy, which controls when 4620 // automatic app updates can be applied. 4621 // 4622 // Possible values: 4623 // "APP_AUTO_UPDATE_POLICY_UNSPECIFIED" - The auto-update policy is not set. 4624 // Equivalent to CHOICE_TO_THE_USER. 4625 // "CHOICE_TO_THE_USER" - The user can control auto-updates. 4626 // "NEVER" - Apps are never auto-updated. 4627 // "WIFI_ONLY" - Apps are auto-updated over Wi-Fi only. 4628 // "ALWAYS" - Apps are auto-updated at any time. Data charges may apply. 4629 AppAutoUpdatePolicy string `json:"appAutoUpdatePolicy,omitempty"` 4630 // Applications: Policy applied to apps. This can have at most 3,000 elements. 4631 Applications []*ApplicationPolicy `json:"applications,omitempty"` 4632 // AutoDateAndTimeZone: Whether auto date, time, and time zone are enabled on a 4633 // company-owned device. If this is set, then autoTimeRequired is ignored. 4634 // 4635 // Possible values: 4636 // "AUTO_DATE_AND_TIME_ZONE_UNSPECIFIED" - Unspecified. Defaults to 4637 // AUTO_DATE_AND_TIME_ZONE_USER_CHOICE. 4638 // "AUTO_DATE_AND_TIME_ZONE_USER_CHOICE" - Auto date, time, and time zone are 4639 // left to user's choice. 4640 // "AUTO_DATE_AND_TIME_ZONE_ENFORCED" - Enforce auto date, time, and time 4641 // zone on the device. 4642 AutoDateAndTimeZone string `json:"autoDateAndTimeZone,omitempty"` 4643 // AutoTimeRequired: Whether auto time is required, which prevents the user 4644 // from manually setting the date and time. If autoDateAndTimeZone is set, this 4645 // field is ignored. 4646 AutoTimeRequired bool `json:"autoTimeRequired,omitempty"` 4647 // BlockApplicationsEnabled: Whether applications other than the ones 4648 // configured in applications are blocked from being installed. When set, 4649 // applications that were installed under a previous policy but no longer 4650 // appear in the policy are automatically uninstalled. 4651 BlockApplicationsEnabled bool `json:"blockApplicationsEnabled,omitempty"` 4652 // BluetoothConfigDisabled: Whether configuring bluetooth is disabled. 4653 BluetoothConfigDisabled bool `json:"bluetoothConfigDisabled,omitempty"` 4654 // BluetoothContactSharingDisabled: Whether bluetooth contact sharing is 4655 // disabled. 4656 BluetoothContactSharingDisabled bool `json:"bluetoothContactSharingDisabled,omitempty"` 4657 // BluetoothDisabled: Whether bluetooth is disabled. Prefer this setting over 4658 // bluetooth_config_disabled because bluetooth_config_disabled can be bypassed 4659 // by the user. 4660 BluetoothDisabled bool `json:"bluetoothDisabled,omitempty"` 4661 // CameraAccess: Controls the use of the camera and whether the user has access 4662 // to the camera access toggle. 4663 // 4664 // Possible values: 4665 // "CAMERA_ACCESS_UNSPECIFIED" - If camera_disabled is true, this is 4666 // equivalent to CAMERA_ACCESS_DISABLED. Otherwise, this is equivalent to 4667 // CAMERA_ACCESS_USER_CHOICE. 4668 // "CAMERA_ACCESS_USER_CHOICE" - The field camera_disabled is ignored. This 4669 // is the default device behaviour: all cameras on the device are available. On 4670 // Android 12 and above, the user can use the camera access toggle. 4671 // "CAMERA_ACCESS_DISABLED" - The field camera_disabled is ignored. All 4672 // cameras on the device are disabled (for fully managed devices, this applies 4673 // device-wide and for work profiles this applies only to the work 4674 // profile).There are no explicit restrictions placed on the camera access 4675 // toggle on Android 12 and above: on fully managed devices, the camera access 4676 // toggle has no effect as all cameras are disabled. On devices with a work 4677 // profile, this toggle has no effect on apps in the work profile, but it 4678 // affects apps outside the work profile. 4679 // "CAMERA_ACCESS_ENFORCED" - The field camera_disabled is ignored. All 4680 // cameras on the device are available. On fully managed devices running 4681 // Android 12 and above, the user is unable to use the camera access toggle. On 4682 // devices which are not fully managed or which run Android 11 or below, this 4683 // is equivalent to CAMERA_ACCESS_USER_CHOICE. 4684 CameraAccess string `json:"cameraAccess,omitempty"` 4685 // CameraDisabled: If camera_access is set to any value other than 4686 // CAMERA_ACCESS_UNSPECIFIED, this has no effect. Otherwise this field controls 4687 // whether cameras are disabled: If true, all cameras are disabled, otherwise 4688 // they are available. For fully managed devices this field applies for all 4689 // apps on the device. For work profiles, this field applies only to apps in 4690 // the work profile, and the camera access of apps outside the work profile is 4691 // unaffected. 4692 CameraDisabled bool `json:"cameraDisabled,omitempty"` 4693 // CellBroadcastsConfigDisabled: Whether configuring cell broadcast is 4694 // disabled. 4695 CellBroadcastsConfigDisabled bool `json:"cellBroadcastsConfigDisabled,omitempty"` 4696 // ChoosePrivateKeyRules: Rules for determining apps' access to private keys. 4697 // See ChoosePrivateKeyRule for details. This must be empty if any application 4698 // has CERT_SELECTION delegation scope. 4699 ChoosePrivateKeyRules []*ChoosePrivateKeyRule `json:"choosePrivateKeyRules,omitempty"` 4700 // ComplianceRules: Rules declaring which mitigating actions to take when a 4701 // device is not compliant with its policy. When the conditions for multiple 4702 // rules are satisfied, all of the mitigating actions for the rules are taken. 4703 // There is a maximum limit of 100 rules. Use policy enforcement rules instead. 4704 ComplianceRules []*ComplianceRule `json:"complianceRules,omitempty"` 4705 // CreateWindowsDisabled: Whether creating windows besides app windows is 4706 // disabled. 4707 CreateWindowsDisabled bool `json:"createWindowsDisabled,omitempty"` 4708 // CredentialProviderPolicyDefault: Controls which apps are allowed to act as 4709 // credential providers on Android 14 and above. These apps store credentials, 4710 // see this (https://developer.android.com/training/sign-in/passkeys) and this 4711 // (https://developer.android.com/reference/androidx/credentials/CredentialManager) 4712 // for details. See also credentialProviderPolicy. 4713 // 4714 // Possible values: 4715 // "CREDENTIAL_PROVIDER_POLICY_DEFAULT_UNSPECIFIED" - Unspecified. Defaults 4716 // to CREDENTIAL_PROVIDER_DEFAULT_DISALLOWED. 4717 // "CREDENTIAL_PROVIDER_DEFAULT_DISALLOWED" - Apps with 4718 // credentialProviderPolicy unspecified are not allowed to act as a credential 4719 // provider. 4720 // "CREDENTIAL_PROVIDER_DEFAULT_DISALLOWED_EXCEPT_SYSTEM" - Apps with 4721 // credentialProviderPolicy unspecified are not allowed to act as a credential 4722 // provider except for the OEM default credential providers. OEM default 4723 // credential providers are always allowed to act as credential providers. 4724 CredentialProviderPolicyDefault string `json:"credentialProviderPolicyDefault,omitempty"` 4725 // CredentialsConfigDisabled: Whether configuring user credentials is disabled. 4726 CredentialsConfigDisabled bool `json:"credentialsConfigDisabled,omitempty"` 4727 // CrossProfilePolicies: Cross-profile policies applied on the device. 4728 CrossProfilePolicies *CrossProfilePolicies `json:"crossProfilePolicies,omitempty"` 4729 // DataRoamingDisabled: Whether roaming data services are disabled. 4730 DataRoamingDisabled bool `json:"dataRoamingDisabled,omitempty"` 4731 // DebuggingFeaturesAllowed: Whether the user is allowed to enable debugging 4732 // features. 4733 DebuggingFeaturesAllowed bool `json:"debuggingFeaturesAllowed,omitempty"` 4734 // DefaultPermissionPolicy: The default permission policy for runtime 4735 // permission requests. 4736 // 4737 // Possible values: 4738 // "PERMISSION_POLICY_UNSPECIFIED" - Policy not specified. If no policy is 4739 // specified for a permission at any level, then the PROMPT behavior is used by 4740 // default. 4741 // "PROMPT" - Prompt the user to grant a permission. 4742 // "GRANT" - Automatically grant a permission.On Android 12 and above, 4743 // Manifest.permission.READ_SMS 4744 // (https://developer.android.com/reference/android/Manifest.permission#READ_SMS) 4745 // and following sensor-related permissions can only be granted on fully 4746 // managed devices: Manifest.permission.ACCESS_FINE_LOCATION 4747 // (https://developer.android.com/reference/android/Manifest.permission#ACCESS_FINE_LOCATION) 4748 // Manifest.permission.ACCESS_BACKGROUND_LOCATION 4749 // (https://developer.android.com/reference/android/Manifest.permission#ACCESS_BACKGROUND_LOCATION) 4750 // Manifest.permission.ACCESS_COARSE_LOCATION 4751 // (https://developer.android.com/reference/android/Manifest.permission#ACCESS_COARSE_LOCATION) 4752 // Manifest.permission.CAMERA 4753 // (https://developer.android.com/reference/android/Manifest.permission#CAMERA) 4754 // Manifest.permission.RECORD_AUDIO 4755 // (https://developer.android.com/reference/android/Manifest.permission#RECORD_AUDIO) 4756 // Manifest.permission.ACTIVITY_RECOGNITION 4757 // (https://developer.android.com/reference/android/Manifest.permission#ACTIVITY_RECOGNITION) 4758 // Manifest.permission.BODY_SENSORS 4759 // (https://developer.android.com/reference/android/Manifest.permission#BODY_SENSORS) 4760 // "DENY" - Automatically deny a permission. 4761 DefaultPermissionPolicy string `json:"defaultPermissionPolicy,omitempty"` 4762 // DeviceConnectivityManagement: Covers controls for device connectivity such 4763 // as Wi-Fi, USB data access, keyboard/mouse connections, and more. 4764 DeviceConnectivityManagement *DeviceConnectivityManagement `json:"deviceConnectivityManagement,omitempty"` 4765 // DeviceOwnerLockScreenInfo: The device owner information to be shown on the 4766 // lock screen. 4767 DeviceOwnerLockScreenInfo *UserFacingMessage `json:"deviceOwnerLockScreenInfo,omitempty"` 4768 // DeviceRadioState: Covers controls for radio state such as Wi-Fi, bluetooth, 4769 // and more. 4770 DeviceRadioState *DeviceRadioState `json:"deviceRadioState,omitempty"` 4771 // EncryptionPolicy: Whether encryption is enabled 4772 // 4773 // Possible values: 4774 // "ENCRYPTION_POLICY_UNSPECIFIED" - This value is ignored, i.e. no 4775 // encryption required 4776 // "ENABLED_WITHOUT_PASSWORD" - Encryption required but no password required 4777 // to boot 4778 // "ENABLED_WITH_PASSWORD" - Encryption required with password required to 4779 // boot 4780 EncryptionPolicy string `json:"encryptionPolicy,omitempty"` 4781 // EnsureVerifyAppsEnabled: Whether app verification is force-enabled. 4782 EnsureVerifyAppsEnabled bool `json:"ensureVerifyAppsEnabled,omitempty"` 4783 // FactoryResetDisabled: Whether factory resetting from settings is disabled. 4784 FactoryResetDisabled bool `json:"factoryResetDisabled,omitempty"` 4785 // FrpAdminEmails: Email addresses of device administrators for factory reset 4786 // protection. When the device is factory reset, it will require one of these 4787 // admins to log in with the Google account email and password to unlock the 4788 // device. If no admins are specified, the device won't provide factory reset 4789 // protection. 4790 FrpAdminEmails []string `json:"frpAdminEmails,omitempty"` 4791 // FunDisabled: Whether the user is allowed to have fun. Controls whether the 4792 // Easter egg game in Settings is disabled. 4793 FunDisabled bool `json:"funDisabled,omitempty"` 4794 // InstallAppsDisabled: Whether user installation of apps is disabled. 4795 InstallAppsDisabled bool `json:"installAppsDisabled,omitempty"` 4796 // InstallUnknownSourcesAllowed: This field has no effect. 4797 InstallUnknownSourcesAllowed bool `json:"installUnknownSourcesAllowed,omitempty"` 4798 // KeyguardDisabled: If true, this disables the Lock Screen 4799 // (https://source.android.com/docs/core/display/multi_display/lock-screen) for 4800 // primary and/or secondary displays. 4801 KeyguardDisabled bool `json:"keyguardDisabled,omitempty"` 4802 // KeyguardDisabledFeatures: Disabled keyguard customizations, such as widgets. 4803 // 4804 // Possible values: 4805 // "KEYGUARD_DISABLED_FEATURE_UNSPECIFIED" - This value is ignored. 4806 // "CAMERA" - Disable the camera on secure keyguard screens (e.g. PIN). 4807 // "NOTIFICATIONS" - Disable showing all notifications on secure keyguard 4808 // screens. 4809 // "UNREDACTED_NOTIFICATIONS" - Disable unredacted notifications on secure 4810 // keyguard screens. 4811 // "TRUST_AGENTS" - Ignore trust agent state on secure keyguard screens. 4812 // "DISABLE_FINGERPRINT" - Disable fingerprint sensor on secure keyguard 4813 // screens. 4814 // "DISABLE_REMOTE_INPUT" - On devices running Android 6 and below, disables 4815 // text entry into notifications on secure keyguard screens. Has no effect on 4816 // Android 7 and above. 4817 // "FACE" - Disable face authentication on secure keyguard screens. 4818 // "IRIS" - Disable iris authentication on secure keyguard screens. 4819 // "BIOMETRICS" - Disable all biometric authentication on secure keyguard 4820 // screens. 4821 // "SHORTCUTS" - Disable all shortcuts on secure keyguard screen on Android 4822 // 14 and above. 4823 // "ALL_FEATURES" - Disable all current and future keyguard customizations. 4824 KeyguardDisabledFeatures []string `json:"keyguardDisabledFeatures,omitempty"` 4825 // KioskCustomLauncherEnabled: Whether the kiosk custom launcher is enabled. 4826 // This replaces the home screen with a launcher that locks down the device to 4827 // the apps installed via the applications setting. Apps appear on a single 4828 // page in alphabetical order. Use kioskCustomization to further configure the 4829 // kiosk device behavior. 4830 KioskCustomLauncherEnabled bool `json:"kioskCustomLauncherEnabled,omitempty"` 4831 // KioskCustomization: Settings controlling the behavior of a device in kiosk 4832 // mode. To enable kiosk mode, set kioskCustomLauncherEnabled to true or 4833 // specify an app in the policy with installType KIOSK. 4834 KioskCustomization *KioskCustomization `json:"kioskCustomization,omitempty"` 4835 // LocationMode: The degree of location detection enabled. 4836 // 4837 // Possible values: 4838 // "LOCATION_MODE_UNSPECIFIED" - Defaults to LOCATION_USER_CHOICE. 4839 // "HIGH_ACCURACY" - On Android 8 and below, all location detection methods 4840 // are enabled, including GPS, networks, and other sensors. On Android 9 and 4841 // above, this is equivalent to LOCATION_ENFORCED. 4842 // "SENSORS_ONLY" - On Android 8 and below, only GPS and other sensors are 4843 // enabled. On Android 9 and above, this is equivalent to LOCATION_ENFORCED. 4844 // "BATTERY_SAVING" - On Android 8 and below, only the network location 4845 // provider is enabled. On Android 9 and above, this is equivalent to 4846 // LOCATION_ENFORCED. 4847 // "OFF" - On Android 8 and below, location setting and accuracy are 4848 // disabled. On Android 9 and above, this is equivalent to LOCATION_DISABLED. 4849 // "LOCATION_USER_CHOICE" - Location setting is not restricted on the device. 4850 // No specific behavior is set or enforced. 4851 // "LOCATION_ENFORCED" - Enable location setting on the device. 4852 // "LOCATION_DISABLED" - Disable location setting on the device. 4853 LocationMode string `json:"locationMode,omitempty"` 4854 // LongSupportMessage: A message displayed to the user in the device 4855 // administators settings screen. 4856 LongSupportMessage *UserFacingMessage `json:"longSupportMessage,omitempty"` 4857 // MaximumTimeToLock: Maximum time in milliseconds for user activity until the 4858 // device locks. A value of 0 means there is no restriction. 4859 MaximumTimeToLock int64 `json:"maximumTimeToLock,omitempty,string"` 4860 // MicrophoneAccess: Controls the use of the microphone and whether the user 4861 // has access to the microphone access toggle. This applies only on fully 4862 // managed devices. 4863 // 4864 // Possible values: 4865 // "MICROPHONE_ACCESS_UNSPECIFIED" - If unmute_microphone_disabled is true, 4866 // this is equivalent to MICROPHONE_ACCESS_DISABLED. Otherwise, this is 4867 // equivalent to MICROPHONE_ACCESS_USER_CHOICE. 4868 // "MICROPHONE_ACCESS_USER_CHOICE" - The field unmute_microphone_disabled is 4869 // ignored. This is the default device behaviour: the microphone on the device 4870 // is available. On Android 12 and above, the user can use the microphone 4871 // access toggle. 4872 // "MICROPHONE_ACCESS_DISABLED" - The field unmute_microphone_disabled is 4873 // ignored. The microphone on the device is disabled (for fully managed 4874 // devices, this applies device-wide).The microphone access toggle has no 4875 // effect as the microphone is disabled. 4876 // "MICROPHONE_ACCESS_ENFORCED" - The field unmute_microphone_disabled is 4877 // ignored. The microphone on the device is available. On devices running 4878 // Android 12 and above, the user is unable to use the microphone access 4879 // toggle. On devices which run Android 11 or below, this is equivalent to 4880 // MICROPHONE_ACCESS_USER_CHOICE. 4881 MicrophoneAccess string `json:"microphoneAccess,omitempty"` 4882 // MinimumApiLevel: The minimum allowed Android API level. 4883 MinimumApiLevel int64 `json:"minimumApiLevel,omitempty"` 4884 // MobileNetworksConfigDisabled: Whether configuring mobile networks is 4885 // disabled. 4886 MobileNetworksConfigDisabled bool `json:"mobileNetworksConfigDisabled,omitempty"` 4887 // ModifyAccountsDisabled: Whether adding or removing accounts is disabled. 4888 ModifyAccountsDisabled bool `json:"modifyAccountsDisabled,omitempty"` 4889 // MountPhysicalMediaDisabled: Whether the user mounting physical external 4890 // media is disabled. 4891 MountPhysicalMediaDisabled bool `json:"mountPhysicalMediaDisabled,omitempty"` 4892 // Name: The name of the policy in the form 4893 // enterprises/{enterpriseId}/policies/{policyId}. 4894 Name string `json:"name,omitempty"` 4895 // NetworkEscapeHatchEnabled: Whether the network escape hatch is enabled. If a 4896 // network connection can't be made at boot time, the escape hatch prompts the 4897 // user to temporarily connect to a network in order to refresh the device 4898 // policy. After applying policy, the temporary network will be forgotten and 4899 // the device will continue booting. This prevents being unable to connect to a 4900 // network if there is no suitable network in the last policy and the device 4901 // boots into an app in lock task mode, or the user is otherwise unable to 4902 // reach device settings.Note: Setting wifiConfigDisabled to true will override 4903 // this setting under specific circumstances. Please see wifiConfigDisabled for 4904 // further details. Setting configureWifi to DISALLOW_CONFIGURING_WIFI will 4905 // override this setting under specific circumstances. Please see 4906 // DISALLOW_CONFIGURING_WIFI for further details. 4907 NetworkEscapeHatchEnabled bool `json:"networkEscapeHatchEnabled,omitempty"` 4908 // NetworkResetDisabled: Whether resetting network settings is disabled. 4909 NetworkResetDisabled bool `json:"networkResetDisabled,omitempty"` 4910 // OncCertificateProviders: This feature is not generally available. 4911 OncCertificateProviders []*OncCertificateProvider `json:"oncCertificateProviders,omitempty"` 4912 // OpenNetworkConfiguration: Network configuration for the device. See 4913 // configure networks for more information. 4914 OpenNetworkConfiguration googleapi.RawMessage `json:"openNetworkConfiguration,omitempty"` 4915 // OutgoingBeamDisabled: Whether using NFC to beam data from apps is disabled. 4916 OutgoingBeamDisabled bool `json:"outgoingBeamDisabled,omitempty"` 4917 // OutgoingCallsDisabled: Whether outgoing calls are disabled. 4918 OutgoingCallsDisabled bool `json:"outgoingCallsDisabled,omitempty"` 4919 // PasswordPolicies: Password requirement policies. Different policies can be 4920 // set for work profile or fully managed devices by setting the password_scope 4921 // field in the policy. 4922 PasswordPolicies []*PasswordRequirements `json:"passwordPolicies,omitempty"` 4923 // PasswordRequirements: Password requirements. The field 4924 // password_requirements.require_password_unlock must not be set. DEPRECATED - 4925 // Use passwordPolicies.Note:Complexity-based values of PasswordQuality, that 4926 // is, COMPLEXITY_LOW, COMPLEXITY_MEDIUM, and COMPLEXITY_HIGH, cannot be used 4927 // here. unified_lock_settings cannot be used here. 4928 PasswordRequirements *PasswordRequirements `json:"passwordRequirements,omitempty"` 4929 // PermissionGrants: Explicit permission or group grants or denials for all 4930 // apps. These values override the default_permission_policy. 4931 PermissionGrants []*PermissionGrant `json:"permissionGrants,omitempty"` 4932 // PermittedAccessibilityServices: Specifies permitted accessibility services. 4933 // If the field is not set, any accessibility service can be used. If the field 4934 // is set, only the accessibility services in this list and the system's 4935 // built-in accessibility service can be used. In particular, if the field is 4936 // set to empty, only the system's built-in accessibility servicess can be 4937 // used. This can be set on fully managed devices and on work profiles. When 4938 // applied to a work profile, this affects both the personal profile and the 4939 // work profile. 4940 PermittedAccessibilityServices *PackageNameList `json:"permittedAccessibilityServices,omitempty"` 4941 // PermittedInputMethods: If present, only the input methods provided by 4942 // packages in this list are permitted. If this field is present, but the list 4943 // is empty, then only system input methods are permitted. 4944 PermittedInputMethods *PackageNameList `json:"permittedInputMethods,omitempty"` 4945 // PersistentPreferredActivities: Default intent handler activities. 4946 PersistentPreferredActivities []*PersistentPreferredActivity `json:"persistentPreferredActivities,omitempty"` 4947 // PersonalUsagePolicies: Policies managing personal usage on a company-owned 4948 // device. 4949 PersonalUsagePolicies *PersonalUsagePolicies `json:"personalUsagePolicies,omitempty"` 4950 // PlayStoreMode: This mode controls which apps are available to the user in 4951 // the Play Store and the behavior on the device when apps are removed from the 4952 // policy. 4953 // 4954 // Possible values: 4955 // "PLAY_STORE_MODE_UNSPECIFIED" - Unspecified. Defaults to WHITELIST. 4956 // "WHITELIST" - Only apps that are in the policy are available and any app 4957 // not in the policy will be automatically uninstalled from the device. 4958 // "BLACKLIST" - All apps are available and any app that should not be on the 4959 // device should be explicitly marked as 'BLOCKED' in the applications policy. 4960 PlayStoreMode string `json:"playStoreMode,omitempty"` 4961 // PolicyEnforcementRules: Rules that define the behavior when a particular 4962 // policy can not be applied on device 4963 PolicyEnforcementRules []*PolicyEnforcementRule `json:"policyEnforcementRules,omitempty"` 4964 // PreferentialNetworkService: Controls whether preferential network service is 4965 // enabled on the work profile. For example, an organization may have an 4966 // agreement with a carrier that all of the work data from its employees' 4967 // devices will be sent via a network service dedicated for enterprise use. An 4968 // example of a supported preferential network service is the enterprise slice 4969 // on 5G networks. This has no effect on fully managed devices. 4970 // 4971 // Possible values: 4972 // "PREFERENTIAL_NETWORK_SERVICE_UNSPECIFIED" - Unspecified. Defaults to 4973 // PREFERENTIAL_NETWORK_SERVICES_DISABLED. 4974 // "PREFERENTIAL_NETWORK_SERVICE_DISABLED" - Preferential network service is 4975 // disabled on the work profile. 4976 // "PREFERENTIAL_NETWORK_SERVICE_ENABLED" - Preferential network service is 4977 // enabled on the work profile. 4978 PreferentialNetworkService string `json:"preferentialNetworkService,omitempty"` 4979 // PrintingPolicy: Optional. Controls whether printing is allowed. This is 4980 // supported on devices running Android 9 and above. . 4981 // 4982 // Possible values: 4983 // "PRINTING_POLICY_UNSPECIFIED" - Unspecified. Defaults to PRINTING_ALLOWED. 4984 // "PRINTING_DISALLOWED" - Printing is disallowed. A nonComplianceDetail with 4985 // API_LEVEL is reported if the Android version is less than 9. 4986 // "PRINTING_ALLOWED" - Printing is allowed. 4987 PrintingPolicy string `json:"printingPolicy,omitempty"` 4988 // PrivateKeySelectionEnabled: Allows showing UI on a device for a user to 4989 // choose a private key alias if there are no matching rules in 4990 // ChoosePrivateKeyRules. For devices below Android P, setting this may leave 4991 // enterprise keys vulnerable. This value will have no effect if any 4992 // application has CERT_SELECTION delegation scope. 4993 PrivateKeySelectionEnabled bool `json:"privateKeySelectionEnabled,omitempty"` 4994 // RecommendedGlobalProxy: The network-independent global HTTP proxy. Typically 4995 // proxies should be configured per-network in open_network_configuration. 4996 // However for unusual configurations like general internal filtering a global 4997 // HTTP proxy may be useful. If the proxy is not accessible, network access may 4998 // break. The global proxy is only a recommendation and some apps may ignore 4999 // it. 5000 RecommendedGlobalProxy *ProxyInfo `json:"recommendedGlobalProxy,omitempty"` 5001 // RemoveUserDisabled: Whether removing other users is disabled. 5002 RemoveUserDisabled bool `json:"removeUserDisabled,omitempty"` 5003 // SafeBootDisabled: Whether rebooting the device into safe boot is disabled. 5004 SafeBootDisabled bool `json:"safeBootDisabled,omitempty"` 5005 // ScreenCaptureDisabled: Whether screen capture is disabled. 5006 ScreenCaptureDisabled bool `json:"screenCaptureDisabled,omitempty"` 5007 // SetUserIconDisabled: Whether changing the user icon is disabled. 5008 SetUserIconDisabled bool `json:"setUserIconDisabled,omitempty"` 5009 // SetWallpaperDisabled: Whether changing the wallpaper is disabled. 5010 SetWallpaperDisabled bool `json:"setWallpaperDisabled,omitempty"` 5011 // SetupActions: Action to take during the setup process. At most one action 5012 // may be specified. 5013 SetupActions []*SetupAction `json:"setupActions,omitempty"` 5014 // ShareLocationDisabled: Whether location sharing is disabled. 5015 // share_location_disabled is supported for both fully managed devices and 5016 // personally owned work profiles. 5017 ShareLocationDisabled bool `json:"shareLocationDisabled,omitempty"` 5018 // ShortSupportMessage: A message displayed to the user in the settings screen 5019 // wherever functionality has been disabled by the admin. If the message is 5020 // longer than 200 characters it may be truncated. 5021 ShortSupportMessage *UserFacingMessage `json:"shortSupportMessage,omitempty"` 5022 // SkipFirstUseHintsEnabled: Flag to skip hints on the first use. Enterprise 5023 // admin can enable the system recommendation for apps to skip their user 5024 // tutorial and other introductory hints on first start-up. 5025 SkipFirstUseHintsEnabled bool `json:"skipFirstUseHintsEnabled,omitempty"` 5026 // SmsDisabled: Whether sending and receiving SMS messages is disabled. 5027 SmsDisabled bool `json:"smsDisabled,omitempty"` 5028 // StatusBarDisabled: Whether the status bar is disabled. This disables 5029 // notifications, quick settings, and other screen overlays that allow escape 5030 // from full-screen mode. DEPRECATED. To disable the status bar on a kiosk 5031 // device, use InstallType KIOSK or kioskCustomLauncherEnabled. 5032 StatusBarDisabled bool `json:"statusBarDisabled,omitempty"` 5033 // StatusReportingSettings: Status reporting settings 5034 StatusReportingSettings *StatusReportingSettings `json:"statusReportingSettings,omitempty"` 5035 // StayOnPluggedModes: The battery plugged in modes for which the device stays 5036 // on. When using this setting, it is recommended to clear maximum_time_to_lock 5037 // so that the device doesn't lock itself while it stays on. 5038 // 5039 // Possible values: 5040 // "BATTERY_PLUGGED_MODE_UNSPECIFIED" - This value is ignored. 5041 // "AC" - Power source is an AC charger. 5042 // "USB" - Power source is a USB port. 5043 // "WIRELESS" - Power source is wireless. 5044 StayOnPluggedModes []string `json:"stayOnPluggedModes,omitempty"` 5045 // SystemUpdate: The system update policy, which controls how OS updates are 5046 // applied. If the update type is WINDOWED, the update window will 5047 // automatically apply to Play app updates as well.Note: Google Play system 5048 // updates (https://source.android.com/docs/core/ota/modular-system) (also 5049 // called Mainline updates) are automatically downloaded and require a device 5050 // reboot to be installed. Refer to the mainline section in Manage system 5051 // updates (https://developer.android.com/work/dpc/system-updates#mainline) for 5052 // further details. 5053 SystemUpdate *SystemUpdate `json:"systemUpdate,omitempty"` 5054 // TetheringConfigDisabled: Whether configuring tethering and portable hotspots 5055 // is disabled. If tetheringSettings is set to anything other than 5056 // TETHERING_SETTINGS_UNSPECIFIED, this setting is ignored. 5057 TetheringConfigDisabled bool `json:"tetheringConfigDisabled,omitempty"` 5058 // UninstallAppsDisabled: Whether user uninstallation of applications is 5059 // disabled. This prevents apps from being uninstalled, even those removed 5060 // using applications 5061 UninstallAppsDisabled bool `json:"uninstallAppsDisabled,omitempty"` 5062 // UnmuteMicrophoneDisabled: If microphone_access is set to any value other 5063 // than MICROPHONE_ACCESS_UNSPECIFIED, this has no effect. Otherwise this field 5064 // controls whether microphones are disabled: If true, all microphones are 5065 // disabled, otherwise they are available. This is available only on fully 5066 // managed devices. 5067 UnmuteMicrophoneDisabled bool `json:"unmuteMicrophoneDisabled,omitempty"` 5068 // UsageLog: Configuration of device activity logging. 5069 UsageLog *UsageLog `json:"usageLog,omitempty"` 5070 // UsbFileTransferDisabled: Whether transferring files over USB is disabled. 5071 // This is supported only on company-owned devices. 5072 UsbFileTransferDisabled bool `json:"usbFileTransferDisabled,omitempty"` 5073 // UsbMassStorageEnabled: Whether USB storage is enabled. Deprecated. 5074 UsbMassStorageEnabled bool `json:"usbMassStorageEnabled,omitempty"` 5075 // Version: The version of the policy. This is a read-only field. The version 5076 // is incremented each time the policy is updated. 5077 Version int64 `json:"version,omitempty,string"` 5078 // VpnConfigDisabled: Whether configuring VPN is disabled. 5079 VpnConfigDisabled bool `json:"vpnConfigDisabled,omitempty"` 5080 // WifiConfigDisabled: Whether configuring Wi-Fi networks is disabled. 5081 // Supported on fully managed devices and work profiles on company-owned 5082 // devices. For fully managed devices, setting this to true removes all 5083 // configured networks and retains only the networks configured using 5084 // openNetworkConfiguration. For work profiles on company-owned devices, 5085 // existing configured networks are not affected and the user is not allowed to 5086 // add, remove, or modify Wi-Fi networks. If configureWifi is set to anything 5087 // other than CONFIGURE_WIFI_UNSPECIFIED, this setting is ignored. Note: If a 5088 // network connection can't be made at boot time and configuring Wi-Fi is 5089 // disabled then network escape hatch will be shown in order to refresh the 5090 // device policy (see networkEscapeHatchEnabled). 5091 WifiConfigDisabled bool `json:"wifiConfigDisabled,omitempty"` 5092 // WifiConfigsLockdownEnabled: DEPRECATED - Use wifi_config_disabled. 5093 WifiConfigsLockdownEnabled bool `json:"wifiConfigsLockdownEnabled,omitempty"` 5094 5095 // ServerResponse contains the HTTP response code and headers from the server. 5096 googleapi.ServerResponse `json:"-"` 5097 // ForceSendFields is a list of field names (e.g. 5098 // "AccountTypesWithManagementDisabled") to unconditionally include in API 5099 // requests. By default, fields with empty or default values are omitted from 5100 // API requests. See 5101 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5102 // details. 5103 ForceSendFields []string `json:"-"` 5104 // NullFields is a list of field names (e.g. 5105 // "AccountTypesWithManagementDisabled") to include in API requests with the 5106 // JSON null value. By default, fields with empty values are omitted from API 5107 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for 5108 // more details. 5109 NullFields []string `json:"-"` 5110 } 5111 5112 func (s *Policy) MarshalJSON() ([]byte, error) { 5113 type NoMethod Policy 5114 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5115 } 5116 5117 // PolicyEnforcementRule: A rule that defines the actions to take if a device 5118 // or work profile is not compliant with the policy specified in settingName. 5119 // In the case of multiple matching or multiple triggered enforcement rules, a 5120 // merge will occur with the most severe action being taken. However, all 5121 // triggered rules are still kept track of: this includes initial trigger time 5122 // and all associated non-compliance details. In the situation where the most 5123 // severe enforcement rule is satisfied, the next most appropriate action is 5124 // applied. 5125 type PolicyEnforcementRule struct { 5126 // BlockAction: An action to block access to apps and data on a company owned 5127 // device or in a work profile. This action also triggers a user-facing 5128 // notification with information (where possible) on how to correct the 5129 // compliance issue. Note: wipeAction must also be specified. 5130 BlockAction *BlockAction `json:"blockAction,omitempty"` 5131 // SettingName: The top-level policy to enforce. For example, applications or 5132 // passwordPolicies. 5133 SettingName string `json:"settingName,omitempty"` 5134 // WipeAction: An action to reset a company owned device or delete a work 5135 // profile. Note: blockAction must also be specified. 5136 WipeAction *WipeAction `json:"wipeAction,omitempty"` 5137 // ForceSendFields is a list of field names (e.g. "BlockAction") to 5138 // unconditionally include in API requests. By default, fields with empty or 5139 // default values are omitted from API requests. See 5140 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5141 // details. 5142 ForceSendFields []string `json:"-"` 5143 // NullFields is a list of field names (e.g. "BlockAction") to include in API 5144 // requests with the JSON null value. By default, fields with empty values are 5145 // omitted from API requests. See 5146 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5147 NullFields []string `json:"-"` 5148 } 5149 5150 func (s *PolicyEnforcementRule) MarshalJSON() ([]byte, error) { 5151 type NoMethod PolicyEnforcementRule 5152 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5153 } 5154 5155 // PostureDetail: Additional details regarding the security posture of the 5156 // device. 5157 type PostureDetail struct { 5158 // Advice: Corresponding admin-facing advice to mitigate this security risk and 5159 // improve the security posture of the device. 5160 Advice []*UserFacingMessage `json:"advice,omitempty"` 5161 // SecurityRisk: A specific security risk that negatively affects the security 5162 // posture of the device. 5163 // 5164 // Possible values: 5165 // "SECURITY_RISK_UNSPECIFIED" - Unspecified. 5166 // "UNKNOWN_OS" - Play Integrity API detects that the device is running an 5167 // unknown OS (basicIntegrity check succeeds but ctsProfileMatch fails). 5168 // "COMPROMISED_OS" - Play Integrity API detects that the device is running a 5169 // compromised OS (basicIntegrity check fails). 5170 // "HARDWARE_BACKED_EVALUATION_FAILED" - Play Integrity API detects that the 5171 // device does not have a strong guarantee of system integrity, if the 5172 // MEETS_STRONG_INTEGRITY label doesn't show in the device integrity field 5173 // (https://developer.android.com/google/play/integrity/verdicts#device-integrity-field). 5174 SecurityRisk string `json:"securityRisk,omitempty"` 5175 // ForceSendFields is a list of field names (e.g. "Advice") to unconditionally 5176 // include in API requests. By default, fields with empty or default values are 5177 // omitted from API requests. See 5178 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5179 // details. 5180 ForceSendFields []string `json:"-"` 5181 // NullFields is a list of field names (e.g. "Advice") to include in API 5182 // requests with the JSON null value. By default, fields with empty values are 5183 // omitted from API requests. See 5184 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5185 NullFields []string `json:"-"` 5186 } 5187 5188 func (s *PostureDetail) MarshalJSON() ([]byte, error) { 5189 type NoMethod PostureDetail 5190 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5191 } 5192 5193 // PowerManagementEvent: A power management event. 5194 type PowerManagementEvent struct { 5195 // BatteryLevel: For BATTERY_LEVEL_COLLECTED events, the battery level as a 5196 // percentage. 5197 BatteryLevel float64 `json:"batteryLevel,omitempty"` 5198 // CreateTime: The creation time of the event. 5199 CreateTime string `json:"createTime,omitempty"` 5200 // EventType: Event type. 5201 // 5202 // Possible values: 5203 // "POWER_MANAGEMENT_EVENT_TYPE_UNSPECIFIED" - Unspecified. No events have 5204 // this type. 5205 // "BATTERY_LEVEL_COLLECTED" - Battery level was measured. 5206 // "POWER_CONNECTED" - The device started charging. 5207 // "POWER_DISCONNECTED" - The device stopped charging. 5208 // "BATTERY_LOW" - The device entered low-power mode. 5209 // "BATTERY_OKAY" - The device exited low-power mode. 5210 // "BOOT_COMPLETED" - The device booted. 5211 // "SHUTDOWN" - The device shut down. 5212 EventType string `json:"eventType,omitempty"` 5213 // ForceSendFields is a list of field names (e.g. "BatteryLevel") to 5214 // unconditionally include in API requests. By default, fields with empty or 5215 // default values are omitted from API requests. See 5216 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5217 // details. 5218 ForceSendFields []string `json:"-"` 5219 // NullFields is a list of field names (e.g. "BatteryLevel") to include in API 5220 // requests with the JSON null value. By default, fields with empty values are 5221 // omitted from API requests. See 5222 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5223 NullFields []string `json:"-"` 5224 } 5225 5226 func (s *PowerManagementEvent) MarshalJSON() ([]byte, error) { 5227 type NoMethod PowerManagementEvent 5228 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5229 } 5230 5231 func (s *PowerManagementEvent) UnmarshalJSON(data []byte) error { 5232 type NoMethod PowerManagementEvent 5233 var s1 struct { 5234 BatteryLevel gensupport.JSONFloat64 `json:"batteryLevel"` 5235 *NoMethod 5236 } 5237 s1.NoMethod = (*NoMethod)(s) 5238 if err := json.Unmarshal(data, &s1); err != nil { 5239 return err 5240 } 5241 s.BatteryLevel = float64(s1.BatteryLevel) 5242 return nil 5243 } 5244 5245 // ProvisioningInfo: Information about a device that is available during setup. 5246 type ProvisioningInfo struct { 5247 // ApiLevel: The API level of the Android platform version running on the 5248 // device. 5249 ApiLevel int64 `json:"apiLevel,omitempty"` 5250 // Brand: The brand of the device. For example, Google. 5251 Brand string `json:"brand,omitempty"` 5252 // Enterprise: The name of the enterprise in the form enterprises/{enterprise}. 5253 Enterprise string `json:"enterprise,omitempty"` 5254 // Imei: IMEI number of the GSM device. For example, A1000031212. 5255 Imei string `json:"imei,omitempty"` 5256 // ManagementMode: The management mode of the device or profile. 5257 // 5258 // Possible values: 5259 // "MANAGEMENT_MODE_UNSPECIFIED" - This value is disallowed. 5260 // "DEVICE_OWNER" - Device owner. Android Device Policy has full control over 5261 // the device. 5262 // "PROFILE_OWNER" - Profile owner. Android Device Policy has control over a 5263 // managed profile on the device. 5264 ManagementMode string `json:"managementMode,omitempty"` 5265 // Meid: MEID number of the CDMA device. For example, A00000292788E1. 5266 Meid string `json:"meid,omitempty"` 5267 // Model: The model of the device. For example, Asus Nexus 7. 5268 Model string `json:"model,omitempty"` 5269 // Name: The name of this resource in the form 5270 // provisioningInfo/{provisioning_info}. 5271 Name string `json:"name,omitempty"` 5272 // Ownership: Ownership of the managed device. 5273 // 5274 // Possible values: 5275 // "OWNERSHIP_UNSPECIFIED" - Ownership is unspecified. 5276 // "COMPANY_OWNED" - Device is company-owned. 5277 // "PERSONALLY_OWNED" - Device is personally-owned. 5278 Ownership string `json:"ownership,omitempty"` 5279 // SerialNumber: The device serial number. 5280 SerialNumber string `json:"serialNumber,omitempty"` 5281 5282 // ServerResponse contains the HTTP response code and headers from the server. 5283 googleapi.ServerResponse `json:"-"` 5284 // ForceSendFields is a list of field names (e.g. "ApiLevel") to 5285 // unconditionally include in API requests. By default, fields with empty or 5286 // default values are omitted from API requests. See 5287 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5288 // details. 5289 ForceSendFields []string `json:"-"` 5290 // NullFields is a list of field names (e.g. "ApiLevel") to include in API 5291 // requests with the JSON null value. By default, fields with empty values are 5292 // omitted from API requests. See 5293 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5294 NullFields []string `json:"-"` 5295 } 5296 5297 func (s *ProvisioningInfo) MarshalJSON() ([]byte, error) { 5298 type NoMethod ProvisioningInfo 5299 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5300 } 5301 5302 // ProxyInfo: Configuration info for an HTTP proxy. For a direct proxy, set the 5303 // host, port, and excluded_hosts fields. For a PAC script proxy, set the 5304 // pac_uri field. 5305 type ProxyInfo struct { 5306 // ExcludedHosts: For a direct proxy, the hosts for which the proxy is 5307 // bypassed. The host names may contain wildcards such as *.example.com. 5308 ExcludedHosts []string `json:"excludedHosts,omitempty"` 5309 // Host: The host of the direct proxy. 5310 Host string `json:"host,omitempty"` 5311 // PacUri: The URI of the PAC script used to configure the proxy. 5312 PacUri string `json:"pacUri,omitempty"` 5313 // Port: The port of the direct proxy. 5314 Port int64 `json:"port,omitempty"` 5315 // ForceSendFields is a list of field names (e.g. "ExcludedHosts") to 5316 // unconditionally include in API requests. By default, fields with empty or 5317 // default values are omitted from API requests. See 5318 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5319 // details. 5320 ForceSendFields []string `json:"-"` 5321 // NullFields is a list of field names (e.g. "ExcludedHosts") to include in API 5322 // requests with the JSON null value. By default, fields with empty values are 5323 // omitted from API requests. See 5324 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5325 NullFields []string `json:"-"` 5326 } 5327 5328 func (s *ProxyInfo) MarshalJSON() ([]byte, error) { 5329 type NoMethod ProxyInfo 5330 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5331 } 5332 5333 // RemoteLockEvent: The device or profile has been remotely locked via the LOCK 5334 // command. 5335 type RemoteLockEvent struct { 5336 // AdminPackageName: Package name of the admin app requesting the change. 5337 AdminPackageName string `json:"adminPackageName,omitempty"` 5338 // AdminUserId: User ID of the admin app from the which the change was 5339 // requested. 5340 AdminUserId int64 `json:"adminUserId,omitempty"` 5341 // TargetUserId: User ID in which the change was requested in. 5342 TargetUserId int64 `json:"targetUserId,omitempty"` 5343 // ForceSendFields is a list of field names (e.g. "AdminPackageName") to 5344 // unconditionally include in API requests. By default, fields with empty or 5345 // default values are omitted from API requests. See 5346 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5347 // details. 5348 ForceSendFields []string `json:"-"` 5349 // NullFields is a list of field names (e.g. "AdminPackageName") to include in 5350 // API requests with the JSON null value. By default, fields with empty values 5351 // are omitted from API requests. See 5352 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5353 NullFields []string `json:"-"` 5354 } 5355 5356 func (s *RemoteLockEvent) MarshalJSON() ([]byte, error) { 5357 type NoMethod RemoteLockEvent 5358 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5359 } 5360 5361 // SecurityPosture: The security posture of the device, as determined by the 5362 // current device state and the policies applied. 5363 type SecurityPosture struct { 5364 // DevicePosture: Device's security posture value. 5365 // 5366 // Possible values: 5367 // "POSTURE_UNSPECIFIED" - Unspecified. There is no posture detail for this 5368 // posture value. 5369 // "SECURE" - This device is secure. 5370 // "AT_RISK" - This device may be more vulnerable to malicious actors than is 5371 // recommended for use with corporate data. 5372 // "POTENTIALLY_COMPROMISED" - This device may be compromised and corporate 5373 // data may be accessible to unauthorized actors. 5374 DevicePosture string `json:"devicePosture,omitempty"` 5375 // PostureDetails: Additional details regarding the security posture of the 5376 // device. 5377 PostureDetails []*PostureDetail `json:"postureDetails,omitempty"` 5378 // ForceSendFields is a list of field names (e.g. "DevicePosture") to 5379 // unconditionally include in API requests. By default, fields with empty or 5380 // default values are omitted from API requests. See 5381 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5382 // details. 5383 ForceSendFields []string `json:"-"` 5384 // NullFields is a list of field names (e.g. "DevicePosture") to include in API 5385 // requests with the JSON null value. By default, fields with empty values are 5386 // omitted from API requests. See 5387 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5388 NullFields []string `json:"-"` 5389 } 5390 5391 func (s *SecurityPosture) MarshalJSON() ([]byte, error) { 5392 type NoMethod SecurityPosture 5393 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5394 } 5395 5396 // SetupAction: An action executed during setup. 5397 type SetupAction struct { 5398 // Description: Description of this action. 5399 Description *UserFacingMessage `json:"description,omitempty"` 5400 // LaunchApp: An action to launch an app. The app will be launched with an 5401 // intent containing an extra with key 5402 // com.google.android.apps.work.clouddpc.EXTRA_LAUNCHED_AS_SETUP_ACTION set to 5403 // the boolean value true to indicate that this is a setup action flow. If 5404 // SetupAction references an app, the corresponding installType in the 5405 // application policy must be set as REQUIRED_FOR_SETUP or said setup will 5406 // fail. 5407 LaunchApp *LaunchAppAction `json:"launchApp,omitempty"` 5408 // Title: Title of this action. 5409 Title *UserFacingMessage `json:"title,omitempty"` 5410 // ForceSendFields is a list of field names (e.g. "Description") to 5411 // unconditionally include in API requests. By default, fields with empty or 5412 // default values are omitted from API requests. See 5413 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5414 // details. 5415 ForceSendFields []string `json:"-"` 5416 // NullFields is a list of field names (e.g. "Description") to include in API 5417 // requests with the JSON null value. By default, fields with empty values are 5418 // omitted from API requests. See 5419 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5420 NullFields []string `json:"-"` 5421 } 5422 5423 func (s *SetupAction) MarshalJSON() ([]byte, error) { 5424 type NoMethod SetupAction 5425 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5426 } 5427 5428 // SigninDetail: A resource containing sign in details for an enterprise. Use 5429 // enterprises to manage SigninDetails for a given enterprise.For an 5430 // enterprise, we can have any number of SigninDetails that is uniquely 5431 // identified by combination of the following three fields (signin_url, 5432 // allow_personal_usage, token_tag). One cannot create two SigninDetails with 5433 // the same (signin_url, allow_personal_usage, token_tag). (token_tag is an 5434 // optional field).Patch: The operation updates the current list of 5435 // SigninDetails with the new list of SigninDetails. If the stored SigninDetail 5436 // configuration is passed, it returns the same signin_enrollment_token and 5437 // qr_code. If we pass multiple identical SigninDetail configurations that are 5438 // not stored, it will store the first one amongst those SigninDetail 5439 // configurations. if the configuration already exists we cannot request it 5440 // more than once in a particular patch API call, otherwise it will give a 5441 // duplicate key error and the whole operation will fail. If we remove certain 5442 // SigninDetail configuration from the request then it will get removed from 5443 // the storage. We can then request another signin_enrollment_token and qr_code 5444 // for the same SigninDetail configuration. 5445 type SigninDetail struct { 5446 // AllowPersonalUsage: Controls whether personal usage is allowed on a device 5447 // provisioned with this enrollment token.For company-owned devices: Enabling 5448 // personal usage allows the user to set up a work profile on the device. 5449 // Disabling personal usage requires the user provision the device as a fully 5450 // managed device.For personally-owned devices: Enabling personal usage allows 5451 // the user to set up a work profile on the device. Disabling personal usage 5452 // will prevent the device from provisioning. Personal usage cannot be disabled 5453 // on personally-owned device. 5454 // 5455 // Possible values: 5456 // "ALLOW_PERSONAL_USAGE_UNSPECIFIED" - Personal usage restriction is not 5457 // specified 5458 // "PERSONAL_USAGE_ALLOWED" - Personal usage is allowed 5459 // "PERSONAL_USAGE_DISALLOWED" - Personal usage is disallowed 5460 AllowPersonalUsage string `json:"allowPersonalUsage,omitempty"` 5461 // QrCode: A JSON string whose UTF-8 representation can be used to generate a 5462 // QR code to enroll a device with this enrollment token. To enroll a device 5463 // using NFC, the NFC record must contain a serialized java.util.Properties 5464 // representation of the properties in the JSON. This is a read-only field 5465 // generated by the server. 5466 QrCode string `json:"qrCode,omitempty"` 5467 // SigninEnrollmentToken: An enterprise wide enrollment token used to trigger 5468 // custom sign-in flow. This is a read-only field generated by the server. 5469 SigninEnrollmentToken string `json:"signinEnrollmentToken,omitempty"` 5470 // SigninUrl: Sign-in URL for authentication when device is provisioned with a 5471 // sign-in enrollment token. The sign-in endpoint should finish authentication 5472 // flow with a URL in the form of 5473 // https://enterprise.google.com/android/enroll?et= for a successful login, or 5474 // https://enterprise.google.com/android/enroll/invalid for a failed login. 5475 SigninUrl string `json:"signinUrl,omitempty"` 5476 // TokenTag: An EMM-specified metadata to distinguish between instances of 5477 // SigninDetail. 5478 TokenTag string `json:"tokenTag,omitempty"` 5479 // ForceSendFields is a list of field names (e.g. "AllowPersonalUsage") to 5480 // unconditionally include in API requests. By default, fields with empty or 5481 // default values are omitted from API requests. See 5482 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5483 // details. 5484 ForceSendFields []string `json:"-"` 5485 // NullFields is a list of field names (e.g. "AllowPersonalUsage") to include 5486 // in API requests with the JSON null value. By default, fields with empty 5487 // values are omitted from API requests. See 5488 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5489 NullFields []string `json:"-"` 5490 } 5491 5492 func (s *SigninDetail) MarshalJSON() ([]byte, error) { 5493 type NoMethod SigninDetail 5494 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5495 } 5496 5497 // SignupUrl: An enterprise signup URL. 5498 type SignupUrl struct { 5499 // Name: The name of the resource. Use this value in the signupUrl field when 5500 // calling enterprises.create to complete the enterprise signup flow. 5501 Name string `json:"name,omitempty"` 5502 // Url: A URL where an enterprise admin can register their enterprise. The page 5503 // can't be rendered in an iframe. 5504 Url string `json:"url,omitempty"` 5505 5506 // ServerResponse contains the HTTP response code and headers from the server. 5507 googleapi.ServerResponse `json:"-"` 5508 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 5509 // include in API requests. By default, fields with empty or default values are 5510 // omitted from API requests. See 5511 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5512 // details. 5513 ForceSendFields []string `json:"-"` 5514 // NullFields is a list of field names (e.g. "Name") to include in API requests 5515 // with the JSON null value. By default, fields with empty values are omitted 5516 // from API requests. See 5517 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5518 NullFields []string `json:"-"` 5519 } 5520 5521 func (s *SignupUrl) MarshalJSON() ([]byte, error) { 5522 type NoMethod SignupUrl 5523 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5524 } 5525 5526 // SoftwareInfo: Information about device software. 5527 type SoftwareInfo struct { 5528 // AndroidBuildNumber: Android build ID string meant for displaying to the 5529 // user. For example, shamu-userdebug 6.0.1 MOB30I 2756745 dev-keys. 5530 AndroidBuildNumber string `json:"androidBuildNumber,omitempty"` 5531 // AndroidBuildTime: Build time. 5532 AndroidBuildTime string `json:"androidBuildTime,omitempty"` 5533 // AndroidDevicePolicyVersionCode: The Android Device Policy app version code. 5534 AndroidDevicePolicyVersionCode int64 `json:"androidDevicePolicyVersionCode,omitempty"` 5535 // AndroidDevicePolicyVersionName: The Android Device Policy app version as 5536 // displayed to the user. 5537 AndroidDevicePolicyVersionName string `json:"androidDevicePolicyVersionName,omitempty"` 5538 // AndroidVersion: The user-visible Android version string. For example, 6.0.1. 5539 AndroidVersion string `json:"androidVersion,omitempty"` 5540 // BootloaderVersion: The system bootloader version number, e.g. 0.6.7. 5541 BootloaderVersion string `json:"bootloaderVersion,omitempty"` 5542 // DeviceBuildSignature: SHA-256 hash of android.content.pm.Signature 5543 // (https://developer.android.com/reference/android/content/pm/Signature.html) 5544 // associated with the system package, which can be used to verify that the 5545 // system build hasn't been modified. 5546 DeviceBuildSignature string `json:"deviceBuildSignature,omitempty"` 5547 // DeviceKernelVersion: Kernel version, for example, 2.6.32.9-g103d848. 5548 DeviceKernelVersion string `json:"deviceKernelVersion,omitempty"` 5549 // PrimaryLanguageCode: An IETF BCP 47 language code for the primary locale on 5550 // the device. 5551 PrimaryLanguageCode string `json:"primaryLanguageCode,omitempty"` 5552 // SecurityPatchLevel: Security patch level, e.g. 2016-05-01. 5553 SecurityPatchLevel string `json:"securityPatchLevel,omitempty"` 5554 // SystemUpdateInfo: Information about a potential pending system update. 5555 SystemUpdateInfo *SystemUpdateInfo `json:"systemUpdateInfo,omitempty"` 5556 // ForceSendFields is a list of field names (e.g. "AndroidBuildNumber") to 5557 // unconditionally include in API requests. By default, fields with empty or 5558 // default values are omitted from API requests. See 5559 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5560 // details. 5561 ForceSendFields []string `json:"-"` 5562 // NullFields is a list of field names (e.g. "AndroidBuildNumber") to include 5563 // in API requests with the JSON null value. By default, fields with empty 5564 // values are omitted from API requests. See 5565 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5566 NullFields []string `json:"-"` 5567 } 5568 5569 func (s *SoftwareInfo) MarshalJSON() ([]byte, error) { 5570 type NoMethod SoftwareInfo 5571 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5572 } 5573 5574 // SpecificNonComplianceContext: Additional context for 5575 // SpecificNonComplianceReason. 5576 type SpecificNonComplianceContext struct { 5577 // OncWifiContext: Additional context for non-compliance related to Wi-Fi 5578 // configuration. See ONC_WIFI_INVALID_VALUE and ONC_WIFI_API_LEVEL 5579 OncWifiContext *OncWifiContext `json:"oncWifiContext,omitempty"` 5580 // PasswordPoliciesContext: Additional context for non-compliance related to 5581 // password policies. See PASSWORD_POLICIES_PASSWORD_EXPIRED and 5582 // PASSWORD_POLICIES_PASSWORD_NOT_SUFFICIENT. 5583 PasswordPoliciesContext *PasswordPoliciesContext `json:"passwordPoliciesContext,omitempty"` 5584 // ForceSendFields is a list of field names (e.g. "OncWifiContext") to 5585 // unconditionally include in API requests. By default, fields with empty or 5586 // default values are omitted from API requests. See 5587 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5588 // details. 5589 ForceSendFields []string `json:"-"` 5590 // NullFields is a list of field names (e.g. "OncWifiContext") to include in 5591 // API requests with the JSON null value. By default, fields with empty values 5592 // are omitted from API requests. See 5593 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5594 NullFields []string `json:"-"` 5595 } 5596 5597 func (s *SpecificNonComplianceContext) MarshalJSON() ([]byte, error) { 5598 type NoMethod SpecificNonComplianceContext 5599 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5600 } 5601 5602 // StartLostModeParams: Parameters associated with the START_LOST_MODE command 5603 // to put the device into lost mode. At least one of the parameters, not 5604 // including the organization name, must be provided in order for the device to 5605 // be put into lost mode. 5606 type StartLostModeParams struct { 5607 // LostEmailAddress: The email address displayed to the user when the device is 5608 // in lost mode. 5609 LostEmailAddress string `json:"lostEmailAddress,omitempty"` 5610 // LostMessage: The message displayed to the user when the device is in lost 5611 // mode. 5612 LostMessage *UserFacingMessage `json:"lostMessage,omitempty"` 5613 // LostOrganization: The organization name displayed to the user when the 5614 // device is in lost mode. 5615 LostOrganization *UserFacingMessage `json:"lostOrganization,omitempty"` 5616 // LostPhoneNumber: The phone number that will be called when the device is in 5617 // lost mode and the call owner button is tapped. 5618 LostPhoneNumber *UserFacingMessage `json:"lostPhoneNumber,omitempty"` 5619 // LostStreetAddress: The street address displayed to the user when the device 5620 // is in lost mode. 5621 LostStreetAddress *UserFacingMessage `json:"lostStreetAddress,omitempty"` 5622 // ForceSendFields is a list of field names (e.g. "LostEmailAddress") to 5623 // unconditionally include in API requests. By default, fields with empty or 5624 // default values are omitted from API requests. See 5625 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5626 // details. 5627 ForceSendFields []string `json:"-"` 5628 // NullFields is a list of field names (e.g. "LostEmailAddress") to include in 5629 // API requests with the JSON null value. By default, fields with empty values 5630 // are omitted from API requests. See 5631 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5632 NullFields []string `json:"-"` 5633 } 5634 5635 func (s *StartLostModeParams) MarshalJSON() ([]byte, error) { 5636 type NoMethod StartLostModeParams 5637 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5638 } 5639 5640 // StartLostModeStatus: Status of the START_LOST_MODE command to put the device 5641 // into lost mode. 5642 type StartLostModeStatus struct { 5643 // Status: The status. See StartLostModeStatus. 5644 // 5645 // Possible values: 5646 // "STATUS_UNSPECIFIED" - Unspecified. This value is not used. 5647 // "SUCCESS" - The device was put into lost mode. 5648 // "RESET_PASSWORD_RECENTLY" - The device could not be put into lost mode 5649 // because the admin reset the device's password recently. 5650 // "USER_EXIT_LOST_MODE_RECENTLY" - The device could not be put into lost 5651 // mode because the user exited lost mode recently. 5652 // "ALREADY_IN_LOST_MODE" - The device is already in lost mode. 5653 Status string `json:"status,omitempty"` 5654 // ForceSendFields is a list of field names (e.g. "Status") to unconditionally 5655 // include in API requests. By default, fields with empty or default values are 5656 // omitted from API requests. See 5657 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5658 // details. 5659 ForceSendFields []string `json:"-"` 5660 // NullFields is a list of field names (e.g. "Status") to include in API 5661 // requests with the JSON null value. By default, fields with empty values are 5662 // omitted from API requests. See 5663 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5664 NullFields []string `json:"-"` 5665 } 5666 5667 func (s *StartLostModeStatus) MarshalJSON() ([]byte, error) { 5668 type NoMethod StartLostModeStatus 5669 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5670 } 5671 5672 // Status: The Status type defines a logical error model that is suitable for 5673 // different programming environments, including REST APIs and RPC APIs. It is 5674 // used by gRPC (https://github.com/grpc). Each Status message contains three 5675 // pieces of data: error code, error message, and error details.You can find 5676 // out more about this error model and how to work with it in the API Design 5677 // Guide (https://cloud.google.com/apis/design/errors). 5678 type Status struct { 5679 // Code: The status code, which should be an enum value of google.rpc.Code. 5680 Code int64 `json:"code,omitempty"` 5681 // Details: A list of messages that carry the error details. There is a common 5682 // set of message types for APIs to use. 5683 Details []googleapi.RawMessage `json:"details,omitempty"` 5684 // Message: A developer-facing error message, which should be in English. Any 5685 // user-facing error message should be localized and sent in the 5686 // google.rpc.Status.details field, or localized by the client. 5687 Message string `json:"message,omitempty"` 5688 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 5689 // include in API requests. By default, fields with empty or default values are 5690 // omitted from API requests. See 5691 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5692 // details. 5693 ForceSendFields []string `json:"-"` 5694 // NullFields is a list of field names (e.g. "Code") to include in API requests 5695 // with the JSON null value. By default, fields with empty values are omitted 5696 // from API requests. See 5697 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5698 NullFields []string `json:"-"` 5699 } 5700 5701 func (s *Status) MarshalJSON() ([]byte, error) { 5702 type NoMethod Status 5703 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5704 } 5705 5706 // StatusReportingSettings: Settings controlling the behavior of status 5707 // reports. 5708 type StatusReportingSettings struct { 5709 // ApplicationReportingSettings: Application reporting settings. Only 5710 // applicable if application_reports_enabled is true. 5711 ApplicationReportingSettings *ApplicationReportingSettings `json:"applicationReportingSettings,omitempty"` 5712 // ApplicationReportsEnabled: Whether app reports are enabled. 5713 ApplicationReportsEnabled bool `json:"applicationReportsEnabled,omitempty"` 5714 // CommonCriteriaModeEnabled: Whether Common Criteria Mode reporting is 5715 // enabled. 5716 CommonCriteriaModeEnabled bool `json:"commonCriteriaModeEnabled,omitempty"` 5717 // DeviceSettingsEnabled: Whether device settings reporting is enabled. 5718 DeviceSettingsEnabled bool `json:"deviceSettingsEnabled,omitempty"` 5719 // DisplayInfoEnabled: Whether displays reporting is enabled. Report data is 5720 // not available for personally owned devices with work profiles. 5721 DisplayInfoEnabled bool `json:"displayInfoEnabled,omitempty"` 5722 // HardwareStatusEnabled: Whether hardware status reporting is enabled. Report 5723 // data is not available for personally owned devices with work profiles. 5724 HardwareStatusEnabled bool `json:"hardwareStatusEnabled,omitempty"` 5725 // MemoryInfoEnabled: Whether memory event reporting is enabled. 5726 MemoryInfoEnabled bool `json:"memoryInfoEnabled,omitempty"` 5727 // NetworkInfoEnabled: Whether network info reporting is enabled. 5728 NetworkInfoEnabled bool `json:"networkInfoEnabled,omitempty"` 5729 // PowerManagementEventsEnabled: Whether power management event reporting is 5730 // enabled. Report data is not available for personally owned devices with work 5731 // profiles. 5732 PowerManagementEventsEnabled bool `json:"powerManagementEventsEnabled,omitempty"` 5733 // SoftwareInfoEnabled: Whether software info reporting is enabled. 5734 SoftwareInfoEnabled bool `json:"softwareInfoEnabled,omitempty"` 5735 // SystemPropertiesEnabled: Whether system properties reporting is enabled. 5736 SystemPropertiesEnabled bool `json:"systemPropertiesEnabled,omitempty"` 5737 // ForceSendFields is a list of field names (e.g. 5738 // "ApplicationReportingSettings") to unconditionally include in API requests. 5739 // By default, fields with empty or default values are omitted from API 5740 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields 5741 // for more details. 5742 ForceSendFields []string `json:"-"` 5743 // NullFields is a list of field names (e.g. "ApplicationReportingSettings") to 5744 // include in API requests with the JSON null value. By default, fields with 5745 // empty values are omitted from API requests. See 5746 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5747 NullFields []string `json:"-"` 5748 } 5749 5750 func (s *StatusReportingSettings) MarshalJSON() ([]byte, error) { 5751 type NoMethod StatusReportingSettings 5752 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5753 } 5754 5755 // StopLostModeParams: Parameters associated with the STOP_LOST_MODE command to 5756 // take the device out of lost mode. 5757 type StopLostModeParams struct { 5758 } 5759 5760 // StopLostModeStatus: Status of the STOP_LOST_MODE command to take the device 5761 // out of lost mode. 5762 type StopLostModeStatus struct { 5763 // Status: The status. See StopLostModeStatus. 5764 // 5765 // Possible values: 5766 // "STATUS_UNSPECIFIED" - Unspecified. This value is not used. 5767 // "SUCCESS" - The device was taken out of lost mode. 5768 // "NOT_IN_LOST_MODE" - The device is not in lost mode. 5769 Status string `json:"status,omitempty"` 5770 // ForceSendFields is a list of field names (e.g. "Status") to unconditionally 5771 // include in API requests. By default, fields with empty or default values are 5772 // omitted from API requests. See 5773 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5774 // details. 5775 ForceSendFields []string `json:"-"` 5776 // NullFields is a list of field names (e.g. "Status") to include in API 5777 // requests with the JSON null value. By default, fields with empty values are 5778 // omitted from API requests. See 5779 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5780 NullFields []string `json:"-"` 5781 } 5782 5783 func (s *StopLostModeStatus) MarshalJSON() ([]byte, error) { 5784 type NoMethod StopLostModeStatus 5785 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5786 } 5787 5788 // StopLostModeUserAttemptEvent: A lost mode event indicating the user has 5789 // attempted to stop lost mode. 5790 type StopLostModeUserAttemptEvent struct { 5791 // Status: The status of the attempt to stop lost mode. 5792 // 5793 // Possible values: 5794 // "STATUS_UNSPECIFIED" - This value is not used. 5795 // "ATTEMPT_SUCCEEDED" - Indicates that the user successfully stopped lost 5796 // mode. 5797 // "ATTEMPT_FAILED" - Indicates that the user's attempt to stop lost mode 5798 // failed. 5799 Status string `json:"status,omitempty"` 5800 // ForceSendFields is a list of field names (e.g. "Status") to unconditionally 5801 // include in API requests. By default, fields with empty or default values are 5802 // omitted from API requests. See 5803 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5804 // details. 5805 ForceSendFields []string `json:"-"` 5806 // NullFields is a list of field names (e.g. "Status") to include in API 5807 // requests with the JSON null value. By default, fields with empty values are 5808 // omitted from API requests. See 5809 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5810 NullFields []string `json:"-"` 5811 } 5812 5813 func (s *StopLostModeUserAttemptEvent) MarshalJSON() ([]byte, error) { 5814 type NoMethod StopLostModeUserAttemptEvent 5815 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5816 } 5817 5818 // SystemUpdate: Configuration for managing system updatesNote: Google Play 5819 // system updates (https://source.android.com/docs/core/ota/modular-system) 5820 // (also called Mainline updates) are automatically downloaded but require a 5821 // device reboot to be installed. Refer to the mainline section in Manage 5822 // system updates 5823 // (https://developer.android.com/work/dpc/system-updates#mainline) for further 5824 // details. 5825 type SystemUpdate struct { 5826 // EndMinutes: If the type is WINDOWED, the end of the maintenance window, 5827 // measured as the number of minutes after midnight in device's local time. 5828 // This value must be between 0 and 1439, inclusive. If this value is less than 5829 // start_minutes, then the maintenance window spans midnight. If the 5830 // maintenance window specified is smaller than 30 minutes, the actual window 5831 // is extended to 30 minutes beyond the start time. 5832 EndMinutes int64 `json:"endMinutes,omitempty"` 5833 // FreezePeriods: An annually repeating time period in which over-the-air (OTA) 5834 // system updates are postponed to freeze the OS version running on a device. 5835 // To prevent freezing the device indefinitely, each freeze period must be 5836 // separated by at least 60 days. 5837 FreezePeriods []*FreezePeriod `json:"freezePeriods,omitempty"` 5838 // StartMinutes: If the type is WINDOWED, the start of the maintenance window, 5839 // measured as the number of minutes after midnight in the device's local time. 5840 // This value must be between 0 and 1439, inclusive. 5841 StartMinutes int64 `json:"startMinutes,omitempty"` 5842 // Type: The type of system update to configure. 5843 // 5844 // Possible values: 5845 // "SYSTEM_UPDATE_TYPE_UNSPECIFIED" - Follow the default update behavior for 5846 // the device, which typically requires the user to accept system updates. 5847 // "AUTOMATIC" - Install automatically as soon as an update is available. 5848 // "WINDOWED" - Install automatically within a daily maintenance window. This 5849 // also configures Play apps to be updated within the window. This is strongly 5850 // recommended for kiosk devices because this is the only way apps persistently 5851 // pinned to the foreground can be updated by Play.If autoUpdateMode is set to 5852 // AUTO_UPDATE_HIGH_PRIORITY for an app, then the maintenance window is ignored 5853 // for that app and it is updated as soon as possible even outside of the 5854 // maintenance window. 5855 // "POSTPONE" - Postpone automatic install up to a maximum of 30 days. This 5856 // policy does not affect security updates (e.g. monthly security patches). 5857 Type string `json:"type,omitempty"` 5858 // ForceSendFields is a list of field names (e.g. "EndMinutes") to 5859 // unconditionally include in API requests. By default, fields with empty or 5860 // default values are omitted from API requests. See 5861 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5862 // details. 5863 ForceSendFields []string `json:"-"` 5864 // NullFields is a list of field names (e.g. "EndMinutes") to include in API 5865 // requests with the JSON null value. By default, fields with empty values are 5866 // omitted from API requests. See 5867 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5868 NullFields []string `json:"-"` 5869 } 5870 5871 func (s *SystemUpdate) MarshalJSON() ([]byte, error) { 5872 type NoMethod SystemUpdate 5873 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5874 } 5875 5876 // SystemUpdateInfo: Information about a potential pending system update. 5877 type SystemUpdateInfo struct { 5878 // UpdateReceivedTime: The time when the update was first available. A zero 5879 // value indicates that this field is not set. This field is set only if an 5880 // update is available (that is, updateStatus is neither UPDATE_STATUS_UNKNOWN 5881 // nor UP_TO_DATE). 5882 UpdateReceivedTime string `json:"updateReceivedTime,omitempty"` 5883 // UpdateStatus: The status of an update: whether an update exists and what 5884 // type it is. 5885 // 5886 // Possible values: 5887 // "UPDATE_STATUS_UNKNOWN" - It is unknown whether there is a pending system 5888 // update. This happens when, for example, the device API level is less than 5889 // 26, or if the version of Android Device Policy is outdated. 5890 // "UP_TO_DATE" - There is no pending system update available on the device. 5891 // "UNKNOWN_UPDATE_AVAILABLE" - There is a pending system update available, 5892 // but its type is not known. 5893 // "SECURITY_UPDATE_AVAILABLE" - There is a pending security update 5894 // available. 5895 // "OS_UPDATE_AVAILABLE" - There is a pending OS update available. 5896 UpdateStatus string `json:"updateStatus,omitempty"` 5897 // ForceSendFields is a list of field names (e.g. "UpdateReceivedTime") to 5898 // unconditionally include in API requests. By default, fields with empty or 5899 // default values are omitted from API requests. See 5900 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5901 // details. 5902 ForceSendFields []string `json:"-"` 5903 // NullFields is a list of field names (e.g. "UpdateReceivedTime") to include 5904 // in API requests with the JSON null value. By default, fields with empty 5905 // values are omitted from API requests. See 5906 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5907 NullFields []string `json:"-"` 5908 } 5909 5910 func (s *SystemUpdateInfo) MarshalJSON() ([]byte, error) { 5911 type NoMethod SystemUpdateInfo 5912 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5913 } 5914 5915 // TelephonyInfo: Telephony information associated with a given SIM card on the 5916 // device. Only supported on fully managed devices starting from Android API 5917 // level 23. 5918 type TelephonyInfo struct { 5919 // CarrierName: The carrier name associated with this SIM card. 5920 CarrierName string `json:"carrierName,omitempty"` 5921 // PhoneNumber: The phone number associated with this SIM card. 5922 PhoneNumber string `json:"phoneNumber,omitempty"` 5923 // ForceSendFields is a list of field names (e.g. "CarrierName") to 5924 // unconditionally include in API requests. By default, fields with empty or 5925 // default values are omitted from API requests. See 5926 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5927 // details. 5928 ForceSendFields []string `json:"-"` 5929 // NullFields is a list of field names (e.g. "CarrierName") to include in API 5930 // requests with the JSON null value. By default, fields with empty values are 5931 // omitted from API requests. See 5932 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5933 NullFields []string `json:"-"` 5934 } 5935 5936 func (s *TelephonyInfo) MarshalJSON() ([]byte, error) { 5937 type NoMethod TelephonyInfo 5938 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5939 } 5940 5941 // TermsAndConditions: A terms and conditions page to be accepted during 5942 // provisioning. 5943 type TermsAndConditions struct { 5944 // Content: A well-formatted HTML string. It will be parsed on the client with 5945 // android.text.Html#fromHtml. 5946 Content *UserFacingMessage `json:"content,omitempty"` 5947 // Header: A short header which appears above the HTML content. 5948 Header *UserFacingMessage `json:"header,omitempty"` 5949 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally 5950 // include in API requests. By default, fields with empty or default values are 5951 // omitted from API requests. See 5952 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5953 // details. 5954 ForceSendFields []string `json:"-"` 5955 // NullFields is a list of field names (e.g. "Content") to include in API 5956 // requests with the JSON null value. By default, fields with empty values are 5957 // omitted from API requests. See 5958 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5959 NullFields []string `json:"-"` 5960 } 5961 5962 func (s *TermsAndConditions) MarshalJSON() ([]byte, error) { 5963 type NoMethod TermsAndConditions 5964 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5965 } 5966 5967 // UsageLog: Controls types of device activity logs collected from the device 5968 // and reported via Pub/Sub notification 5969 // (https://developers.google.com/android/management/notifications). 5970 type UsageLog struct { 5971 // EnabledLogTypes: Specifies which log types are enabled. Note that users will 5972 // receive on-device messaging when usage logging is enabled. 5973 // 5974 // Possible values: 5975 // "LOG_TYPE_UNSPECIFIED" - This value is not used. 5976 // "SECURITY_LOGS" - Enable logging of on-device security events, like when 5977 // the device password is incorrectly entered or removable storage is mounted. 5978 // See UsageLogEvent for a complete description of the logged security events. 5979 // Supported for fully managed devices on Android 7 and above. Supported for 5980 // company-owned devices with a work profile on Android 12 and above, on which 5981 // only security events from the work profile are logged. Can be overridden by 5982 // the application delegated scope SECURITY_LOGS 5983 // "NETWORK_ACTIVITY_LOGS" - Enable logging of on-device network events, like 5984 // DNS lookups and TCP connections. See UsageLogEvent for a complete 5985 // description of the logged network events. Supported for fully managed 5986 // devices on Android 8 and above. Supported for company-owned devices with a 5987 // work profile on Android 12 and above, on which only network events from the 5988 // work profile are logged. Can be overridden by the application delegated 5989 // scope NETWORK_ACTIVITY_LOGS 5990 EnabledLogTypes []string `json:"enabledLogTypes,omitempty"` 5991 // UploadOnCellularAllowed: Specifies which of the enabled log types can be 5992 // uploaded over mobile data. By default logs are queued for upload when the 5993 // device connects to WiFi. 5994 // 5995 // Possible values: 5996 // "LOG_TYPE_UNSPECIFIED" - This value is not used. 5997 // "SECURITY_LOGS" - Enable logging of on-device security events, like when 5998 // the device password is incorrectly entered or removable storage is mounted. 5999 // See UsageLogEvent for a complete description of the logged security events. 6000 // Supported for fully managed devices on Android 7 and above. Supported for 6001 // company-owned devices with a work profile on Android 12 and above, on which 6002 // only security events from the work profile are logged. Can be overridden by 6003 // the application delegated scope SECURITY_LOGS 6004 // "NETWORK_ACTIVITY_LOGS" - Enable logging of on-device network events, like 6005 // DNS lookups and TCP connections. See UsageLogEvent for a complete 6006 // description of the logged network events. Supported for fully managed 6007 // devices on Android 8 and above. Supported for company-owned devices with a 6008 // work profile on Android 12 and above, on which only network events from the 6009 // work profile are logged. Can be overridden by the application delegated 6010 // scope NETWORK_ACTIVITY_LOGS 6011 UploadOnCellularAllowed []string `json:"uploadOnCellularAllowed,omitempty"` 6012 // ForceSendFields is a list of field names (e.g. "EnabledLogTypes") to 6013 // unconditionally include in API requests. By default, fields with empty or 6014 // default values are omitted from API requests. See 6015 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6016 // details. 6017 ForceSendFields []string `json:"-"` 6018 // NullFields is a list of field names (e.g. "EnabledLogTypes") to include in 6019 // API requests with the JSON null value. By default, fields with empty values 6020 // are omitted from API requests. See 6021 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6022 NullFields []string `json:"-"` 6023 } 6024 6025 func (s *UsageLog) MarshalJSON() ([]byte, error) { 6026 type NoMethod UsageLog 6027 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6028 } 6029 6030 // UsageLogEvent: An event logged on the device. 6031 type UsageLogEvent struct { 6032 // AdbShellCommandEvent: A shell command was issued over ADB via “adb shell 6033 // command”. Part of SECURITY_LOGS. 6034 AdbShellCommandEvent *AdbShellCommandEvent `json:"adbShellCommandEvent,omitempty"` 6035 // AdbShellInteractiveEvent: An ADB interactive shell was opened via “adb 6036 // shell”. Part of SECURITY_LOGS. 6037 AdbShellInteractiveEvent *AdbShellInteractiveEvent `json:"adbShellInteractiveEvent,omitempty"` 6038 // AppProcessStartEvent: An app process was started. Part of SECURITY_LOGS. 6039 AppProcessStartEvent *AppProcessStartEvent `json:"appProcessStartEvent,omitempty"` 6040 // CertAuthorityInstalledEvent: A new root certificate was installed into the 6041 // system's trusted credential storage. Part of SECURITY_LOGS. 6042 CertAuthorityInstalledEvent *CertAuthorityInstalledEvent `json:"certAuthorityInstalledEvent,omitempty"` 6043 // CertAuthorityRemovedEvent: A root certificate was removed from the system's 6044 // trusted credential storage. Part of SECURITY_LOGS. 6045 CertAuthorityRemovedEvent *CertAuthorityRemovedEvent `json:"certAuthorityRemovedEvent,omitempty"` 6046 // CertValidationFailureEvent: An X.509v3 certificate failed to validate, 6047 // currently this validation is performed on the Wi-FI access point and failure 6048 // may be due to a mismatch upon server certificate validation. However it may 6049 // in the future include other validation events of an X.509v3 certificate. 6050 // Part of SECURITY_LOGS. 6051 CertValidationFailureEvent *CertValidationFailureEvent `json:"certValidationFailureEvent,omitempty"` 6052 // ConnectEvent: A TCP connect event was initiated through the standard network 6053 // stack. Part of NETWORK_ACTIVITY_LOGS. 6054 ConnectEvent *ConnectEvent `json:"connectEvent,omitempty"` 6055 // CryptoSelfTestCompletedEvent: Validates whether Android’s built-in 6056 // cryptographic library (BoringSSL) is valid. Should always succeed on device 6057 // boot, if it fails, the device should be considered untrusted. Part of 6058 // SECURITY_LOGS. 6059 CryptoSelfTestCompletedEvent *CryptoSelfTestCompletedEvent `json:"cryptoSelfTestCompletedEvent,omitempty"` 6060 // DnsEvent: A DNS lookup event was initiated through the standard network 6061 // stack. Part of NETWORK_ACTIVITY_LOGS. 6062 DnsEvent *DnsEvent `json:"dnsEvent,omitempty"` 6063 // EnrollmentCompleteEvent: Device has completed enrollment. Part of 6064 // AMAPI_LOGS. 6065 EnrollmentCompleteEvent *EnrollmentCompleteEvent `json:"enrollmentCompleteEvent,omitempty"` 6066 // EventId: Unique id of the event. 6067 EventId int64 `json:"eventId,omitempty,string"` 6068 // EventTime: Device timestamp when the event was logged. 6069 EventTime string `json:"eventTime,omitempty"` 6070 // EventType: The particular usage log event type that was reported on the 6071 // device. Use this to determine which event field to access. 6072 // 6073 // Possible values: 6074 // "EVENT_TYPE_UNSPECIFIED" - This value is not used 6075 // "ADB_SHELL_COMMAND" - Indicates adb_shell_command_event has been set. 6076 // "ADB_SHELL_INTERACTIVE" - Indicates adb_shell_interactive_event has been 6077 // set. 6078 // "APP_PROCESS_START" - Indicates app_process_start_event has been set. 6079 // "KEYGUARD_DISMISSED" - Indicates keyguard_dismissed_event has been set. 6080 // "KEYGUARD_DISMISS_AUTH_ATTEMPT" - Indicates 6081 // keyguard_dismiss_auth_attempt_event has been set. 6082 // "KEYGUARD_SECURED" - Indicates keyguard_secured_event has been set. 6083 // "FILE_PULLED" - Indicates file_pulled_event has been set. 6084 // "FILE_PUSHED" - Indicates file_pushed_event has been set. 6085 // "CERT_AUTHORITY_INSTALLED" - Indicates cert_authority_installed_event has 6086 // been set. 6087 // "CERT_AUTHORITY_REMOVED" - Indicates cert_authority_removed_event has been 6088 // set. 6089 // "CERT_VALIDATION_FAILURE" - Indicates cert_validation_failure_event has 6090 // been set. 6091 // "CRYPTO_SELF_TEST_COMPLETED" - Indicates crypto_self_test_completed_event 6092 // has been set. 6093 // "KEY_DESTRUCTION" - Indicates key_destruction_event has been set. 6094 // "KEY_GENERATED" - Indicates key_generated_event has been set. 6095 // "KEY_IMPORT" - Indicates key_import_event has been set. 6096 // "KEY_INTEGRITY_VIOLATION" - Indicates key_integrity_violation_event has 6097 // been set. 6098 // "LOGGING_STARTED" - Indicates logging_started_event has been set. 6099 // "LOGGING_STOPPED" - Indicates logging_stopped_event has been set. 6100 // "LOG_BUFFER_SIZE_CRITICAL" - Indicates log_buffer_size_critical_event has 6101 // been set. 6102 // "MEDIA_MOUNT" - Indicates media_mount_event has been set. 6103 // "MEDIA_UNMOUNT" - Indicates media_unmount_event has been set. 6104 // "OS_SHUTDOWN" - Indicates os_shutdown_event has been set. 6105 // "OS_STARTUP" - Indicates os_startup_event has been set. 6106 // "REMOTE_LOCK" - Indicates remote_lock_event has been set. 6107 // "WIPE_FAILURE" - Indicates wipe_failure_event has been set. 6108 // "CONNECT" - Indicates connect_event has been set. 6109 // "DNS" - Indicates dns_event has been set. 6110 // "STOP_LOST_MODE_USER_ATTEMPT" - Indicates stopLostModeUserAttemptEvent has 6111 // been set. 6112 // "LOST_MODE_OUTGOING_PHONE_CALL" - Indicates lostModeOutgoingPhoneCallEvent 6113 // has been set. 6114 // "LOST_MODE_LOCATION" - Indicates lostModeLocationEvent has been set. 6115 // "ENROLLMENT_COMPLETE" - Indicates enrollment_complete_event has been set. 6116 EventType string `json:"eventType,omitempty"` 6117 // FilePulledEvent: A file was downloaded from the device. Part of 6118 // SECURITY_LOGS. 6119 FilePulledEvent *FilePulledEvent `json:"filePulledEvent,omitempty"` 6120 // FilePushedEvent: A file was uploaded onto the device. Part of SECURITY_LOGS. 6121 FilePushedEvent *FilePushedEvent `json:"filePushedEvent,omitempty"` 6122 // KeyDestructionEvent: A cryptographic key including user installed, admin 6123 // installed and system maintained private key is removed from the device 6124 // either by the user or management. Part of SECURITY_LOGS. 6125 KeyDestructionEvent *KeyDestructionEvent `json:"keyDestructionEvent,omitempty"` 6126 // KeyGeneratedEvent: A cryptographic key including user installed, admin 6127 // installed and system maintained private key is installed on the device 6128 // either by the user or management. Part of SECURITY_LOGS. 6129 KeyGeneratedEvent *KeyGeneratedEvent `json:"keyGeneratedEvent,omitempty"` 6130 // KeyImportEvent: A cryptographic key including user installed, admin 6131 // installed and system maintained private key is imported on the device either 6132 // by the user or management. Part of SECURITY_LOGS. 6133 KeyImportEvent *KeyImportEvent `json:"keyImportEvent,omitempty"` 6134 // KeyIntegrityViolationEvent: A cryptographic key including user installed, 6135 // admin installed and system maintained private key is determined to be 6136 // corrupted due to storage corruption, hardware failure or some OS issue. Part 6137 // of SECURITY_LOGS. 6138 KeyIntegrityViolationEvent *KeyIntegrityViolationEvent `json:"keyIntegrityViolationEvent,omitempty"` 6139 // KeyguardDismissAuthAttemptEvent: An attempt was made to unlock the device. 6140 // Part of SECURITY_LOGS. 6141 KeyguardDismissAuthAttemptEvent *KeyguardDismissAuthAttemptEvent `json:"keyguardDismissAuthAttemptEvent,omitempty"` 6142 // KeyguardDismissedEvent: The keyguard was dismissed. Part of SECURITY_LOGS. 6143 KeyguardDismissedEvent *KeyguardDismissedEvent `json:"keyguardDismissedEvent,omitempty"` 6144 // KeyguardSecuredEvent: The device was locked either by user or timeout. Part 6145 // of SECURITY_LOGS. 6146 KeyguardSecuredEvent *KeyguardSecuredEvent `json:"keyguardSecuredEvent,omitempty"` 6147 // LogBufferSizeCriticalEvent: The audit log buffer has reached 90% of its 6148 // capacity, therefore older events may be dropped. Part of SECURITY_LOGS. 6149 LogBufferSizeCriticalEvent *LogBufferSizeCriticalEvent `json:"logBufferSizeCriticalEvent,omitempty"` 6150 // LoggingStartedEvent: usageLog policy has been enabled. Part of 6151 // SECURITY_LOGS. 6152 LoggingStartedEvent *LoggingStartedEvent `json:"loggingStartedEvent,omitempty"` 6153 // LoggingStoppedEvent: usageLog policy has been disabled. Part of 6154 // SECURITY_LOGS. 6155 LoggingStoppedEvent *LoggingStoppedEvent `json:"loggingStoppedEvent,omitempty"` 6156 // LostModeLocationEvent: A lost mode location update when a device in lost 6157 // mode. 6158 LostModeLocationEvent *LostModeLocationEvent `json:"lostModeLocationEvent,omitempty"` 6159 // LostModeOutgoingPhoneCallEvent: An outgoing phone call has been made when a 6160 // device in lost mode. 6161 LostModeOutgoingPhoneCallEvent *LostModeOutgoingPhoneCallEvent `json:"lostModeOutgoingPhoneCallEvent,omitempty"` 6162 // MediaMountEvent: Removable media was mounted. Part of SECURITY_LOGS. 6163 MediaMountEvent *MediaMountEvent `json:"mediaMountEvent,omitempty"` 6164 // MediaUnmountEvent: Removable media was unmounted. Part of SECURITY_LOGS. 6165 MediaUnmountEvent *MediaUnmountEvent `json:"mediaUnmountEvent,omitempty"` 6166 // OsShutdownEvent: Device was shutdown. Part of SECURITY_LOGS. 6167 OsShutdownEvent *OsShutdownEvent `json:"osShutdownEvent,omitempty"` 6168 // OsStartupEvent: Device was started. Part of SECURITY_LOGS. 6169 OsStartupEvent *OsStartupEvent `json:"osStartupEvent,omitempty"` 6170 // RemoteLockEvent: The device or profile has been remotely locked via the LOCK 6171 // command. Part of SECURITY_LOGS. 6172 RemoteLockEvent *RemoteLockEvent `json:"remoteLockEvent,omitempty"` 6173 // StopLostModeUserAttemptEvent: An attempt to take a device out of lost mode. 6174 StopLostModeUserAttemptEvent *StopLostModeUserAttemptEvent `json:"stopLostModeUserAttemptEvent,omitempty"` 6175 // WipeFailureEvent: The work profile or company-owned device failed to wipe 6176 // when requested. This could be user initiated or admin initiated e.g. delete 6177 // was received. Part of SECURITY_LOGS. 6178 WipeFailureEvent *WipeFailureEvent `json:"wipeFailureEvent,omitempty"` 6179 // ForceSendFields is a list of field names (e.g. "AdbShellCommandEvent") to 6180 // unconditionally include in API requests. By default, fields with empty or 6181 // default values are omitted from API requests. See 6182 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6183 // details. 6184 ForceSendFields []string `json:"-"` 6185 // NullFields is a list of field names (e.g. "AdbShellCommandEvent") to include 6186 // in API requests with the JSON null value. By default, fields with empty 6187 // values are omitted from API requests. See 6188 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6189 NullFields []string `json:"-"` 6190 } 6191 6192 func (s *UsageLogEvent) MarshalJSON() ([]byte, error) { 6193 type NoMethod UsageLogEvent 6194 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6195 } 6196 6197 // User: A user belonging to an enterprise. 6198 type User struct { 6199 // AccountIdentifier: A unique identifier you create for this user, such as 6200 // user342 or asset#44418. This field must be set when the user is created and 6201 // can't be updated. This field must not contain personally identifiable 6202 // information (PII). This identifier must be 1024 characters or less; 6203 // otherwise, the update policy request will fail. 6204 AccountIdentifier string `json:"accountIdentifier,omitempty"` 6205 // ForceSendFields is a list of field names (e.g. "AccountIdentifier") to 6206 // unconditionally include in API requests. By default, fields with empty or 6207 // default values are omitted from API requests. See 6208 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6209 // details. 6210 ForceSendFields []string `json:"-"` 6211 // NullFields is a list of field names (e.g. "AccountIdentifier") to include in 6212 // API requests with the JSON null value. By default, fields with empty values 6213 // are omitted from API requests. See 6214 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6215 NullFields []string `json:"-"` 6216 } 6217 6218 func (s *User) MarshalJSON() ([]byte, error) { 6219 type NoMethod User 6220 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6221 } 6222 6223 // UserFacingMessage: Provides a user-facing message with locale info. The 6224 // maximum message length is 4096 characters. 6225 type UserFacingMessage struct { 6226 // DefaultMessage: The default message displayed if no localized message is 6227 // specified or the user's locale doesn't match with any of the localized 6228 // messages. A default message must be provided if any localized messages are 6229 // provided. 6230 DefaultMessage string `json:"defaultMessage,omitempty"` 6231 // LocalizedMessages: A map containing pairs, where locale is a well-formed BCP 6232 // 47 language (https://www.w3.org/International/articles/language-tags/) code, 6233 // such as en-US, es-ES, or fr. 6234 LocalizedMessages map[string]string `json:"localizedMessages,omitempty"` 6235 // ForceSendFields is a list of field names (e.g. "DefaultMessage") to 6236 // unconditionally include in API requests. By default, fields with empty or 6237 // default values are omitted from API requests. See 6238 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6239 // details. 6240 ForceSendFields []string `json:"-"` 6241 // NullFields is a list of field names (e.g. "DefaultMessage") to include in 6242 // API requests with the JSON null value. By default, fields with empty values 6243 // are omitted from API requests. See 6244 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6245 NullFields []string `json:"-"` 6246 } 6247 6248 func (s *UserFacingMessage) MarshalJSON() ([]byte, error) { 6249 type NoMethod UserFacingMessage 6250 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6251 } 6252 6253 // WebApp: A web app. 6254 type WebApp struct { 6255 // DisplayMode: The display mode of the web app. 6256 // 6257 // Possible values: 6258 // "DISPLAY_MODE_UNSPECIFIED" - Not used. 6259 // "MINIMAL_UI" - Opens the web app with a minimal set of browser UI elements 6260 // for controlling navigation and viewing the page URL. 6261 // "STANDALONE" - Opens the web app to look and feel like a standalone native 6262 // application. The browser UI elements and page URL are not visible, however 6263 // the system status bar and back button are visible. 6264 // "FULL_SCREEN" - Opens the web app in full screen without any visible 6265 // controls. The browser UI elements, page URL, system status bar and back 6266 // button are not visible, and the web app takes up the entirety of the 6267 // available display area. 6268 DisplayMode string `json:"displayMode,omitempty"` 6269 // Icons: A list of icons for the web app. Must have at least one element. 6270 Icons []*WebAppIcon `json:"icons,omitempty"` 6271 // Name: The name of the web app, which is generated by the server during 6272 // creation in the form enterprises/{enterpriseId}/webApps/{packageName}. 6273 Name string `json:"name,omitempty"` 6274 // StartUrl: The start URL, i.e. the URL that should load when the user opens 6275 // the application. 6276 StartUrl string `json:"startUrl,omitempty"` 6277 // Title: The title of the web app as displayed to the user (e.g., amongst a 6278 // list of other applications, or as a label for an icon). 6279 Title string `json:"title,omitempty"` 6280 // VersionCode: The current version of the app.Note that the version can 6281 // automatically increase during the lifetime of the web app, while Google does 6282 // internal housekeeping to keep the web app up-to-date. 6283 VersionCode int64 `json:"versionCode,omitempty,string"` 6284 6285 // ServerResponse contains the HTTP response code and headers from the server. 6286 googleapi.ServerResponse `json:"-"` 6287 // ForceSendFields is a list of field names (e.g. "DisplayMode") to 6288 // unconditionally include in API requests. By default, fields with empty or 6289 // default values are omitted from API requests. See 6290 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6291 // details. 6292 ForceSendFields []string `json:"-"` 6293 // NullFields is a list of field names (e.g. "DisplayMode") to include in API 6294 // requests with the JSON null value. By default, fields with empty values are 6295 // omitted from API requests. See 6296 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6297 NullFields []string `json:"-"` 6298 } 6299 6300 func (s *WebApp) MarshalJSON() ([]byte, error) { 6301 type NoMethod WebApp 6302 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6303 } 6304 6305 // WebAppIcon: An icon for a web app. Supported formats are: png, jpg and webp. 6306 type WebAppIcon struct { 6307 // ImageData: The actual bytes of the image in a base64url encoded string (c.f. 6308 // RFC4648, section 5 "Base 64 Encoding with URL and Filename Safe Alphabet"). 6309 // - The image type can be png or jpg. - The image should ideally be square. - 6310 // The image should ideally have a size of 512x512. 6311 ImageData string `json:"imageData,omitempty"` 6312 // ForceSendFields is a list of field names (e.g. "ImageData") to 6313 // unconditionally include in API requests. By default, fields with empty or 6314 // default values are omitted from API requests. See 6315 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6316 // details. 6317 ForceSendFields []string `json:"-"` 6318 // NullFields is a list of field names (e.g. "ImageData") to include in API 6319 // requests with the JSON null value. By default, fields with empty values are 6320 // omitted from API requests. See 6321 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6322 NullFields []string `json:"-"` 6323 } 6324 6325 func (s *WebAppIcon) MarshalJSON() ([]byte, error) { 6326 type NoMethod WebAppIcon 6327 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6328 } 6329 6330 // WebToken: A web token used to access the managed Google Play iframe. 6331 type WebToken struct { 6332 // EnabledFeatures: The features to enable. Use this if you want to control 6333 // exactly which feature(s) will be activated; leave empty to allow all 6334 // features.Restrictions / things to note: - If no features are listed here, 6335 // all features are enabled — this is the default behavior where you give 6336 // access to all features to your admins. - This must not contain any 6337 // FEATURE_UNSPECIFIED values. - Repeated values are ignored 6338 // 6339 // Possible values: 6340 // "FEATURE_UNSPECIFIED" - Unspecified feature. 6341 // "PLAY_SEARCH" - The Managed Play search apps page 6342 // (https://developers.google.com/android/management/apps#search-apps). 6343 // "PRIVATE_APPS" - The private apps page 6344 // (https://developers.google.com/android/management/apps#private-apps). 6345 // "WEB_APPS" - The Web Apps page 6346 // (https://developers.google.com/android/management/apps#web-apps). 6347 // "STORE_BUILDER" - The organize apps page 6348 // (https://developers.google.com/android/management/apps#organize-apps). 6349 // "MANAGED_CONFIGURATIONS" - The managed configurations page 6350 // (https://developers.google.com/android/management/managed-configurations-iframe). 6351 // "ZERO_TOUCH_CUSTOMER_MANAGEMENT" - The zero-touch iframe 6352 // (https://developers.google.com/android/management/zero-touch-iframe). 6353 EnabledFeatures []string `json:"enabledFeatures,omitempty"` 6354 // Name: The name of the web token, which is generated by the server during 6355 // creation in the form enterprises/{enterpriseId}/webTokens/{webTokenId}. 6356 Name string `json:"name,omitempty"` 6357 // ParentFrameUrl: The URL of the parent frame hosting the iframe with the 6358 // embedded UI. To prevent XSS, the iframe may not be hosted at other URLs. The 6359 // URL must use the https scheme. 6360 ParentFrameUrl string `json:"parentFrameUrl,omitempty"` 6361 // Permissions: Permissions available to an admin in the embedded UI. An admin 6362 // must have all of these permissions in order to view the UI. This field is 6363 // deprecated. 6364 // 6365 // Possible values: 6366 // "WEB_TOKEN_PERMISSION_UNSPECIFIED" - This value is ignored. 6367 // "APPROVE_APPS" - The permission to approve apps for the enterprise. 6368 Permissions []string `json:"permissions,omitempty"` 6369 // Value: The token value which is used in the hosting page to generate the 6370 // iframe with the embedded UI. This is a read-only field generated by the 6371 // server. 6372 Value string `json:"value,omitempty"` 6373 6374 // ServerResponse contains the HTTP response code and headers from the server. 6375 googleapi.ServerResponse `json:"-"` 6376 // ForceSendFields is a list of field names (e.g. "EnabledFeatures") to 6377 // unconditionally include in API requests. By default, fields with empty or 6378 // default values are omitted from API requests. See 6379 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6380 // details. 6381 ForceSendFields []string `json:"-"` 6382 // NullFields is a list of field names (e.g. "EnabledFeatures") to include in 6383 // API requests with the JSON null value. By default, fields with empty values 6384 // are omitted from API requests. See 6385 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6386 NullFields []string `json:"-"` 6387 } 6388 6389 func (s *WebToken) MarshalJSON() ([]byte, error) { 6390 type NoMethod WebToken 6391 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6392 } 6393 6394 // WifiSsid: Represents a Wi-Fi SSID. 6395 type WifiSsid struct { 6396 // WifiSsid: Required. Wi-Fi SSID represented as a string. 6397 WifiSsid string `json:"wifiSsid,omitempty"` 6398 // ForceSendFields is a list of field names (e.g. "WifiSsid") to 6399 // unconditionally include in API requests. By default, fields with empty or 6400 // default values are omitted from API requests. See 6401 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6402 // details. 6403 ForceSendFields []string `json:"-"` 6404 // NullFields is a list of field names (e.g. "WifiSsid") to include in API 6405 // requests with the JSON null value. By default, fields with empty values are 6406 // omitted from API requests. See 6407 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6408 NullFields []string `json:"-"` 6409 } 6410 6411 func (s *WifiSsid) MarshalJSON() ([]byte, error) { 6412 type NoMethod WifiSsid 6413 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6414 } 6415 6416 // WifiSsidPolicy: Restrictions on which Wi-Fi SSIDs the device can connect to. 6417 // Note that this does not affect which networks can be configured on the 6418 // device. Supported on company-owned devices running Android 13 and above. 6419 type WifiSsidPolicy struct { 6420 // WifiSsidPolicyType: Type of the Wi-Fi SSID policy to be applied. 6421 // 6422 // Possible values: 6423 // "WIFI_SSID_POLICY_TYPE_UNSPECIFIED" - Defaults to WIFI_SSID_DENYLIST. 6424 // wifiSsids must not be set. There are no restrictions on which SSID the 6425 // device can connect to. 6426 // "WIFI_SSID_DENYLIST" - The device cannot connect to any Wi-Fi network 6427 // whose SSID is in wifiSsids, but can connect to other networks. 6428 // "WIFI_SSID_ALLOWLIST" - The device can make Wi-Fi connections only to the 6429 // SSIDs in wifiSsids. wifiSsids must not be empty. The device will not be able 6430 // to connect to any other Wi-Fi network. 6431 WifiSsidPolicyType string `json:"wifiSsidPolicyType,omitempty"` 6432 // WifiSsids: Optional. List of Wi-Fi SSIDs that should be applied in the 6433 // policy. This field must be non-empty when WifiSsidPolicyType is set to 6434 // WIFI_SSID_ALLOWLIST. If this is set to a non-empty list, then a 6435 // nonComplianceDetail detail with API_LEVEL is reported if the Android version 6436 // is less than 13 and a nonComplianceDetail with MANAGEMENT_MODE is reported 6437 // for non-company-owned devices. 6438 WifiSsids []*WifiSsid `json:"wifiSsids,omitempty"` 6439 // ForceSendFields is a list of field names (e.g. "WifiSsidPolicyType") to 6440 // unconditionally include in API requests. By default, fields with empty or 6441 // default values are omitted from API requests. See 6442 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6443 // details. 6444 ForceSendFields []string `json:"-"` 6445 // NullFields is a list of field names (e.g. "WifiSsidPolicyType") to include 6446 // in API requests with the JSON null value. By default, fields with empty 6447 // values are omitted from API requests. See 6448 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6449 NullFields []string `json:"-"` 6450 } 6451 6452 func (s *WifiSsidPolicy) MarshalJSON() ([]byte, error) { 6453 type NoMethod WifiSsidPolicy 6454 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6455 } 6456 6457 // WipeAction: An action to reset a company owned device or delete a work 6458 // profile. Note: blockAction must also be specified. 6459 type WipeAction struct { 6460 // PreserveFrp: Whether the factory-reset protection data is preserved on the 6461 // device. This setting doesn’t apply to work profiles. 6462 PreserveFrp bool `json:"preserveFrp,omitempty"` 6463 // WipeAfterDays: Number of days the policy is non-compliant before the device 6464 // or work profile is wiped. wipeAfterDays must be greater than blockAfterDays. 6465 WipeAfterDays int64 `json:"wipeAfterDays,omitempty"` 6466 // ForceSendFields is a list of field names (e.g. "PreserveFrp") to 6467 // unconditionally include in API requests. By default, fields with empty or 6468 // default values are omitted from API requests. See 6469 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6470 // details. 6471 ForceSendFields []string `json:"-"` 6472 // NullFields is a list of field names (e.g. "PreserveFrp") to include in API 6473 // requests with the JSON null value. By default, fields with empty values are 6474 // omitted from API requests. See 6475 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6476 NullFields []string `json:"-"` 6477 } 6478 6479 func (s *WipeAction) MarshalJSON() ([]byte, error) { 6480 type NoMethod WipeAction 6481 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6482 } 6483 6484 // WipeFailureEvent: The work profile or company-owned device failed to wipe 6485 // when requested. This could be user initiated or admin initiated e.g. delete 6486 // was received. Intentionally empty. 6487 type WipeFailureEvent struct { 6488 } 6489 6490 type EnterprisesCreateCall struct { 6491 s *Service 6492 enterprise *Enterprise 6493 urlParams_ gensupport.URLParams 6494 ctx_ context.Context 6495 header_ http.Header 6496 } 6497 6498 // Create: Creates an enterprise. This is the last step in the enterprise 6499 // signup flow. See also: SigninDetail 6500 func (r *EnterprisesService) Create(enterprise *Enterprise) *EnterprisesCreateCall { 6501 c := &EnterprisesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6502 c.enterprise = enterprise 6503 return c 6504 } 6505 6506 // AgreementAccepted sets the optional parameter "agreementAccepted": Whether 6507 // the enterprise admin has seen and agreed to the managed Google Play 6508 // Agreement (https://www.android.com/enterprise/terms/). Do not set this field 6509 // for any customer-managed enterprise 6510 // (https://developers.google.com/android/management/create-enterprise#customer-managed_enterprises). 6511 // Set this to field to true for all EMM-managed enterprises 6512 // (https://developers.google.com/android/management/create-enterprise#emm-managed_enterprises). 6513 func (c *EnterprisesCreateCall) AgreementAccepted(agreementAccepted bool) *EnterprisesCreateCall { 6514 c.urlParams_.Set("agreementAccepted", fmt.Sprint(agreementAccepted)) 6515 return c 6516 } 6517 6518 // EnterpriseToken sets the optional parameter "enterpriseToken": The 6519 // enterprise token appended to the callback URL. Set this when creating a 6520 // customer-managed enterprise 6521 // (https://developers.google.com/android/management/create-enterprise#customer-managed_enterprises) 6522 // and not when creating a deprecated EMM-managed enterprise 6523 // (https://developers.google.com/android/management/create-enterprise#emm-managed_enterprises). 6524 func (c *EnterprisesCreateCall) EnterpriseToken(enterpriseToken string) *EnterprisesCreateCall { 6525 c.urlParams_.Set("enterpriseToken", enterpriseToken) 6526 return c 6527 } 6528 6529 // ProjectId sets the optional parameter "projectId": The ID of the Google 6530 // Cloud Platform project which will own the enterprise. 6531 func (c *EnterprisesCreateCall) ProjectId(projectId string) *EnterprisesCreateCall { 6532 c.urlParams_.Set("projectId", projectId) 6533 return c 6534 } 6535 6536 // SignupUrlName sets the optional parameter "signupUrlName": The name of the 6537 // SignupUrl used to sign up for the enterprise. Set this when creating a 6538 // customer-managed enterprise 6539 // (https://developers.google.com/android/management/create-enterprise#customer-managed_enterprises) 6540 // and not when creating a deprecated EMM-managed enterprise 6541 // (https://developers.google.com/android/management/create-enterprise#emm-managed_enterprises). 6542 func (c *EnterprisesCreateCall) SignupUrlName(signupUrlName string) *EnterprisesCreateCall { 6543 c.urlParams_.Set("signupUrlName", signupUrlName) 6544 return c 6545 } 6546 6547 // Fields allows partial responses to be retrieved. See 6548 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6549 // details. 6550 func (c *EnterprisesCreateCall) Fields(s ...googleapi.Field) *EnterprisesCreateCall { 6551 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6552 return c 6553 } 6554 6555 // Context sets the context to be used in this call's Do method. 6556 func (c *EnterprisesCreateCall) Context(ctx context.Context) *EnterprisesCreateCall { 6557 c.ctx_ = ctx 6558 return c 6559 } 6560 6561 // Header returns a http.Header that can be modified by the caller to add 6562 // headers to the request. 6563 func (c *EnterprisesCreateCall) Header() http.Header { 6564 if c.header_ == nil { 6565 c.header_ = make(http.Header) 6566 } 6567 return c.header_ 6568 } 6569 6570 func (c *EnterprisesCreateCall) doRequest(alt string) (*http.Response, error) { 6571 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 6572 var body io.Reader = nil 6573 body, err := googleapi.WithoutDataWrapper.JSONReader(c.enterprise) 6574 if err != nil { 6575 return nil, err 6576 } 6577 c.urlParams_.Set("alt", alt) 6578 c.urlParams_.Set("prettyPrint", "false") 6579 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/enterprises") 6580 urls += "?" + c.urlParams_.Encode() 6581 req, err := http.NewRequest("POST", urls, body) 6582 if err != nil { 6583 return nil, err 6584 } 6585 req.Header = reqHeaders 6586 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6587 } 6588 6589 // Do executes the "androidmanagement.enterprises.create" call. 6590 // Any non-2xx status code is an error. Response headers are in either 6591 // *Enterprise.ServerResponse.Header or (if a response was returned at all) in 6592 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6593 // whether the returned error was because http.StatusNotModified was returned. 6594 func (c *EnterprisesCreateCall) Do(opts ...googleapi.CallOption) (*Enterprise, error) { 6595 gensupport.SetOptions(c.urlParams_, opts...) 6596 res, err := c.doRequest("json") 6597 if res != nil && res.StatusCode == http.StatusNotModified { 6598 if res.Body != nil { 6599 res.Body.Close() 6600 } 6601 return nil, gensupport.WrapError(&googleapi.Error{ 6602 Code: res.StatusCode, 6603 Header: res.Header, 6604 }) 6605 } 6606 if err != nil { 6607 return nil, err 6608 } 6609 defer googleapi.CloseBody(res) 6610 if err := googleapi.CheckResponse(res); err != nil { 6611 return nil, gensupport.WrapError(err) 6612 } 6613 ret := &Enterprise{ 6614 ServerResponse: googleapi.ServerResponse{ 6615 Header: res.Header, 6616 HTTPStatusCode: res.StatusCode, 6617 }, 6618 } 6619 target := &ret 6620 if err := gensupport.DecodeResponse(target, res); err != nil { 6621 return nil, err 6622 } 6623 return ret, nil 6624 } 6625 6626 type EnterprisesDeleteCall struct { 6627 s *Service 6628 name string 6629 urlParams_ gensupport.URLParams 6630 ctx_ context.Context 6631 header_ http.Header 6632 } 6633 6634 // Delete: Permanently deletes an enterprise and all accounts and data 6635 // associated with it. Warning: this will result in a cascaded deletion of all 6636 // AM API devices associated with the deleted enterprise. Only available for 6637 // EMM-managed enterprises. 6638 // 6639 // - name: The name of the enterprise in the form enterprises/{enterpriseId}. 6640 func (r *EnterprisesService) Delete(name string) *EnterprisesDeleteCall { 6641 c := &EnterprisesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6642 c.name = name 6643 return c 6644 } 6645 6646 // Fields allows partial responses to be retrieved. See 6647 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6648 // details. 6649 func (c *EnterprisesDeleteCall) Fields(s ...googleapi.Field) *EnterprisesDeleteCall { 6650 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6651 return c 6652 } 6653 6654 // Context sets the context to be used in this call's Do method. 6655 func (c *EnterprisesDeleteCall) Context(ctx context.Context) *EnterprisesDeleteCall { 6656 c.ctx_ = ctx 6657 return c 6658 } 6659 6660 // Header returns a http.Header that can be modified by the caller to add 6661 // headers to the request. 6662 func (c *EnterprisesDeleteCall) Header() http.Header { 6663 if c.header_ == nil { 6664 c.header_ = make(http.Header) 6665 } 6666 return c.header_ 6667 } 6668 6669 func (c *EnterprisesDeleteCall) doRequest(alt string) (*http.Response, error) { 6670 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 6671 var body io.Reader = nil 6672 c.urlParams_.Set("alt", alt) 6673 c.urlParams_.Set("prettyPrint", "false") 6674 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 6675 urls += "?" + c.urlParams_.Encode() 6676 req, err := http.NewRequest("DELETE", urls, body) 6677 if err != nil { 6678 return nil, err 6679 } 6680 req.Header = reqHeaders 6681 googleapi.Expand(req.URL, map[string]string{ 6682 "name": c.name, 6683 }) 6684 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6685 } 6686 6687 // Do executes the "androidmanagement.enterprises.delete" call. 6688 // Any non-2xx status code is an error. Response headers are in either 6689 // *Empty.ServerResponse.Header or (if a response was returned at all) in 6690 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6691 // whether the returned error was because http.StatusNotModified was returned. 6692 func (c *EnterprisesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 6693 gensupport.SetOptions(c.urlParams_, opts...) 6694 res, err := c.doRequest("json") 6695 if res != nil && res.StatusCode == http.StatusNotModified { 6696 if res.Body != nil { 6697 res.Body.Close() 6698 } 6699 return nil, gensupport.WrapError(&googleapi.Error{ 6700 Code: res.StatusCode, 6701 Header: res.Header, 6702 }) 6703 } 6704 if err != nil { 6705 return nil, err 6706 } 6707 defer googleapi.CloseBody(res) 6708 if err := googleapi.CheckResponse(res); err != nil { 6709 return nil, gensupport.WrapError(err) 6710 } 6711 ret := &Empty{ 6712 ServerResponse: googleapi.ServerResponse{ 6713 Header: res.Header, 6714 HTTPStatusCode: res.StatusCode, 6715 }, 6716 } 6717 target := &ret 6718 if err := gensupport.DecodeResponse(target, res); err != nil { 6719 return nil, err 6720 } 6721 return ret, nil 6722 } 6723 6724 type EnterprisesGetCall struct { 6725 s *Service 6726 name string 6727 urlParams_ gensupport.URLParams 6728 ifNoneMatch_ string 6729 ctx_ context.Context 6730 header_ http.Header 6731 } 6732 6733 // Get: Gets an enterprise. 6734 // 6735 // - name: The name of the enterprise in the form enterprises/{enterpriseId}. 6736 func (r *EnterprisesService) Get(name string) *EnterprisesGetCall { 6737 c := &EnterprisesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6738 c.name = name 6739 return c 6740 } 6741 6742 // Fields allows partial responses to be retrieved. See 6743 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6744 // details. 6745 func (c *EnterprisesGetCall) Fields(s ...googleapi.Field) *EnterprisesGetCall { 6746 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6747 return c 6748 } 6749 6750 // IfNoneMatch sets an optional parameter which makes the operation fail if the 6751 // object's ETag matches the given value. This is useful for getting updates 6752 // only after the object has changed since the last request. 6753 func (c *EnterprisesGetCall) IfNoneMatch(entityTag string) *EnterprisesGetCall { 6754 c.ifNoneMatch_ = entityTag 6755 return c 6756 } 6757 6758 // Context sets the context to be used in this call's Do method. 6759 func (c *EnterprisesGetCall) Context(ctx context.Context) *EnterprisesGetCall { 6760 c.ctx_ = ctx 6761 return c 6762 } 6763 6764 // Header returns a http.Header that can be modified by the caller to add 6765 // headers to the request. 6766 func (c *EnterprisesGetCall) Header() http.Header { 6767 if c.header_ == nil { 6768 c.header_ = make(http.Header) 6769 } 6770 return c.header_ 6771 } 6772 6773 func (c *EnterprisesGetCall) doRequest(alt string) (*http.Response, error) { 6774 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 6775 if c.ifNoneMatch_ != "" { 6776 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6777 } 6778 var body io.Reader = nil 6779 c.urlParams_.Set("alt", alt) 6780 c.urlParams_.Set("prettyPrint", "false") 6781 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 6782 urls += "?" + c.urlParams_.Encode() 6783 req, err := http.NewRequest("GET", urls, body) 6784 if err != nil { 6785 return nil, err 6786 } 6787 req.Header = reqHeaders 6788 googleapi.Expand(req.URL, map[string]string{ 6789 "name": c.name, 6790 }) 6791 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6792 } 6793 6794 // Do executes the "androidmanagement.enterprises.get" call. 6795 // Any non-2xx status code is an error. Response headers are in either 6796 // *Enterprise.ServerResponse.Header or (if a response was returned at all) in 6797 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6798 // whether the returned error was because http.StatusNotModified was returned. 6799 func (c *EnterprisesGetCall) Do(opts ...googleapi.CallOption) (*Enterprise, error) { 6800 gensupport.SetOptions(c.urlParams_, opts...) 6801 res, err := c.doRequest("json") 6802 if res != nil && res.StatusCode == http.StatusNotModified { 6803 if res.Body != nil { 6804 res.Body.Close() 6805 } 6806 return nil, gensupport.WrapError(&googleapi.Error{ 6807 Code: res.StatusCode, 6808 Header: res.Header, 6809 }) 6810 } 6811 if err != nil { 6812 return nil, err 6813 } 6814 defer googleapi.CloseBody(res) 6815 if err := googleapi.CheckResponse(res); err != nil { 6816 return nil, gensupport.WrapError(err) 6817 } 6818 ret := &Enterprise{ 6819 ServerResponse: googleapi.ServerResponse{ 6820 Header: res.Header, 6821 HTTPStatusCode: res.StatusCode, 6822 }, 6823 } 6824 target := &ret 6825 if err := gensupport.DecodeResponse(target, res); err != nil { 6826 return nil, err 6827 } 6828 return ret, nil 6829 } 6830 6831 type EnterprisesListCall struct { 6832 s *Service 6833 urlParams_ gensupport.URLParams 6834 ifNoneMatch_ string 6835 ctx_ context.Context 6836 header_ http.Header 6837 } 6838 6839 // List: Lists EMM-managed enterprises. Only BASIC fields are returned. 6840 func (r *EnterprisesService) List() *EnterprisesListCall { 6841 c := &EnterprisesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6842 return c 6843 } 6844 6845 // PageSize sets the optional parameter "pageSize": The requested page size. 6846 // The actual page size may be fixed to a min or max value. 6847 func (c *EnterprisesListCall) PageSize(pageSize int64) *EnterprisesListCall { 6848 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6849 return c 6850 } 6851 6852 // PageToken sets the optional parameter "pageToken": A token identifying a 6853 // page of results returned by the server. 6854 func (c *EnterprisesListCall) PageToken(pageToken string) *EnterprisesListCall { 6855 c.urlParams_.Set("pageToken", pageToken) 6856 return c 6857 } 6858 6859 // ProjectId sets the optional parameter "projectId": Required. The Cloud 6860 // project ID of the EMM managing the enterprises. 6861 func (c *EnterprisesListCall) ProjectId(projectId string) *EnterprisesListCall { 6862 c.urlParams_.Set("projectId", projectId) 6863 return c 6864 } 6865 6866 // View sets the optional parameter "view": Specifies which Enterprise fields 6867 // to return. This method only supports BASIC. 6868 // 6869 // Possible values: 6870 // 6871 // "ENTERPRISE_VIEW_UNSPECIFIED" - The API will default to the BASIC view for 6872 // 6873 // the List method. 6874 // 6875 // "BASIC" - Includes name and enterprise_display_name fields. 6876 func (c *EnterprisesListCall) View(view string) *EnterprisesListCall { 6877 c.urlParams_.Set("view", view) 6878 return c 6879 } 6880 6881 // Fields allows partial responses to be retrieved. See 6882 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6883 // details. 6884 func (c *EnterprisesListCall) Fields(s ...googleapi.Field) *EnterprisesListCall { 6885 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6886 return c 6887 } 6888 6889 // IfNoneMatch sets an optional parameter which makes the operation fail if the 6890 // object's ETag matches the given value. This is useful for getting updates 6891 // only after the object has changed since the last request. 6892 func (c *EnterprisesListCall) IfNoneMatch(entityTag string) *EnterprisesListCall { 6893 c.ifNoneMatch_ = entityTag 6894 return c 6895 } 6896 6897 // Context sets the context to be used in this call's Do method. 6898 func (c *EnterprisesListCall) Context(ctx context.Context) *EnterprisesListCall { 6899 c.ctx_ = ctx 6900 return c 6901 } 6902 6903 // Header returns a http.Header that can be modified by the caller to add 6904 // headers to the request. 6905 func (c *EnterprisesListCall) Header() http.Header { 6906 if c.header_ == nil { 6907 c.header_ = make(http.Header) 6908 } 6909 return c.header_ 6910 } 6911 6912 func (c *EnterprisesListCall) doRequest(alt string) (*http.Response, error) { 6913 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 6914 if c.ifNoneMatch_ != "" { 6915 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6916 } 6917 var body io.Reader = nil 6918 c.urlParams_.Set("alt", alt) 6919 c.urlParams_.Set("prettyPrint", "false") 6920 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/enterprises") 6921 urls += "?" + c.urlParams_.Encode() 6922 req, err := http.NewRequest("GET", urls, body) 6923 if err != nil { 6924 return nil, err 6925 } 6926 req.Header = reqHeaders 6927 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6928 } 6929 6930 // Do executes the "androidmanagement.enterprises.list" call. 6931 // Any non-2xx status code is an error. Response headers are in either 6932 // *ListEnterprisesResponse.ServerResponse.Header or (if a response was 6933 // returned at all) in error.(*googleapi.Error).Header. Use 6934 // googleapi.IsNotModified to check whether the returned error was because 6935 // http.StatusNotModified was returned. 6936 func (c *EnterprisesListCall) Do(opts ...googleapi.CallOption) (*ListEnterprisesResponse, error) { 6937 gensupport.SetOptions(c.urlParams_, opts...) 6938 res, err := c.doRequest("json") 6939 if res != nil && res.StatusCode == http.StatusNotModified { 6940 if res.Body != nil { 6941 res.Body.Close() 6942 } 6943 return nil, gensupport.WrapError(&googleapi.Error{ 6944 Code: res.StatusCode, 6945 Header: res.Header, 6946 }) 6947 } 6948 if err != nil { 6949 return nil, err 6950 } 6951 defer googleapi.CloseBody(res) 6952 if err := googleapi.CheckResponse(res); err != nil { 6953 return nil, gensupport.WrapError(err) 6954 } 6955 ret := &ListEnterprisesResponse{ 6956 ServerResponse: googleapi.ServerResponse{ 6957 Header: res.Header, 6958 HTTPStatusCode: res.StatusCode, 6959 }, 6960 } 6961 target := &ret 6962 if err := gensupport.DecodeResponse(target, res); err != nil { 6963 return nil, err 6964 } 6965 return ret, nil 6966 } 6967 6968 // Pages invokes f for each page of results. 6969 // A non-nil error returned from f will halt the iteration. 6970 // The provided context supersedes any context provided to the Context method. 6971 func (c *EnterprisesListCall) Pages(ctx context.Context, f func(*ListEnterprisesResponse) error) error { 6972 c.ctx_ = ctx 6973 defer c.PageToken(c.urlParams_.Get("pageToken")) 6974 for { 6975 x, err := c.Do() 6976 if err != nil { 6977 return err 6978 } 6979 if err := f(x); err != nil { 6980 return err 6981 } 6982 if x.NextPageToken == "" { 6983 return nil 6984 } 6985 c.PageToken(x.NextPageToken) 6986 } 6987 } 6988 6989 type EnterprisesPatchCall struct { 6990 s *Service 6991 name string 6992 enterprise *Enterprise 6993 urlParams_ gensupport.URLParams 6994 ctx_ context.Context 6995 header_ http.Header 6996 } 6997 6998 // Patch: Updates an enterprise. See also: SigninDetail 6999 // 7000 // - name: The name of the enterprise in the form enterprises/{enterpriseId}. 7001 func (r *EnterprisesService) Patch(name string, enterprise *Enterprise) *EnterprisesPatchCall { 7002 c := &EnterprisesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7003 c.name = name 7004 c.enterprise = enterprise 7005 return c 7006 } 7007 7008 // UpdateMask sets the optional parameter "updateMask": The field mask 7009 // indicating the fields to update. If not set, all modifiable fields will be 7010 // modified. 7011 func (c *EnterprisesPatchCall) UpdateMask(updateMask string) *EnterprisesPatchCall { 7012 c.urlParams_.Set("updateMask", updateMask) 7013 return c 7014 } 7015 7016 // Fields allows partial responses to be retrieved. See 7017 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7018 // details. 7019 func (c *EnterprisesPatchCall) Fields(s ...googleapi.Field) *EnterprisesPatchCall { 7020 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7021 return c 7022 } 7023 7024 // Context sets the context to be used in this call's Do method. 7025 func (c *EnterprisesPatchCall) Context(ctx context.Context) *EnterprisesPatchCall { 7026 c.ctx_ = ctx 7027 return c 7028 } 7029 7030 // Header returns a http.Header that can be modified by the caller to add 7031 // headers to the request. 7032 func (c *EnterprisesPatchCall) Header() http.Header { 7033 if c.header_ == nil { 7034 c.header_ = make(http.Header) 7035 } 7036 return c.header_ 7037 } 7038 7039 func (c *EnterprisesPatchCall) doRequest(alt string) (*http.Response, error) { 7040 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7041 var body io.Reader = nil 7042 body, err := googleapi.WithoutDataWrapper.JSONReader(c.enterprise) 7043 if err != nil { 7044 return nil, err 7045 } 7046 c.urlParams_.Set("alt", alt) 7047 c.urlParams_.Set("prettyPrint", "false") 7048 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 7049 urls += "?" + c.urlParams_.Encode() 7050 req, err := http.NewRequest("PATCH", urls, body) 7051 if err != nil { 7052 return nil, err 7053 } 7054 req.Header = reqHeaders 7055 googleapi.Expand(req.URL, map[string]string{ 7056 "name": c.name, 7057 }) 7058 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7059 } 7060 7061 // Do executes the "androidmanagement.enterprises.patch" call. 7062 // Any non-2xx status code is an error. Response headers are in either 7063 // *Enterprise.ServerResponse.Header or (if a response was returned at all) in 7064 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7065 // whether the returned error was because http.StatusNotModified was returned. 7066 func (c *EnterprisesPatchCall) Do(opts ...googleapi.CallOption) (*Enterprise, error) { 7067 gensupport.SetOptions(c.urlParams_, opts...) 7068 res, err := c.doRequest("json") 7069 if res != nil && res.StatusCode == http.StatusNotModified { 7070 if res.Body != nil { 7071 res.Body.Close() 7072 } 7073 return nil, gensupport.WrapError(&googleapi.Error{ 7074 Code: res.StatusCode, 7075 Header: res.Header, 7076 }) 7077 } 7078 if err != nil { 7079 return nil, err 7080 } 7081 defer googleapi.CloseBody(res) 7082 if err := googleapi.CheckResponse(res); err != nil { 7083 return nil, gensupport.WrapError(err) 7084 } 7085 ret := &Enterprise{ 7086 ServerResponse: googleapi.ServerResponse{ 7087 Header: res.Header, 7088 HTTPStatusCode: res.StatusCode, 7089 }, 7090 } 7091 target := &ret 7092 if err := gensupport.DecodeResponse(target, res); err != nil { 7093 return nil, err 7094 } 7095 return ret, nil 7096 } 7097 7098 type EnterprisesApplicationsGetCall struct { 7099 s *Service 7100 name string 7101 urlParams_ gensupport.URLParams 7102 ifNoneMatch_ string 7103 ctx_ context.Context 7104 header_ http.Header 7105 } 7106 7107 // Get: Gets info about an application. 7108 // 7109 // - name: The name of the application in the form 7110 // enterprises/{enterpriseId}/applications/{package_name}. 7111 func (r *EnterprisesApplicationsService) Get(name string) *EnterprisesApplicationsGetCall { 7112 c := &EnterprisesApplicationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7113 c.name = name 7114 return c 7115 } 7116 7117 // LanguageCode sets the optional parameter "languageCode": The preferred 7118 // language for localized application info, as a BCP47 tag (e.g. "en-US", 7119 // "de"). If not specified the default language of the application will be 7120 // used. 7121 func (c *EnterprisesApplicationsGetCall) LanguageCode(languageCode string) *EnterprisesApplicationsGetCall { 7122 c.urlParams_.Set("languageCode", languageCode) 7123 return c 7124 } 7125 7126 // Fields allows partial responses to be retrieved. See 7127 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7128 // details. 7129 func (c *EnterprisesApplicationsGetCall) Fields(s ...googleapi.Field) *EnterprisesApplicationsGetCall { 7130 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7131 return c 7132 } 7133 7134 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7135 // object's ETag matches the given value. This is useful for getting updates 7136 // only after the object has changed since the last request. 7137 func (c *EnterprisesApplicationsGetCall) IfNoneMatch(entityTag string) *EnterprisesApplicationsGetCall { 7138 c.ifNoneMatch_ = entityTag 7139 return c 7140 } 7141 7142 // Context sets the context to be used in this call's Do method. 7143 func (c *EnterprisesApplicationsGetCall) Context(ctx context.Context) *EnterprisesApplicationsGetCall { 7144 c.ctx_ = ctx 7145 return c 7146 } 7147 7148 // Header returns a http.Header that can be modified by the caller to add 7149 // headers to the request. 7150 func (c *EnterprisesApplicationsGetCall) Header() http.Header { 7151 if c.header_ == nil { 7152 c.header_ = make(http.Header) 7153 } 7154 return c.header_ 7155 } 7156 7157 func (c *EnterprisesApplicationsGetCall) doRequest(alt string) (*http.Response, error) { 7158 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7159 if c.ifNoneMatch_ != "" { 7160 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7161 } 7162 var body io.Reader = nil 7163 c.urlParams_.Set("alt", alt) 7164 c.urlParams_.Set("prettyPrint", "false") 7165 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 7166 urls += "?" + c.urlParams_.Encode() 7167 req, err := http.NewRequest("GET", urls, body) 7168 if err != nil { 7169 return nil, err 7170 } 7171 req.Header = reqHeaders 7172 googleapi.Expand(req.URL, map[string]string{ 7173 "name": c.name, 7174 }) 7175 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7176 } 7177 7178 // Do executes the "androidmanagement.enterprises.applications.get" call. 7179 // Any non-2xx status code is an error. Response headers are in either 7180 // *Application.ServerResponse.Header or (if a response was returned at all) in 7181 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7182 // whether the returned error was because http.StatusNotModified was returned. 7183 func (c *EnterprisesApplicationsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) { 7184 gensupport.SetOptions(c.urlParams_, opts...) 7185 res, err := c.doRequest("json") 7186 if res != nil && res.StatusCode == http.StatusNotModified { 7187 if res.Body != nil { 7188 res.Body.Close() 7189 } 7190 return nil, gensupport.WrapError(&googleapi.Error{ 7191 Code: res.StatusCode, 7192 Header: res.Header, 7193 }) 7194 } 7195 if err != nil { 7196 return nil, err 7197 } 7198 defer googleapi.CloseBody(res) 7199 if err := googleapi.CheckResponse(res); err != nil { 7200 return nil, gensupport.WrapError(err) 7201 } 7202 ret := &Application{ 7203 ServerResponse: googleapi.ServerResponse{ 7204 Header: res.Header, 7205 HTTPStatusCode: res.StatusCode, 7206 }, 7207 } 7208 target := &ret 7209 if err := gensupport.DecodeResponse(target, res); err != nil { 7210 return nil, err 7211 } 7212 return ret, nil 7213 } 7214 7215 type EnterprisesDevicesDeleteCall struct { 7216 s *Service 7217 name string 7218 urlParams_ gensupport.URLParams 7219 ctx_ context.Context 7220 header_ http.Header 7221 } 7222 7223 // Delete: Deletes a device. This operation wipes the device. Deleted devices 7224 // do not show up in enterprises.devices.list calls and a 404 is returned from 7225 // enterprises.devices.get. 7226 // 7227 // - name: The name of the device in the form 7228 // enterprises/{enterpriseId}/devices/{deviceId}. 7229 func (r *EnterprisesDevicesService) Delete(name string) *EnterprisesDevicesDeleteCall { 7230 c := &EnterprisesDevicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7231 c.name = name 7232 return c 7233 } 7234 7235 // WipeDataFlags sets the optional parameter "wipeDataFlags": Optional flags 7236 // that control the device wiping behavior. 7237 // 7238 // Possible values: 7239 // 7240 // "WIPE_DATA_FLAG_UNSPECIFIED" - This value is ignored. 7241 // "PRESERVE_RESET_PROTECTION_DATA" - Preserve the factory reset protection 7242 // 7243 // data on the device. 7244 // 7245 // "WIPE_EXTERNAL_STORAGE" - Additionally wipe the device's external storage 7246 // 7247 // (such as SD cards). 7248 func (c *EnterprisesDevicesDeleteCall) WipeDataFlags(wipeDataFlags ...string) *EnterprisesDevicesDeleteCall { 7249 c.urlParams_.SetMulti("wipeDataFlags", append([]string{}, wipeDataFlags...)) 7250 return c 7251 } 7252 7253 // WipeReasonMessage sets the optional parameter "wipeReasonMessage": A short 7254 // message displayed to the user before wiping the work profile on personal 7255 // devices. This has no effect on company owned devices. The maximum message 7256 // length is 200 characters. 7257 func (c *EnterprisesDevicesDeleteCall) WipeReasonMessage(wipeReasonMessage string) *EnterprisesDevicesDeleteCall { 7258 c.urlParams_.Set("wipeReasonMessage", wipeReasonMessage) 7259 return c 7260 } 7261 7262 // Fields allows partial responses to be retrieved. See 7263 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7264 // details. 7265 func (c *EnterprisesDevicesDeleteCall) Fields(s ...googleapi.Field) *EnterprisesDevicesDeleteCall { 7266 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7267 return c 7268 } 7269 7270 // Context sets the context to be used in this call's Do method. 7271 func (c *EnterprisesDevicesDeleteCall) Context(ctx context.Context) *EnterprisesDevicesDeleteCall { 7272 c.ctx_ = ctx 7273 return c 7274 } 7275 7276 // Header returns a http.Header that can be modified by the caller to add 7277 // headers to the request. 7278 func (c *EnterprisesDevicesDeleteCall) Header() http.Header { 7279 if c.header_ == nil { 7280 c.header_ = make(http.Header) 7281 } 7282 return c.header_ 7283 } 7284 7285 func (c *EnterprisesDevicesDeleteCall) doRequest(alt string) (*http.Response, error) { 7286 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7287 var body io.Reader = nil 7288 c.urlParams_.Set("alt", alt) 7289 c.urlParams_.Set("prettyPrint", "false") 7290 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 7291 urls += "?" + c.urlParams_.Encode() 7292 req, err := http.NewRequest("DELETE", urls, body) 7293 if err != nil { 7294 return nil, err 7295 } 7296 req.Header = reqHeaders 7297 googleapi.Expand(req.URL, map[string]string{ 7298 "name": c.name, 7299 }) 7300 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7301 } 7302 7303 // Do executes the "androidmanagement.enterprises.devices.delete" call. 7304 // Any non-2xx status code is an error. Response headers are in either 7305 // *Empty.ServerResponse.Header or (if a response was returned at all) in 7306 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7307 // whether the returned error was because http.StatusNotModified was returned. 7308 func (c *EnterprisesDevicesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 7309 gensupport.SetOptions(c.urlParams_, opts...) 7310 res, err := c.doRequest("json") 7311 if res != nil && res.StatusCode == http.StatusNotModified { 7312 if res.Body != nil { 7313 res.Body.Close() 7314 } 7315 return nil, gensupport.WrapError(&googleapi.Error{ 7316 Code: res.StatusCode, 7317 Header: res.Header, 7318 }) 7319 } 7320 if err != nil { 7321 return nil, err 7322 } 7323 defer googleapi.CloseBody(res) 7324 if err := googleapi.CheckResponse(res); err != nil { 7325 return nil, gensupport.WrapError(err) 7326 } 7327 ret := &Empty{ 7328 ServerResponse: googleapi.ServerResponse{ 7329 Header: res.Header, 7330 HTTPStatusCode: res.StatusCode, 7331 }, 7332 } 7333 target := &ret 7334 if err := gensupport.DecodeResponse(target, res); err != nil { 7335 return nil, err 7336 } 7337 return ret, nil 7338 } 7339 7340 type EnterprisesDevicesGetCall struct { 7341 s *Service 7342 name string 7343 urlParams_ gensupport.URLParams 7344 ifNoneMatch_ string 7345 ctx_ context.Context 7346 header_ http.Header 7347 } 7348 7349 // Get: Gets a device. Deleted devices will respond with a 404 error. 7350 // 7351 // - name: The name of the device in the form 7352 // enterprises/{enterpriseId}/devices/{deviceId}. 7353 func (r *EnterprisesDevicesService) Get(name string) *EnterprisesDevicesGetCall { 7354 c := &EnterprisesDevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7355 c.name = name 7356 return c 7357 } 7358 7359 // Fields allows partial responses to be retrieved. See 7360 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7361 // details. 7362 func (c *EnterprisesDevicesGetCall) Fields(s ...googleapi.Field) *EnterprisesDevicesGetCall { 7363 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7364 return c 7365 } 7366 7367 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7368 // object's ETag matches the given value. This is useful for getting updates 7369 // only after the object has changed since the last request. 7370 func (c *EnterprisesDevicesGetCall) IfNoneMatch(entityTag string) *EnterprisesDevicesGetCall { 7371 c.ifNoneMatch_ = entityTag 7372 return c 7373 } 7374 7375 // Context sets the context to be used in this call's Do method. 7376 func (c *EnterprisesDevicesGetCall) Context(ctx context.Context) *EnterprisesDevicesGetCall { 7377 c.ctx_ = ctx 7378 return c 7379 } 7380 7381 // Header returns a http.Header that can be modified by the caller to add 7382 // headers to the request. 7383 func (c *EnterprisesDevicesGetCall) Header() http.Header { 7384 if c.header_ == nil { 7385 c.header_ = make(http.Header) 7386 } 7387 return c.header_ 7388 } 7389 7390 func (c *EnterprisesDevicesGetCall) doRequest(alt string) (*http.Response, error) { 7391 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7392 if c.ifNoneMatch_ != "" { 7393 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7394 } 7395 var body io.Reader = nil 7396 c.urlParams_.Set("alt", alt) 7397 c.urlParams_.Set("prettyPrint", "false") 7398 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 7399 urls += "?" + c.urlParams_.Encode() 7400 req, err := http.NewRequest("GET", urls, body) 7401 if err != nil { 7402 return nil, err 7403 } 7404 req.Header = reqHeaders 7405 googleapi.Expand(req.URL, map[string]string{ 7406 "name": c.name, 7407 }) 7408 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7409 } 7410 7411 // Do executes the "androidmanagement.enterprises.devices.get" call. 7412 // Any non-2xx status code is an error. Response headers are in either 7413 // *Device.ServerResponse.Header or (if a response was returned at all) in 7414 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7415 // whether the returned error was because http.StatusNotModified was returned. 7416 func (c *EnterprisesDevicesGetCall) Do(opts ...googleapi.CallOption) (*Device, error) { 7417 gensupport.SetOptions(c.urlParams_, opts...) 7418 res, err := c.doRequest("json") 7419 if res != nil && res.StatusCode == http.StatusNotModified { 7420 if res.Body != nil { 7421 res.Body.Close() 7422 } 7423 return nil, gensupport.WrapError(&googleapi.Error{ 7424 Code: res.StatusCode, 7425 Header: res.Header, 7426 }) 7427 } 7428 if err != nil { 7429 return nil, err 7430 } 7431 defer googleapi.CloseBody(res) 7432 if err := googleapi.CheckResponse(res); err != nil { 7433 return nil, gensupport.WrapError(err) 7434 } 7435 ret := &Device{ 7436 ServerResponse: googleapi.ServerResponse{ 7437 Header: res.Header, 7438 HTTPStatusCode: res.StatusCode, 7439 }, 7440 } 7441 target := &ret 7442 if err := gensupport.DecodeResponse(target, res); err != nil { 7443 return nil, err 7444 } 7445 return ret, nil 7446 } 7447 7448 type EnterprisesDevicesIssueCommandCall struct { 7449 s *Service 7450 name string 7451 command *Command 7452 urlParams_ gensupport.URLParams 7453 ctx_ context.Context 7454 header_ http.Header 7455 } 7456 7457 // IssueCommand: Issues a command to a device. The Operation resource returned 7458 // contains a Command in its metadata field. Use the get operation method to 7459 // get the status of the command. 7460 // 7461 // - name: The name of the device in the form 7462 // enterprises/{enterpriseId}/devices/{deviceId}. 7463 func (r *EnterprisesDevicesService) IssueCommand(name string, command *Command) *EnterprisesDevicesIssueCommandCall { 7464 c := &EnterprisesDevicesIssueCommandCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7465 c.name = name 7466 c.command = command 7467 return c 7468 } 7469 7470 // Fields allows partial responses to be retrieved. See 7471 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7472 // details. 7473 func (c *EnterprisesDevicesIssueCommandCall) Fields(s ...googleapi.Field) *EnterprisesDevicesIssueCommandCall { 7474 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7475 return c 7476 } 7477 7478 // Context sets the context to be used in this call's Do method. 7479 func (c *EnterprisesDevicesIssueCommandCall) Context(ctx context.Context) *EnterprisesDevicesIssueCommandCall { 7480 c.ctx_ = ctx 7481 return c 7482 } 7483 7484 // Header returns a http.Header that can be modified by the caller to add 7485 // headers to the request. 7486 func (c *EnterprisesDevicesIssueCommandCall) Header() http.Header { 7487 if c.header_ == nil { 7488 c.header_ = make(http.Header) 7489 } 7490 return c.header_ 7491 } 7492 7493 func (c *EnterprisesDevicesIssueCommandCall) doRequest(alt string) (*http.Response, error) { 7494 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7495 var body io.Reader = nil 7496 body, err := googleapi.WithoutDataWrapper.JSONReader(c.command) 7497 if err != nil { 7498 return nil, err 7499 } 7500 c.urlParams_.Set("alt", alt) 7501 c.urlParams_.Set("prettyPrint", "false") 7502 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:issueCommand") 7503 urls += "?" + c.urlParams_.Encode() 7504 req, err := http.NewRequest("POST", urls, body) 7505 if err != nil { 7506 return nil, err 7507 } 7508 req.Header = reqHeaders 7509 googleapi.Expand(req.URL, map[string]string{ 7510 "name": c.name, 7511 }) 7512 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7513 } 7514 7515 // Do executes the "androidmanagement.enterprises.devices.issueCommand" call. 7516 // Any non-2xx status code is an error. Response headers are in either 7517 // *Operation.ServerResponse.Header or (if a response was returned at all) in 7518 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7519 // whether the returned error was because http.StatusNotModified was returned. 7520 func (c *EnterprisesDevicesIssueCommandCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7521 gensupport.SetOptions(c.urlParams_, opts...) 7522 res, err := c.doRequest("json") 7523 if res != nil && res.StatusCode == http.StatusNotModified { 7524 if res.Body != nil { 7525 res.Body.Close() 7526 } 7527 return nil, gensupport.WrapError(&googleapi.Error{ 7528 Code: res.StatusCode, 7529 Header: res.Header, 7530 }) 7531 } 7532 if err != nil { 7533 return nil, err 7534 } 7535 defer googleapi.CloseBody(res) 7536 if err := googleapi.CheckResponse(res); err != nil { 7537 return nil, gensupport.WrapError(err) 7538 } 7539 ret := &Operation{ 7540 ServerResponse: googleapi.ServerResponse{ 7541 Header: res.Header, 7542 HTTPStatusCode: res.StatusCode, 7543 }, 7544 } 7545 target := &ret 7546 if err := gensupport.DecodeResponse(target, res); err != nil { 7547 return nil, err 7548 } 7549 return ret, nil 7550 } 7551 7552 type EnterprisesDevicesListCall struct { 7553 s *Service 7554 parent string 7555 urlParams_ gensupport.URLParams 7556 ifNoneMatch_ string 7557 ctx_ context.Context 7558 header_ http.Header 7559 } 7560 7561 // List: Lists devices for a given enterprise. Deleted devices are not returned 7562 // in the response. 7563 // 7564 // - parent: The name of the enterprise in the form enterprises/{enterpriseId}. 7565 func (r *EnterprisesDevicesService) List(parent string) *EnterprisesDevicesListCall { 7566 c := &EnterprisesDevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7567 c.parent = parent 7568 return c 7569 } 7570 7571 // PageSize sets the optional parameter "pageSize": The requested page size. 7572 // The actual page size may be fixed to a min or max value. 7573 func (c *EnterprisesDevicesListCall) PageSize(pageSize int64) *EnterprisesDevicesListCall { 7574 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7575 return c 7576 } 7577 7578 // PageToken sets the optional parameter "pageToken": A token identifying a 7579 // page of results returned by the server. 7580 func (c *EnterprisesDevicesListCall) PageToken(pageToken string) *EnterprisesDevicesListCall { 7581 c.urlParams_.Set("pageToken", pageToken) 7582 return c 7583 } 7584 7585 // Fields allows partial responses to be retrieved. See 7586 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7587 // details. 7588 func (c *EnterprisesDevicesListCall) Fields(s ...googleapi.Field) *EnterprisesDevicesListCall { 7589 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7590 return c 7591 } 7592 7593 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7594 // object's ETag matches the given value. This is useful for getting updates 7595 // only after the object has changed since the last request. 7596 func (c *EnterprisesDevicesListCall) IfNoneMatch(entityTag string) *EnterprisesDevicesListCall { 7597 c.ifNoneMatch_ = entityTag 7598 return c 7599 } 7600 7601 // Context sets the context to be used in this call's Do method. 7602 func (c *EnterprisesDevicesListCall) Context(ctx context.Context) *EnterprisesDevicesListCall { 7603 c.ctx_ = ctx 7604 return c 7605 } 7606 7607 // Header returns a http.Header that can be modified by the caller to add 7608 // headers to the request. 7609 func (c *EnterprisesDevicesListCall) Header() http.Header { 7610 if c.header_ == nil { 7611 c.header_ = make(http.Header) 7612 } 7613 return c.header_ 7614 } 7615 7616 func (c *EnterprisesDevicesListCall) doRequest(alt string) (*http.Response, error) { 7617 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7618 if c.ifNoneMatch_ != "" { 7619 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7620 } 7621 var body io.Reader = nil 7622 c.urlParams_.Set("alt", alt) 7623 c.urlParams_.Set("prettyPrint", "false") 7624 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/devices") 7625 urls += "?" + c.urlParams_.Encode() 7626 req, err := http.NewRequest("GET", urls, body) 7627 if err != nil { 7628 return nil, err 7629 } 7630 req.Header = reqHeaders 7631 googleapi.Expand(req.URL, map[string]string{ 7632 "parent": c.parent, 7633 }) 7634 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7635 } 7636 7637 // Do executes the "androidmanagement.enterprises.devices.list" call. 7638 // Any non-2xx status code is an error. Response headers are in either 7639 // *ListDevicesResponse.ServerResponse.Header or (if a response was returned at 7640 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7641 // check whether the returned error was because http.StatusNotModified was 7642 // returned. 7643 func (c *EnterprisesDevicesListCall) Do(opts ...googleapi.CallOption) (*ListDevicesResponse, error) { 7644 gensupport.SetOptions(c.urlParams_, opts...) 7645 res, err := c.doRequest("json") 7646 if res != nil && res.StatusCode == http.StatusNotModified { 7647 if res.Body != nil { 7648 res.Body.Close() 7649 } 7650 return nil, gensupport.WrapError(&googleapi.Error{ 7651 Code: res.StatusCode, 7652 Header: res.Header, 7653 }) 7654 } 7655 if err != nil { 7656 return nil, err 7657 } 7658 defer googleapi.CloseBody(res) 7659 if err := googleapi.CheckResponse(res); err != nil { 7660 return nil, gensupport.WrapError(err) 7661 } 7662 ret := &ListDevicesResponse{ 7663 ServerResponse: googleapi.ServerResponse{ 7664 Header: res.Header, 7665 HTTPStatusCode: res.StatusCode, 7666 }, 7667 } 7668 target := &ret 7669 if err := gensupport.DecodeResponse(target, res); err != nil { 7670 return nil, err 7671 } 7672 return ret, nil 7673 } 7674 7675 // Pages invokes f for each page of results. 7676 // A non-nil error returned from f will halt the iteration. 7677 // The provided context supersedes any context provided to the Context method. 7678 func (c *EnterprisesDevicesListCall) Pages(ctx context.Context, f func(*ListDevicesResponse) error) error { 7679 c.ctx_ = ctx 7680 defer c.PageToken(c.urlParams_.Get("pageToken")) 7681 for { 7682 x, err := c.Do() 7683 if err != nil { 7684 return err 7685 } 7686 if err := f(x); err != nil { 7687 return err 7688 } 7689 if x.NextPageToken == "" { 7690 return nil 7691 } 7692 c.PageToken(x.NextPageToken) 7693 } 7694 } 7695 7696 type EnterprisesDevicesPatchCall struct { 7697 s *Service 7698 name string 7699 device *Device 7700 urlParams_ gensupport.URLParams 7701 ctx_ context.Context 7702 header_ http.Header 7703 } 7704 7705 // Patch: Updates a device. 7706 // 7707 // - name: The name of the device in the form 7708 // enterprises/{enterpriseId}/devices/{deviceId}. 7709 func (r *EnterprisesDevicesService) Patch(name string, device *Device) *EnterprisesDevicesPatchCall { 7710 c := &EnterprisesDevicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7711 c.name = name 7712 c.device = device 7713 return c 7714 } 7715 7716 // UpdateMask sets the optional parameter "updateMask": The field mask 7717 // indicating the fields to update. If not set, all modifiable fields will be 7718 // modified. 7719 func (c *EnterprisesDevicesPatchCall) UpdateMask(updateMask string) *EnterprisesDevicesPatchCall { 7720 c.urlParams_.Set("updateMask", updateMask) 7721 return c 7722 } 7723 7724 // Fields allows partial responses to be retrieved. See 7725 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7726 // details. 7727 func (c *EnterprisesDevicesPatchCall) Fields(s ...googleapi.Field) *EnterprisesDevicesPatchCall { 7728 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7729 return c 7730 } 7731 7732 // Context sets the context to be used in this call's Do method. 7733 func (c *EnterprisesDevicesPatchCall) Context(ctx context.Context) *EnterprisesDevicesPatchCall { 7734 c.ctx_ = ctx 7735 return c 7736 } 7737 7738 // Header returns a http.Header that can be modified by the caller to add 7739 // headers to the request. 7740 func (c *EnterprisesDevicesPatchCall) Header() http.Header { 7741 if c.header_ == nil { 7742 c.header_ = make(http.Header) 7743 } 7744 return c.header_ 7745 } 7746 7747 func (c *EnterprisesDevicesPatchCall) doRequest(alt string) (*http.Response, error) { 7748 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7749 var body io.Reader = nil 7750 body, err := googleapi.WithoutDataWrapper.JSONReader(c.device) 7751 if err != nil { 7752 return nil, err 7753 } 7754 c.urlParams_.Set("alt", alt) 7755 c.urlParams_.Set("prettyPrint", "false") 7756 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 7757 urls += "?" + c.urlParams_.Encode() 7758 req, err := http.NewRequest("PATCH", urls, body) 7759 if err != nil { 7760 return nil, err 7761 } 7762 req.Header = reqHeaders 7763 googleapi.Expand(req.URL, map[string]string{ 7764 "name": c.name, 7765 }) 7766 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7767 } 7768 7769 // Do executes the "androidmanagement.enterprises.devices.patch" call. 7770 // Any non-2xx status code is an error. Response headers are in either 7771 // *Device.ServerResponse.Header or (if a response was returned at all) in 7772 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7773 // whether the returned error was because http.StatusNotModified was returned. 7774 func (c *EnterprisesDevicesPatchCall) Do(opts ...googleapi.CallOption) (*Device, error) { 7775 gensupport.SetOptions(c.urlParams_, opts...) 7776 res, err := c.doRequest("json") 7777 if res != nil && res.StatusCode == http.StatusNotModified { 7778 if res.Body != nil { 7779 res.Body.Close() 7780 } 7781 return nil, gensupport.WrapError(&googleapi.Error{ 7782 Code: res.StatusCode, 7783 Header: res.Header, 7784 }) 7785 } 7786 if err != nil { 7787 return nil, err 7788 } 7789 defer googleapi.CloseBody(res) 7790 if err := googleapi.CheckResponse(res); err != nil { 7791 return nil, gensupport.WrapError(err) 7792 } 7793 ret := &Device{ 7794 ServerResponse: googleapi.ServerResponse{ 7795 Header: res.Header, 7796 HTTPStatusCode: res.StatusCode, 7797 }, 7798 } 7799 target := &ret 7800 if err := gensupport.DecodeResponse(target, res); err != nil { 7801 return nil, err 7802 } 7803 return ret, nil 7804 } 7805 7806 type EnterprisesDevicesOperationsCancelCall struct { 7807 s *Service 7808 name string 7809 urlParams_ gensupport.URLParams 7810 ctx_ context.Context 7811 header_ http.Header 7812 } 7813 7814 // Cancel: Starts asynchronous cancellation on a long-running operation. The 7815 // server makes a best effort to cancel the operation, but success is not 7816 // guaranteed. If the server doesn't support this method, it returns 7817 // google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or 7818 // other methods to check whether the cancellation succeeded or whether the 7819 // operation completed despite cancellation. On successful cancellation, the 7820 // operation is not deleted; instead, it becomes an operation with an 7821 // Operation.error value with a google.rpc.Status.code of 1, corresponding to 7822 // Code.CANCELLED. 7823 // 7824 // - name: The name of the operation resource to be cancelled. 7825 func (r *EnterprisesDevicesOperationsService) Cancel(name string) *EnterprisesDevicesOperationsCancelCall { 7826 c := &EnterprisesDevicesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7827 c.name = name 7828 return c 7829 } 7830 7831 // Fields allows partial responses to be retrieved. See 7832 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7833 // details. 7834 func (c *EnterprisesDevicesOperationsCancelCall) Fields(s ...googleapi.Field) *EnterprisesDevicesOperationsCancelCall { 7835 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7836 return c 7837 } 7838 7839 // Context sets the context to be used in this call's Do method. 7840 func (c *EnterprisesDevicesOperationsCancelCall) Context(ctx context.Context) *EnterprisesDevicesOperationsCancelCall { 7841 c.ctx_ = ctx 7842 return c 7843 } 7844 7845 // Header returns a http.Header that can be modified by the caller to add 7846 // headers to the request. 7847 func (c *EnterprisesDevicesOperationsCancelCall) Header() http.Header { 7848 if c.header_ == nil { 7849 c.header_ = make(http.Header) 7850 } 7851 return c.header_ 7852 } 7853 7854 func (c *EnterprisesDevicesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 7855 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7856 var body io.Reader = nil 7857 c.urlParams_.Set("alt", alt) 7858 c.urlParams_.Set("prettyPrint", "false") 7859 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") 7860 urls += "?" + c.urlParams_.Encode() 7861 req, err := http.NewRequest("POST", urls, body) 7862 if err != nil { 7863 return nil, err 7864 } 7865 req.Header = reqHeaders 7866 googleapi.Expand(req.URL, map[string]string{ 7867 "name": c.name, 7868 }) 7869 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7870 } 7871 7872 // Do executes the "androidmanagement.enterprises.devices.operations.cancel" call. 7873 // Any non-2xx status code is an error. Response headers are in either 7874 // *Empty.ServerResponse.Header or (if a response was returned at all) in 7875 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7876 // whether the returned error was because http.StatusNotModified was returned. 7877 func (c *EnterprisesDevicesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 7878 gensupport.SetOptions(c.urlParams_, opts...) 7879 res, err := c.doRequest("json") 7880 if res != nil && res.StatusCode == http.StatusNotModified { 7881 if res.Body != nil { 7882 res.Body.Close() 7883 } 7884 return nil, gensupport.WrapError(&googleapi.Error{ 7885 Code: res.StatusCode, 7886 Header: res.Header, 7887 }) 7888 } 7889 if err != nil { 7890 return nil, err 7891 } 7892 defer googleapi.CloseBody(res) 7893 if err := googleapi.CheckResponse(res); err != nil { 7894 return nil, gensupport.WrapError(err) 7895 } 7896 ret := &Empty{ 7897 ServerResponse: googleapi.ServerResponse{ 7898 Header: res.Header, 7899 HTTPStatusCode: res.StatusCode, 7900 }, 7901 } 7902 target := &ret 7903 if err := gensupport.DecodeResponse(target, res); err != nil { 7904 return nil, err 7905 } 7906 return ret, nil 7907 } 7908 7909 type EnterprisesDevicesOperationsGetCall struct { 7910 s *Service 7911 name string 7912 urlParams_ gensupport.URLParams 7913 ifNoneMatch_ string 7914 ctx_ context.Context 7915 header_ http.Header 7916 } 7917 7918 // Get: Gets the latest state of a long-running operation. Clients can use this 7919 // method to poll the operation result at intervals as recommended by the API 7920 // service. 7921 // 7922 // - name: The name of the operation resource. 7923 func (r *EnterprisesDevicesOperationsService) Get(name string) *EnterprisesDevicesOperationsGetCall { 7924 c := &EnterprisesDevicesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7925 c.name = name 7926 return c 7927 } 7928 7929 // Fields allows partial responses to be retrieved. See 7930 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7931 // details. 7932 func (c *EnterprisesDevicesOperationsGetCall) Fields(s ...googleapi.Field) *EnterprisesDevicesOperationsGetCall { 7933 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7934 return c 7935 } 7936 7937 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7938 // object's ETag matches the given value. This is useful for getting updates 7939 // only after the object has changed since the last request. 7940 func (c *EnterprisesDevicesOperationsGetCall) IfNoneMatch(entityTag string) *EnterprisesDevicesOperationsGetCall { 7941 c.ifNoneMatch_ = entityTag 7942 return c 7943 } 7944 7945 // Context sets the context to be used in this call's Do method. 7946 func (c *EnterprisesDevicesOperationsGetCall) Context(ctx context.Context) *EnterprisesDevicesOperationsGetCall { 7947 c.ctx_ = ctx 7948 return c 7949 } 7950 7951 // Header returns a http.Header that can be modified by the caller to add 7952 // headers to the request. 7953 func (c *EnterprisesDevicesOperationsGetCall) Header() http.Header { 7954 if c.header_ == nil { 7955 c.header_ = make(http.Header) 7956 } 7957 return c.header_ 7958 } 7959 7960 func (c *EnterprisesDevicesOperationsGetCall) doRequest(alt string) (*http.Response, error) { 7961 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7962 if c.ifNoneMatch_ != "" { 7963 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7964 } 7965 var body io.Reader = nil 7966 c.urlParams_.Set("alt", alt) 7967 c.urlParams_.Set("prettyPrint", "false") 7968 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 7969 urls += "?" + c.urlParams_.Encode() 7970 req, err := http.NewRequest("GET", urls, body) 7971 if err != nil { 7972 return nil, err 7973 } 7974 req.Header = reqHeaders 7975 googleapi.Expand(req.URL, map[string]string{ 7976 "name": c.name, 7977 }) 7978 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7979 } 7980 7981 // Do executes the "androidmanagement.enterprises.devices.operations.get" call. 7982 // Any non-2xx status code is an error. Response headers are in either 7983 // *Operation.ServerResponse.Header or (if a response was returned at all) in 7984 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7985 // whether the returned error was because http.StatusNotModified was returned. 7986 func (c *EnterprisesDevicesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7987 gensupport.SetOptions(c.urlParams_, opts...) 7988 res, err := c.doRequest("json") 7989 if res != nil && res.StatusCode == http.StatusNotModified { 7990 if res.Body != nil { 7991 res.Body.Close() 7992 } 7993 return nil, gensupport.WrapError(&googleapi.Error{ 7994 Code: res.StatusCode, 7995 Header: res.Header, 7996 }) 7997 } 7998 if err != nil { 7999 return nil, err 8000 } 8001 defer googleapi.CloseBody(res) 8002 if err := googleapi.CheckResponse(res); err != nil { 8003 return nil, gensupport.WrapError(err) 8004 } 8005 ret := &Operation{ 8006 ServerResponse: googleapi.ServerResponse{ 8007 Header: res.Header, 8008 HTTPStatusCode: res.StatusCode, 8009 }, 8010 } 8011 target := &ret 8012 if err := gensupport.DecodeResponse(target, res); err != nil { 8013 return nil, err 8014 } 8015 return ret, nil 8016 } 8017 8018 type EnterprisesDevicesOperationsListCall struct { 8019 s *Service 8020 name string 8021 urlParams_ gensupport.URLParams 8022 ifNoneMatch_ string 8023 ctx_ context.Context 8024 header_ http.Header 8025 } 8026 8027 // List: Lists operations that match the specified filter in the request. If 8028 // the server doesn't support this method, it returns UNIMPLEMENTED. 8029 // 8030 // - name: The name of the operation's parent resource. 8031 func (r *EnterprisesDevicesOperationsService) List(name string) *EnterprisesDevicesOperationsListCall { 8032 c := &EnterprisesDevicesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8033 c.name = name 8034 return c 8035 } 8036 8037 // Filter sets the optional parameter "filter": The standard list filter. 8038 func (c *EnterprisesDevicesOperationsListCall) Filter(filter string) *EnterprisesDevicesOperationsListCall { 8039 c.urlParams_.Set("filter", filter) 8040 return c 8041 } 8042 8043 // PageSize sets the optional parameter "pageSize": The standard list page 8044 // size. 8045 func (c *EnterprisesDevicesOperationsListCall) PageSize(pageSize int64) *EnterprisesDevicesOperationsListCall { 8046 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8047 return c 8048 } 8049 8050 // PageToken sets the optional parameter "pageToken": The standard list page 8051 // token. 8052 func (c *EnterprisesDevicesOperationsListCall) PageToken(pageToken string) *EnterprisesDevicesOperationsListCall { 8053 c.urlParams_.Set("pageToken", pageToken) 8054 return c 8055 } 8056 8057 // Fields allows partial responses to be retrieved. See 8058 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8059 // details. 8060 func (c *EnterprisesDevicesOperationsListCall) Fields(s ...googleapi.Field) *EnterprisesDevicesOperationsListCall { 8061 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8062 return c 8063 } 8064 8065 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8066 // object's ETag matches the given value. This is useful for getting updates 8067 // only after the object has changed since the last request. 8068 func (c *EnterprisesDevicesOperationsListCall) IfNoneMatch(entityTag string) *EnterprisesDevicesOperationsListCall { 8069 c.ifNoneMatch_ = entityTag 8070 return c 8071 } 8072 8073 // Context sets the context to be used in this call's Do method. 8074 func (c *EnterprisesDevicesOperationsListCall) Context(ctx context.Context) *EnterprisesDevicesOperationsListCall { 8075 c.ctx_ = ctx 8076 return c 8077 } 8078 8079 // Header returns a http.Header that can be modified by the caller to add 8080 // headers to the request. 8081 func (c *EnterprisesDevicesOperationsListCall) Header() http.Header { 8082 if c.header_ == nil { 8083 c.header_ = make(http.Header) 8084 } 8085 return c.header_ 8086 } 8087 8088 func (c *EnterprisesDevicesOperationsListCall) doRequest(alt string) (*http.Response, error) { 8089 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8090 if c.ifNoneMatch_ != "" { 8091 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8092 } 8093 var body io.Reader = nil 8094 c.urlParams_.Set("alt", alt) 8095 c.urlParams_.Set("prettyPrint", "false") 8096 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 8097 urls += "?" + c.urlParams_.Encode() 8098 req, err := http.NewRequest("GET", urls, body) 8099 if err != nil { 8100 return nil, err 8101 } 8102 req.Header = reqHeaders 8103 googleapi.Expand(req.URL, map[string]string{ 8104 "name": c.name, 8105 }) 8106 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8107 } 8108 8109 // Do executes the "androidmanagement.enterprises.devices.operations.list" call. 8110 // Any non-2xx status code is an error. Response headers are in either 8111 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned 8112 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8113 // check whether the returned error was because http.StatusNotModified was 8114 // returned. 8115 func (c *EnterprisesDevicesOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 8116 gensupport.SetOptions(c.urlParams_, opts...) 8117 res, err := c.doRequest("json") 8118 if res != nil && res.StatusCode == http.StatusNotModified { 8119 if res.Body != nil { 8120 res.Body.Close() 8121 } 8122 return nil, gensupport.WrapError(&googleapi.Error{ 8123 Code: res.StatusCode, 8124 Header: res.Header, 8125 }) 8126 } 8127 if err != nil { 8128 return nil, err 8129 } 8130 defer googleapi.CloseBody(res) 8131 if err := googleapi.CheckResponse(res); err != nil { 8132 return nil, gensupport.WrapError(err) 8133 } 8134 ret := &ListOperationsResponse{ 8135 ServerResponse: googleapi.ServerResponse{ 8136 Header: res.Header, 8137 HTTPStatusCode: res.StatusCode, 8138 }, 8139 } 8140 target := &ret 8141 if err := gensupport.DecodeResponse(target, res); err != nil { 8142 return nil, err 8143 } 8144 return ret, nil 8145 } 8146 8147 // Pages invokes f for each page of results. 8148 // A non-nil error returned from f will halt the iteration. 8149 // The provided context supersedes any context provided to the Context method. 8150 func (c *EnterprisesDevicesOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 8151 c.ctx_ = ctx 8152 defer c.PageToken(c.urlParams_.Get("pageToken")) 8153 for { 8154 x, err := c.Do() 8155 if err != nil { 8156 return err 8157 } 8158 if err := f(x); err != nil { 8159 return err 8160 } 8161 if x.NextPageToken == "" { 8162 return nil 8163 } 8164 c.PageToken(x.NextPageToken) 8165 } 8166 } 8167 8168 type EnterprisesEnrollmentTokensCreateCall struct { 8169 s *Service 8170 parent string 8171 enrollmenttoken *EnrollmentToken 8172 urlParams_ gensupport.URLParams 8173 ctx_ context.Context 8174 header_ http.Header 8175 } 8176 8177 // Create: Creates an enrollment token for a given enterprise. It's up to the 8178 // caller's responsibility to manage the lifecycle of newly created tokens and 8179 // deleting them when they're not intended to be used anymore. Once an 8180 // enrollment token has been created, it's not possible to retrieve the token's 8181 // content anymore using AM API. It is recommended for EMMs to securely store 8182 // the token if it's intended to be reused. 8183 // 8184 // - parent: The name of the enterprise in the form enterprises/{enterpriseId}. 8185 func (r *EnterprisesEnrollmentTokensService) Create(parent string, enrollmenttoken *EnrollmentToken) *EnterprisesEnrollmentTokensCreateCall { 8186 c := &EnterprisesEnrollmentTokensCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8187 c.parent = parent 8188 c.enrollmenttoken = enrollmenttoken 8189 return c 8190 } 8191 8192 // Fields allows partial responses to be retrieved. See 8193 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8194 // details. 8195 func (c *EnterprisesEnrollmentTokensCreateCall) Fields(s ...googleapi.Field) *EnterprisesEnrollmentTokensCreateCall { 8196 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8197 return c 8198 } 8199 8200 // Context sets the context to be used in this call's Do method. 8201 func (c *EnterprisesEnrollmentTokensCreateCall) Context(ctx context.Context) *EnterprisesEnrollmentTokensCreateCall { 8202 c.ctx_ = ctx 8203 return c 8204 } 8205 8206 // Header returns a http.Header that can be modified by the caller to add 8207 // headers to the request. 8208 func (c *EnterprisesEnrollmentTokensCreateCall) Header() http.Header { 8209 if c.header_ == nil { 8210 c.header_ = make(http.Header) 8211 } 8212 return c.header_ 8213 } 8214 8215 func (c *EnterprisesEnrollmentTokensCreateCall) doRequest(alt string) (*http.Response, error) { 8216 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8217 var body io.Reader = nil 8218 body, err := googleapi.WithoutDataWrapper.JSONReader(c.enrollmenttoken) 8219 if err != nil { 8220 return nil, err 8221 } 8222 c.urlParams_.Set("alt", alt) 8223 c.urlParams_.Set("prettyPrint", "false") 8224 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/enrollmentTokens") 8225 urls += "?" + c.urlParams_.Encode() 8226 req, err := http.NewRequest("POST", urls, body) 8227 if err != nil { 8228 return nil, err 8229 } 8230 req.Header = reqHeaders 8231 googleapi.Expand(req.URL, map[string]string{ 8232 "parent": c.parent, 8233 }) 8234 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8235 } 8236 8237 // Do executes the "androidmanagement.enterprises.enrollmentTokens.create" call. 8238 // Any non-2xx status code is an error. Response headers are in either 8239 // *EnrollmentToken.ServerResponse.Header or (if a response was returned at 8240 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8241 // check whether the returned error was because http.StatusNotModified was 8242 // returned. 8243 func (c *EnterprisesEnrollmentTokensCreateCall) Do(opts ...googleapi.CallOption) (*EnrollmentToken, error) { 8244 gensupport.SetOptions(c.urlParams_, opts...) 8245 res, err := c.doRequest("json") 8246 if res != nil && res.StatusCode == http.StatusNotModified { 8247 if res.Body != nil { 8248 res.Body.Close() 8249 } 8250 return nil, gensupport.WrapError(&googleapi.Error{ 8251 Code: res.StatusCode, 8252 Header: res.Header, 8253 }) 8254 } 8255 if err != nil { 8256 return nil, err 8257 } 8258 defer googleapi.CloseBody(res) 8259 if err := googleapi.CheckResponse(res); err != nil { 8260 return nil, gensupport.WrapError(err) 8261 } 8262 ret := &EnrollmentToken{ 8263 ServerResponse: googleapi.ServerResponse{ 8264 Header: res.Header, 8265 HTTPStatusCode: res.StatusCode, 8266 }, 8267 } 8268 target := &ret 8269 if err := gensupport.DecodeResponse(target, res); err != nil { 8270 return nil, err 8271 } 8272 return ret, nil 8273 } 8274 8275 type EnterprisesEnrollmentTokensDeleteCall struct { 8276 s *Service 8277 name string 8278 urlParams_ gensupport.URLParams 8279 ctx_ context.Context 8280 header_ http.Header 8281 } 8282 8283 // Delete: Deletes an enrollment token. This operation invalidates the token, 8284 // preventing its future use. 8285 // 8286 // - name: The name of the enrollment token in the form 8287 // enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}. 8288 func (r *EnterprisesEnrollmentTokensService) Delete(name string) *EnterprisesEnrollmentTokensDeleteCall { 8289 c := &EnterprisesEnrollmentTokensDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8290 c.name = name 8291 return c 8292 } 8293 8294 // Fields allows partial responses to be retrieved. See 8295 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8296 // details. 8297 func (c *EnterprisesEnrollmentTokensDeleteCall) Fields(s ...googleapi.Field) *EnterprisesEnrollmentTokensDeleteCall { 8298 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8299 return c 8300 } 8301 8302 // Context sets the context to be used in this call's Do method. 8303 func (c *EnterprisesEnrollmentTokensDeleteCall) Context(ctx context.Context) *EnterprisesEnrollmentTokensDeleteCall { 8304 c.ctx_ = ctx 8305 return c 8306 } 8307 8308 // Header returns a http.Header that can be modified by the caller to add 8309 // headers to the request. 8310 func (c *EnterprisesEnrollmentTokensDeleteCall) Header() http.Header { 8311 if c.header_ == nil { 8312 c.header_ = make(http.Header) 8313 } 8314 return c.header_ 8315 } 8316 8317 func (c *EnterprisesEnrollmentTokensDeleteCall) doRequest(alt string) (*http.Response, error) { 8318 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8319 var body io.Reader = nil 8320 c.urlParams_.Set("alt", alt) 8321 c.urlParams_.Set("prettyPrint", "false") 8322 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 8323 urls += "?" + c.urlParams_.Encode() 8324 req, err := http.NewRequest("DELETE", urls, body) 8325 if err != nil { 8326 return nil, err 8327 } 8328 req.Header = reqHeaders 8329 googleapi.Expand(req.URL, map[string]string{ 8330 "name": c.name, 8331 }) 8332 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8333 } 8334 8335 // Do executes the "androidmanagement.enterprises.enrollmentTokens.delete" call. 8336 // Any non-2xx status code is an error. Response headers are in either 8337 // *Empty.ServerResponse.Header or (if a response was returned at all) in 8338 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8339 // whether the returned error was because http.StatusNotModified was returned. 8340 func (c *EnterprisesEnrollmentTokensDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 8341 gensupport.SetOptions(c.urlParams_, opts...) 8342 res, err := c.doRequest("json") 8343 if res != nil && res.StatusCode == http.StatusNotModified { 8344 if res.Body != nil { 8345 res.Body.Close() 8346 } 8347 return nil, gensupport.WrapError(&googleapi.Error{ 8348 Code: res.StatusCode, 8349 Header: res.Header, 8350 }) 8351 } 8352 if err != nil { 8353 return nil, err 8354 } 8355 defer googleapi.CloseBody(res) 8356 if err := googleapi.CheckResponse(res); err != nil { 8357 return nil, gensupport.WrapError(err) 8358 } 8359 ret := &Empty{ 8360 ServerResponse: googleapi.ServerResponse{ 8361 Header: res.Header, 8362 HTTPStatusCode: res.StatusCode, 8363 }, 8364 } 8365 target := &ret 8366 if err := gensupport.DecodeResponse(target, res); err != nil { 8367 return nil, err 8368 } 8369 return ret, nil 8370 } 8371 8372 type EnterprisesEnrollmentTokensGetCall struct { 8373 s *Service 8374 name string 8375 urlParams_ gensupport.URLParams 8376 ifNoneMatch_ string 8377 ctx_ context.Context 8378 header_ http.Header 8379 } 8380 8381 // Get: Gets an active, unexpired enrollment token. Only a partial view of 8382 // EnrollmentToken is returned: all the fields but name and 8383 // expiration_timestamp are empty. This method is meant to help manage active 8384 // enrollment tokens lifecycle. For security reasons, it's recommended to 8385 // delete active enrollment tokens as soon as they're not intended to be used 8386 // anymore. 8387 // 8388 // - name: The name of the enrollment token in the form 8389 // enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}. 8390 func (r *EnterprisesEnrollmentTokensService) Get(name string) *EnterprisesEnrollmentTokensGetCall { 8391 c := &EnterprisesEnrollmentTokensGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8392 c.name = name 8393 return c 8394 } 8395 8396 // Fields allows partial responses to be retrieved. See 8397 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8398 // details. 8399 func (c *EnterprisesEnrollmentTokensGetCall) Fields(s ...googleapi.Field) *EnterprisesEnrollmentTokensGetCall { 8400 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8401 return c 8402 } 8403 8404 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8405 // object's ETag matches the given value. This is useful for getting updates 8406 // only after the object has changed since the last request. 8407 func (c *EnterprisesEnrollmentTokensGetCall) IfNoneMatch(entityTag string) *EnterprisesEnrollmentTokensGetCall { 8408 c.ifNoneMatch_ = entityTag 8409 return c 8410 } 8411 8412 // Context sets the context to be used in this call's Do method. 8413 func (c *EnterprisesEnrollmentTokensGetCall) Context(ctx context.Context) *EnterprisesEnrollmentTokensGetCall { 8414 c.ctx_ = ctx 8415 return c 8416 } 8417 8418 // Header returns a http.Header that can be modified by the caller to add 8419 // headers to the request. 8420 func (c *EnterprisesEnrollmentTokensGetCall) Header() http.Header { 8421 if c.header_ == nil { 8422 c.header_ = make(http.Header) 8423 } 8424 return c.header_ 8425 } 8426 8427 func (c *EnterprisesEnrollmentTokensGetCall) doRequest(alt string) (*http.Response, error) { 8428 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8429 if c.ifNoneMatch_ != "" { 8430 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8431 } 8432 var body io.Reader = nil 8433 c.urlParams_.Set("alt", alt) 8434 c.urlParams_.Set("prettyPrint", "false") 8435 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 8436 urls += "?" + c.urlParams_.Encode() 8437 req, err := http.NewRequest("GET", urls, body) 8438 if err != nil { 8439 return nil, err 8440 } 8441 req.Header = reqHeaders 8442 googleapi.Expand(req.URL, map[string]string{ 8443 "name": c.name, 8444 }) 8445 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8446 } 8447 8448 // Do executes the "androidmanagement.enterprises.enrollmentTokens.get" call. 8449 // Any non-2xx status code is an error. Response headers are in either 8450 // *EnrollmentToken.ServerResponse.Header or (if a response was returned at 8451 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8452 // check whether the returned error was because http.StatusNotModified was 8453 // returned. 8454 func (c *EnterprisesEnrollmentTokensGetCall) Do(opts ...googleapi.CallOption) (*EnrollmentToken, error) { 8455 gensupport.SetOptions(c.urlParams_, opts...) 8456 res, err := c.doRequest("json") 8457 if res != nil && res.StatusCode == http.StatusNotModified { 8458 if res.Body != nil { 8459 res.Body.Close() 8460 } 8461 return nil, gensupport.WrapError(&googleapi.Error{ 8462 Code: res.StatusCode, 8463 Header: res.Header, 8464 }) 8465 } 8466 if err != nil { 8467 return nil, err 8468 } 8469 defer googleapi.CloseBody(res) 8470 if err := googleapi.CheckResponse(res); err != nil { 8471 return nil, gensupport.WrapError(err) 8472 } 8473 ret := &EnrollmentToken{ 8474 ServerResponse: googleapi.ServerResponse{ 8475 Header: res.Header, 8476 HTTPStatusCode: res.StatusCode, 8477 }, 8478 } 8479 target := &ret 8480 if err := gensupport.DecodeResponse(target, res); err != nil { 8481 return nil, err 8482 } 8483 return ret, nil 8484 } 8485 8486 type EnterprisesEnrollmentTokensListCall struct { 8487 s *Service 8488 parent string 8489 urlParams_ gensupport.URLParams 8490 ifNoneMatch_ string 8491 ctx_ context.Context 8492 header_ http.Header 8493 } 8494 8495 // List: Lists active, unexpired enrollment tokens for a given enterprise. The 8496 // list items contain only a partial view of EnrollmentToken: all the fields 8497 // but name and expiration_timestamp are empty. This method is meant to help 8498 // manage active enrollment tokens lifecycle. For security reasons, it's 8499 // recommended to delete active enrollment tokens as soon as they're not 8500 // intended to be used anymore. 8501 // 8502 // - parent: The name of the enterprise in the form enterprises/{enterpriseId}. 8503 func (r *EnterprisesEnrollmentTokensService) List(parent string) *EnterprisesEnrollmentTokensListCall { 8504 c := &EnterprisesEnrollmentTokensListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8505 c.parent = parent 8506 return c 8507 } 8508 8509 // PageSize sets the optional parameter "pageSize": The requested page size. 8510 // The service may return fewer than this value. If unspecified, at most 10 8511 // items will be returned. The maximum value is 100; values above 100 will be 8512 // coerced to 100. 8513 func (c *EnterprisesEnrollmentTokensListCall) PageSize(pageSize int64) *EnterprisesEnrollmentTokensListCall { 8514 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8515 return c 8516 } 8517 8518 // PageToken sets the optional parameter "pageToken": A token identifying a 8519 // page of results returned by the server. 8520 func (c *EnterprisesEnrollmentTokensListCall) PageToken(pageToken string) *EnterprisesEnrollmentTokensListCall { 8521 c.urlParams_.Set("pageToken", pageToken) 8522 return c 8523 } 8524 8525 // Fields allows partial responses to be retrieved. See 8526 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8527 // details. 8528 func (c *EnterprisesEnrollmentTokensListCall) Fields(s ...googleapi.Field) *EnterprisesEnrollmentTokensListCall { 8529 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8530 return c 8531 } 8532 8533 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8534 // object's ETag matches the given value. This is useful for getting updates 8535 // only after the object has changed since the last request. 8536 func (c *EnterprisesEnrollmentTokensListCall) IfNoneMatch(entityTag string) *EnterprisesEnrollmentTokensListCall { 8537 c.ifNoneMatch_ = entityTag 8538 return c 8539 } 8540 8541 // Context sets the context to be used in this call's Do method. 8542 func (c *EnterprisesEnrollmentTokensListCall) Context(ctx context.Context) *EnterprisesEnrollmentTokensListCall { 8543 c.ctx_ = ctx 8544 return c 8545 } 8546 8547 // Header returns a http.Header that can be modified by the caller to add 8548 // headers to the request. 8549 func (c *EnterprisesEnrollmentTokensListCall) Header() http.Header { 8550 if c.header_ == nil { 8551 c.header_ = make(http.Header) 8552 } 8553 return c.header_ 8554 } 8555 8556 func (c *EnterprisesEnrollmentTokensListCall) doRequest(alt string) (*http.Response, error) { 8557 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8558 if c.ifNoneMatch_ != "" { 8559 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8560 } 8561 var body io.Reader = nil 8562 c.urlParams_.Set("alt", alt) 8563 c.urlParams_.Set("prettyPrint", "false") 8564 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/enrollmentTokens") 8565 urls += "?" + c.urlParams_.Encode() 8566 req, err := http.NewRequest("GET", urls, body) 8567 if err != nil { 8568 return nil, err 8569 } 8570 req.Header = reqHeaders 8571 googleapi.Expand(req.URL, map[string]string{ 8572 "parent": c.parent, 8573 }) 8574 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8575 } 8576 8577 // Do executes the "androidmanagement.enterprises.enrollmentTokens.list" call. 8578 // Any non-2xx status code is an error. Response headers are in either 8579 // *ListEnrollmentTokensResponse.ServerResponse.Header or (if a response was 8580 // returned at all) in error.(*googleapi.Error).Header. Use 8581 // googleapi.IsNotModified to check whether the returned error was because 8582 // http.StatusNotModified was returned. 8583 func (c *EnterprisesEnrollmentTokensListCall) Do(opts ...googleapi.CallOption) (*ListEnrollmentTokensResponse, error) { 8584 gensupport.SetOptions(c.urlParams_, opts...) 8585 res, err := c.doRequest("json") 8586 if res != nil && res.StatusCode == http.StatusNotModified { 8587 if res.Body != nil { 8588 res.Body.Close() 8589 } 8590 return nil, gensupport.WrapError(&googleapi.Error{ 8591 Code: res.StatusCode, 8592 Header: res.Header, 8593 }) 8594 } 8595 if err != nil { 8596 return nil, err 8597 } 8598 defer googleapi.CloseBody(res) 8599 if err := googleapi.CheckResponse(res); err != nil { 8600 return nil, gensupport.WrapError(err) 8601 } 8602 ret := &ListEnrollmentTokensResponse{ 8603 ServerResponse: googleapi.ServerResponse{ 8604 Header: res.Header, 8605 HTTPStatusCode: res.StatusCode, 8606 }, 8607 } 8608 target := &ret 8609 if err := gensupport.DecodeResponse(target, res); err != nil { 8610 return nil, err 8611 } 8612 return ret, nil 8613 } 8614 8615 // Pages invokes f for each page of results. 8616 // A non-nil error returned from f will halt the iteration. 8617 // The provided context supersedes any context provided to the Context method. 8618 func (c *EnterprisesEnrollmentTokensListCall) Pages(ctx context.Context, f func(*ListEnrollmentTokensResponse) error) error { 8619 c.ctx_ = ctx 8620 defer c.PageToken(c.urlParams_.Get("pageToken")) 8621 for { 8622 x, err := c.Do() 8623 if err != nil { 8624 return err 8625 } 8626 if err := f(x); err != nil { 8627 return err 8628 } 8629 if x.NextPageToken == "" { 8630 return nil 8631 } 8632 c.PageToken(x.NextPageToken) 8633 } 8634 } 8635 8636 type EnterprisesMigrationTokensCreateCall struct { 8637 s *Service 8638 parent string 8639 migrationtoken *MigrationToken 8640 urlParams_ gensupport.URLParams 8641 ctx_ context.Context 8642 header_ http.Header 8643 } 8644 8645 // Create: Creates a migration token, to migrate an existing device from being 8646 // managed by the EMM's Device Policy Controller (DPC) to being managed by the 8647 // Android Management API. See the guide 8648 // (https://developers.google.com/android/management/dpc-migration) for more 8649 // details. 8650 // 8651 // - parent: The enterprise in which this migration token is created. This must 8652 // be the same enterprise which already manages the device in the Play EMM 8653 // API. Format: enterprises/{enterprise}. 8654 func (r *EnterprisesMigrationTokensService) Create(parent string, migrationtoken *MigrationToken) *EnterprisesMigrationTokensCreateCall { 8655 c := &EnterprisesMigrationTokensCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8656 c.parent = parent 8657 c.migrationtoken = migrationtoken 8658 return c 8659 } 8660 8661 // Fields allows partial responses to be retrieved. See 8662 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8663 // details. 8664 func (c *EnterprisesMigrationTokensCreateCall) Fields(s ...googleapi.Field) *EnterprisesMigrationTokensCreateCall { 8665 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8666 return c 8667 } 8668 8669 // Context sets the context to be used in this call's Do method. 8670 func (c *EnterprisesMigrationTokensCreateCall) Context(ctx context.Context) *EnterprisesMigrationTokensCreateCall { 8671 c.ctx_ = ctx 8672 return c 8673 } 8674 8675 // Header returns a http.Header that can be modified by the caller to add 8676 // headers to the request. 8677 func (c *EnterprisesMigrationTokensCreateCall) Header() http.Header { 8678 if c.header_ == nil { 8679 c.header_ = make(http.Header) 8680 } 8681 return c.header_ 8682 } 8683 8684 func (c *EnterprisesMigrationTokensCreateCall) doRequest(alt string) (*http.Response, error) { 8685 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8686 var body io.Reader = nil 8687 body, err := googleapi.WithoutDataWrapper.JSONReader(c.migrationtoken) 8688 if err != nil { 8689 return nil, err 8690 } 8691 c.urlParams_.Set("alt", alt) 8692 c.urlParams_.Set("prettyPrint", "false") 8693 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migrationTokens") 8694 urls += "?" + c.urlParams_.Encode() 8695 req, err := http.NewRequest("POST", urls, body) 8696 if err != nil { 8697 return nil, err 8698 } 8699 req.Header = reqHeaders 8700 googleapi.Expand(req.URL, map[string]string{ 8701 "parent": c.parent, 8702 }) 8703 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8704 } 8705 8706 // Do executes the "androidmanagement.enterprises.migrationTokens.create" call. 8707 // Any non-2xx status code is an error. Response headers are in either 8708 // *MigrationToken.ServerResponse.Header or (if a response was returned at all) 8709 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8710 // whether the returned error was because http.StatusNotModified was returned. 8711 func (c *EnterprisesMigrationTokensCreateCall) Do(opts ...googleapi.CallOption) (*MigrationToken, error) { 8712 gensupport.SetOptions(c.urlParams_, opts...) 8713 res, err := c.doRequest("json") 8714 if res != nil && res.StatusCode == http.StatusNotModified { 8715 if res.Body != nil { 8716 res.Body.Close() 8717 } 8718 return nil, gensupport.WrapError(&googleapi.Error{ 8719 Code: res.StatusCode, 8720 Header: res.Header, 8721 }) 8722 } 8723 if err != nil { 8724 return nil, err 8725 } 8726 defer googleapi.CloseBody(res) 8727 if err := googleapi.CheckResponse(res); err != nil { 8728 return nil, gensupport.WrapError(err) 8729 } 8730 ret := &MigrationToken{ 8731 ServerResponse: googleapi.ServerResponse{ 8732 Header: res.Header, 8733 HTTPStatusCode: res.StatusCode, 8734 }, 8735 } 8736 target := &ret 8737 if err := gensupport.DecodeResponse(target, res); err != nil { 8738 return nil, err 8739 } 8740 return ret, nil 8741 } 8742 8743 type EnterprisesMigrationTokensGetCall struct { 8744 s *Service 8745 name string 8746 urlParams_ gensupport.URLParams 8747 ifNoneMatch_ string 8748 ctx_ context.Context 8749 header_ http.Header 8750 } 8751 8752 // Get: Gets a migration token. 8753 // 8754 // - name: The name of the migration token to retrieve. Format: 8755 // enterprises/{enterprise}/migrationTokens/{migration_token}. 8756 func (r *EnterprisesMigrationTokensService) Get(name string) *EnterprisesMigrationTokensGetCall { 8757 c := &EnterprisesMigrationTokensGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8758 c.name = name 8759 return c 8760 } 8761 8762 // Fields allows partial responses to be retrieved. See 8763 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8764 // details. 8765 func (c *EnterprisesMigrationTokensGetCall) Fields(s ...googleapi.Field) *EnterprisesMigrationTokensGetCall { 8766 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8767 return c 8768 } 8769 8770 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8771 // object's ETag matches the given value. This is useful for getting updates 8772 // only after the object has changed since the last request. 8773 func (c *EnterprisesMigrationTokensGetCall) IfNoneMatch(entityTag string) *EnterprisesMigrationTokensGetCall { 8774 c.ifNoneMatch_ = entityTag 8775 return c 8776 } 8777 8778 // Context sets the context to be used in this call's Do method. 8779 func (c *EnterprisesMigrationTokensGetCall) Context(ctx context.Context) *EnterprisesMigrationTokensGetCall { 8780 c.ctx_ = ctx 8781 return c 8782 } 8783 8784 // Header returns a http.Header that can be modified by the caller to add 8785 // headers to the request. 8786 func (c *EnterprisesMigrationTokensGetCall) Header() http.Header { 8787 if c.header_ == nil { 8788 c.header_ = make(http.Header) 8789 } 8790 return c.header_ 8791 } 8792 8793 func (c *EnterprisesMigrationTokensGetCall) doRequest(alt string) (*http.Response, error) { 8794 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8795 if c.ifNoneMatch_ != "" { 8796 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8797 } 8798 var body io.Reader = nil 8799 c.urlParams_.Set("alt", alt) 8800 c.urlParams_.Set("prettyPrint", "false") 8801 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 8802 urls += "?" + c.urlParams_.Encode() 8803 req, err := http.NewRequest("GET", urls, body) 8804 if err != nil { 8805 return nil, err 8806 } 8807 req.Header = reqHeaders 8808 googleapi.Expand(req.URL, map[string]string{ 8809 "name": c.name, 8810 }) 8811 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8812 } 8813 8814 // Do executes the "androidmanagement.enterprises.migrationTokens.get" call. 8815 // Any non-2xx status code is an error. Response headers are in either 8816 // *MigrationToken.ServerResponse.Header or (if a response was returned at all) 8817 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8818 // whether the returned error was because http.StatusNotModified was returned. 8819 func (c *EnterprisesMigrationTokensGetCall) Do(opts ...googleapi.CallOption) (*MigrationToken, error) { 8820 gensupport.SetOptions(c.urlParams_, opts...) 8821 res, err := c.doRequest("json") 8822 if res != nil && res.StatusCode == http.StatusNotModified { 8823 if res.Body != nil { 8824 res.Body.Close() 8825 } 8826 return nil, gensupport.WrapError(&googleapi.Error{ 8827 Code: res.StatusCode, 8828 Header: res.Header, 8829 }) 8830 } 8831 if err != nil { 8832 return nil, err 8833 } 8834 defer googleapi.CloseBody(res) 8835 if err := googleapi.CheckResponse(res); err != nil { 8836 return nil, gensupport.WrapError(err) 8837 } 8838 ret := &MigrationToken{ 8839 ServerResponse: googleapi.ServerResponse{ 8840 Header: res.Header, 8841 HTTPStatusCode: res.StatusCode, 8842 }, 8843 } 8844 target := &ret 8845 if err := gensupport.DecodeResponse(target, res); err != nil { 8846 return nil, err 8847 } 8848 return ret, nil 8849 } 8850 8851 type EnterprisesMigrationTokensListCall struct { 8852 s *Service 8853 parent string 8854 urlParams_ gensupport.URLParams 8855 ifNoneMatch_ string 8856 ctx_ context.Context 8857 header_ http.Header 8858 } 8859 8860 // List: Lists migration tokens. 8861 // 8862 // - parent: The enterprise which the migration tokens belong to. Format: 8863 // enterprises/{enterprise}. 8864 func (r *EnterprisesMigrationTokensService) List(parent string) *EnterprisesMigrationTokensListCall { 8865 c := &EnterprisesMigrationTokensListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8866 c.parent = parent 8867 return c 8868 } 8869 8870 // PageSize sets the optional parameter "pageSize": The maximum number of 8871 // migration tokens to return. Fewer migration tokens may be returned. If 8872 // unspecified, at most 100 migration tokens will be returned. The maximum 8873 // value is 100; values above 100 will be coerced to 100. 8874 func (c *EnterprisesMigrationTokensListCall) PageSize(pageSize int64) *EnterprisesMigrationTokensListCall { 8875 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8876 return c 8877 } 8878 8879 // PageToken sets the optional parameter "pageToken": A page token, received 8880 // from a previous ListMigrationTokens call. Provide this to retrieve the 8881 // subsequent page.When paginating, all other parameters provided to 8882 // ListMigrationTokens must match the call that provided the page token. 8883 func (c *EnterprisesMigrationTokensListCall) PageToken(pageToken string) *EnterprisesMigrationTokensListCall { 8884 c.urlParams_.Set("pageToken", pageToken) 8885 return c 8886 } 8887 8888 // Fields allows partial responses to be retrieved. See 8889 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8890 // details. 8891 func (c *EnterprisesMigrationTokensListCall) Fields(s ...googleapi.Field) *EnterprisesMigrationTokensListCall { 8892 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8893 return c 8894 } 8895 8896 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8897 // object's ETag matches the given value. This is useful for getting updates 8898 // only after the object has changed since the last request. 8899 func (c *EnterprisesMigrationTokensListCall) IfNoneMatch(entityTag string) *EnterprisesMigrationTokensListCall { 8900 c.ifNoneMatch_ = entityTag 8901 return c 8902 } 8903 8904 // Context sets the context to be used in this call's Do method. 8905 func (c *EnterprisesMigrationTokensListCall) Context(ctx context.Context) *EnterprisesMigrationTokensListCall { 8906 c.ctx_ = ctx 8907 return c 8908 } 8909 8910 // Header returns a http.Header that can be modified by the caller to add 8911 // headers to the request. 8912 func (c *EnterprisesMigrationTokensListCall) Header() http.Header { 8913 if c.header_ == nil { 8914 c.header_ = make(http.Header) 8915 } 8916 return c.header_ 8917 } 8918 8919 func (c *EnterprisesMigrationTokensListCall) doRequest(alt string) (*http.Response, error) { 8920 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8921 if c.ifNoneMatch_ != "" { 8922 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8923 } 8924 var body io.Reader = nil 8925 c.urlParams_.Set("alt", alt) 8926 c.urlParams_.Set("prettyPrint", "false") 8927 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migrationTokens") 8928 urls += "?" + c.urlParams_.Encode() 8929 req, err := http.NewRequest("GET", urls, body) 8930 if err != nil { 8931 return nil, err 8932 } 8933 req.Header = reqHeaders 8934 googleapi.Expand(req.URL, map[string]string{ 8935 "parent": c.parent, 8936 }) 8937 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8938 } 8939 8940 // Do executes the "androidmanagement.enterprises.migrationTokens.list" call. 8941 // Any non-2xx status code is an error. Response headers are in either 8942 // *ListMigrationTokensResponse.ServerResponse.Header or (if a response was 8943 // returned at all) in error.(*googleapi.Error).Header. Use 8944 // googleapi.IsNotModified to check whether the returned error was because 8945 // http.StatusNotModified was returned. 8946 func (c *EnterprisesMigrationTokensListCall) Do(opts ...googleapi.CallOption) (*ListMigrationTokensResponse, error) { 8947 gensupport.SetOptions(c.urlParams_, opts...) 8948 res, err := c.doRequest("json") 8949 if res != nil && res.StatusCode == http.StatusNotModified { 8950 if res.Body != nil { 8951 res.Body.Close() 8952 } 8953 return nil, gensupport.WrapError(&googleapi.Error{ 8954 Code: res.StatusCode, 8955 Header: res.Header, 8956 }) 8957 } 8958 if err != nil { 8959 return nil, err 8960 } 8961 defer googleapi.CloseBody(res) 8962 if err := googleapi.CheckResponse(res); err != nil { 8963 return nil, gensupport.WrapError(err) 8964 } 8965 ret := &ListMigrationTokensResponse{ 8966 ServerResponse: googleapi.ServerResponse{ 8967 Header: res.Header, 8968 HTTPStatusCode: res.StatusCode, 8969 }, 8970 } 8971 target := &ret 8972 if err := gensupport.DecodeResponse(target, res); err != nil { 8973 return nil, err 8974 } 8975 return ret, nil 8976 } 8977 8978 // Pages invokes f for each page of results. 8979 // A non-nil error returned from f will halt the iteration. 8980 // The provided context supersedes any context provided to the Context method. 8981 func (c *EnterprisesMigrationTokensListCall) Pages(ctx context.Context, f func(*ListMigrationTokensResponse) error) error { 8982 c.ctx_ = ctx 8983 defer c.PageToken(c.urlParams_.Get("pageToken")) 8984 for { 8985 x, err := c.Do() 8986 if err != nil { 8987 return err 8988 } 8989 if err := f(x); err != nil { 8990 return err 8991 } 8992 if x.NextPageToken == "" { 8993 return nil 8994 } 8995 c.PageToken(x.NextPageToken) 8996 } 8997 } 8998 8999 type EnterprisesPoliciesDeleteCall struct { 9000 s *Service 9001 name string 9002 urlParams_ gensupport.URLParams 9003 ctx_ context.Context 9004 header_ http.Header 9005 } 9006 9007 // Delete: Deletes a policy. This operation is only permitted if no devices are 9008 // currently referencing the policy. 9009 // 9010 // - name: The name of the policy in the form 9011 // enterprises/{enterpriseId}/policies/{policyId}. 9012 func (r *EnterprisesPoliciesService) Delete(name string) *EnterprisesPoliciesDeleteCall { 9013 c := &EnterprisesPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9014 c.name = name 9015 return c 9016 } 9017 9018 // Fields allows partial responses to be retrieved. See 9019 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9020 // details. 9021 func (c *EnterprisesPoliciesDeleteCall) Fields(s ...googleapi.Field) *EnterprisesPoliciesDeleteCall { 9022 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9023 return c 9024 } 9025 9026 // Context sets the context to be used in this call's Do method. 9027 func (c *EnterprisesPoliciesDeleteCall) Context(ctx context.Context) *EnterprisesPoliciesDeleteCall { 9028 c.ctx_ = ctx 9029 return c 9030 } 9031 9032 // Header returns a http.Header that can be modified by the caller to add 9033 // headers to the request. 9034 func (c *EnterprisesPoliciesDeleteCall) Header() http.Header { 9035 if c.header_ == nil { 9036 c.header_ = make(http.Header) 9037 } 9038 return c.header_ 9039 } 9040 9041 func (c *EnterprisesPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { 9042 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9043 var body io.Reader = nil 9044 c.urlParams_.Set("alt", alt) 9045 c.urlParams_.Set("prettyPrint", "false") 9046 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 9047 urls += "?" + c.urlParams_.Encode() 9048 req, err := http.NewRequest("DELETE", urls, body) 9049 if err != nil { 9050 return nil, err 9051 } 9052 req.Header = reqHeaders 9053 googleapi.Expand(req.URL, map[string]string{ 9054 "name": c.name, 9055 }) 9056 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9057 } 9058 9059 // Do executes the "androidmanagement.enterprises.policies.delete" call. 9060 // Any non-2xx status code is an error. Response headers are in either 9061 // *Empty.ServerResponse.Header or (if a response was returned at all) in 9062 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9063 // whether the returned error was because http.StatusNotModified was returned. 9064 func (c *EnterprisesPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 9065 gensupport.SetOptions(c.urlParams_, opts...) 9066 res, err := c.doRequest("json") 9067 if res != nil && res.StatusCode == http.StatusNotModified { 9068 if res.Body != nil { 9069 res.Body.Close() 9070 } 9071 return nil, gensupport.WrapError(&googleapi.Error{ 9072 Code: res.StatusCode, 9073 Header: res.Header, 9074 }) 9075 } 9076 if err != nil { 9077 return nil, err 9078 } 9079 defer googleapi.CloseBody(res) 9080 if err := googleapi.CheckResponse(res); err != nil { 9081 return nil, gensupport.WrapError(err) 9082 } 9083 ret := &Empty{ 9084 ServerResponse: googleapi.ServerResponse{ 9085 Header: res.Header, 9086 HTTPStatusCode: res.StatusCode, 9087 }, 9088 } 9089 target := &ret 9090 if err := gensupport.DecodeResponse(target, res); err != nil { 9091 return nil, err 9092 } 9093 return ret, nil 9094 } 9095 9096 type EnterprisesPoliciesGetCall struct { 9097 s *Service 9098 name string 9099 urlParams_ gensupport.URLParams 9100 ifNoneMatch_ string 9101 ctx_ context.Context 9102 header_ http.Header 9103 } 9104 9105 // Get: Gets a policy. 9106 // 9107 // - name: The name of the policy in the form 9108 // enterprises/{enterpriseId}/policies/{policyId}. 9109 func (r *EnterprisesPoliciesService) Get(name string) *EnterprisesPoliciesGetCall { 9110 c := &EnterprisesPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9111 c.name = name 9112 return c 9113 } 9114 9115 // Fields allows partial responses to be retrieved. See 9116 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9117 // details. 9118 func (c *EnterprisesPoliciesGetCall) Fields(s ...googleapi.Field) *EnterprisesPoliciesGetCall { 9119 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9120 return c 9121 } 9122 9123 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9124 // object's ETag matches the given value. This is useful for getting updates 9125 // only after the object has changed since the last request. 9126 func (c *EnterprisesPoliciesGetCall) IfNoneMatch(entityTag string) *EnterprisesPoliciesGetCall { 9127 c.ifNoneMatch_ = entityTag 9128 return c 9129 } 9130 9131 // Context sets the context to be used in this call's Do method. 9132 func (c *EnterprisesPoliciesGetCall) Context(ctx context.Context) *EnterprisesPoliciesGetCall { 9133 c.ctx_ = ctx 9134 return c 9135 } 9136 9137 // Header returns a http.Header that can be modified by the caller to add 9138 // headers to the request. 9139 func (c *EnterprisesPoliciesGetCall) Header() http.Header { 9140 if c.header_ == nil { 9141 c.header_ = make(http.Header) 9142 } 9143 return c.header_ 9144 } 9145 9146 func (c *EnterprisesPoliciesGetCall) doRequest(alt string) (*http.Response, error) { 9147 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9148 if c.ifNoneMatch_ != "" { 9149 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9150 } 9151 var body io.Reader = nil 9152 c.urlParams_.Set("alt", alt) 9153 c.urlParams_.Set("prettyPrint", "false") 9154 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 9155 urls += "?" + c.urlParams_.Encode() 9156 req, err := http.NewRequest("GET", urls, body) 9157 if err != nil { 9158 return nil, err 9159 } 9160 req.Header = reqHeaders 9161 googleapi.Expand(req.URL, map[string]string{ 9162 "name": c.name, 9163 }) 9164 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9165 } 9166 9167 // Do executes the "androidmanagement.enterprises.policies.get" call. 9168 // Any non-2xx status code is an error. Response headers are in either 9169 // *Policy.ServerResponse.Header or (if a response was returned at all) in 9170 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9171 // whether the returned error was because http.StatusNotModified was returned. 9172 func (c *EnterprisesPoliciesGetCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 9173 gensupport.SetOptions(c.urlParams_, opts...) 9174 res, err := c.doRequest("json") 9175 if res != nil && res.StatusCode == http.StatusNotModified { 9176 if res.Body != nil { 9177 res.Body.Close() 9178 } 9179 return nil, gensupport.WrapError(&googleapi.Error{ 9180 Code: res.StatusCode, 9181 Header: res.Header, 9182 }) 9183 } 9184 if err != nil { 9185 return nil, err 9186 } 9187 defer googleapi.CloseBody(res) 9188 if err := googleapi.CheckResponse(res); err != nil { 9189 return nil, gensupport.WrapError(err) 9190 } 9191 ret := &Policy{ 9192 ServerResponse: googleapi.ServerResponse{ 9193 Header: res.Header, 9194 HTTPStatusCode: res.StatusCode, 9195 }, 9196 } 9197 target := &ret 9198 if err := gensupport.DecodeResponse(target, res); err != nil { 9199 return nil, err 9200 } 9201 return ret, nil 9202 } 9203 9204 type EnterprisesPoliciesListCall struct { 9205 s *Service 9206 parent string 9207 urlParams_ gensupport.URLParams 9208 ifNoneMatch_ string 9209 ctx_ context.Context 9210 header_ http.Header 9211 } 9212 9213 // List: Lists policies for a given enterprise. 9214 // 9215 // - parent: The name of the enterprise in the form enterprises/{enterpriseId}. 9216 func (r *EnterprisesPoliciesService) List(parent string) *EnterprisesPoliciesListCall { 9217 c := &EnterprisesPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9218 c.parent = parent 9219 return c 9220 } 9221 9222 // PageSize sets the optional parameter "pageSize": The requested page size. 9223 // The actual page size may be fixed to a min or max value. 9224 func (c *EnterprisesPoliciesListCall) PageSize(pageSize int64) *EnterprisesPoliciesListCall { 9225 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9226 return c 9227 } 9228 9229 // PageToken sets the optional parameter "pageToken": A token identifying a 9230 // page of results returned by the server. 9231 func (c *EnterprisesPoliciesListCall) PageToken(pageToken string) *EnterprisesPoliciesListCall { 9232 c.urlParams_.Set("pageToken", pageToken) 9233 return c 9234 } 9235 9236 // Fields allows partial responses to be retrieved. See 9237 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9238 // details. 9239 func (c *EnterprisesPoliciesListCall) Fields(s ...googleapi.Field) *EnterprisesPoliciesListCall { 9240 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9241 return c 9242 } 9243 9244 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9245 // object's ETag matches the given value. This is useful for getting updates 9246 // only after the object has changed since the last request. 9247 func (c *EnterprisesPoliciesListCall) IfNoneMatch(entityTag string) *EnterprisesPoliciesListCall { 9248 c.ifNoneMatch_ = entityTag 9249 return c 9250 } 9251 9252 // Context sets the context to be used in this call's Do method. 9253 func (c *EnterprisesPoliciesListCall) Context(ctx context.Context) *EnterprisesPoliciesListCall { 9254 c.ctx_ = ctx 9255 return c 9256 } 9257 9258 // Header returns a http.Header that can be modified by the caller to add 9259 // headers to the request. 9260 func (c *EnterprisesPoliciesListCall) Header() http.Header { 9261 if c.header_ == nil { 9262 c.header_ = make(http.Header) 9263 } 9264 return c.header_ 9265 } 9266 9267 func (c *EnterprisesPoliciesListCall) doRequest(alt string) (*http.Response, error) { 9268 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9269 if c.ifNoneMatch_ != "" { 9270 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9271 } 9272 var body io.Reader = nil 9273 c.urlParams_.Set("alt", alt) 9274 c.urlParams_.Set("prettyPrint", "false") 9275 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/policies") 9276 urls += "?" + c.urlParams_.Encode() 9277 req, err := http.NewRequest("GET", urls, body) 9278 if err != nil { 9279 return nil, err 9280 } 9281 req.Header = reqHeaders 9282 googleapi.Expand(req.URL, map[string]string{ 9283 "parent": c.parent, 9284 }) 9285 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9286 } 9287 9288 // Do executes the "androidmanagement.enterprises.policies.list" call. 9289 // Any non-2xx status code is an error. Response headers are in either 9290 // *ListPoliciesResponse.ServerResponse.Header or (if a response was returned 9291 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9292 // check whether the returned error was because http.StatusNotModified was 9293 // returned. 9294 func (c *EnterprisesPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListPoliciesResponse, error) { 9295 gensupport.SetOptions(c.urlParams_, opts...) 9296 res, err := c.doRequest("json") 9297 if res != nil && res.StatusCode == http.StatusNotModified { 9298 if res.Body != nil { 9299 res.Body.Close() 9300 } 9301 return nil, gensupport.WrapError(&googleapi.Error{ 9302 Code: res.StatusCode, 9303 Header: res.Header, 9304 }) 9305 } 9306 if err != nil { 9307 return nil, err 9308 } 9309 defer googleapi.CloseBody(res) 9310 if err := googleapi.CheckResponse(res); err != nil { 9311 return nil, gensupport.WrapError(err) 9312 } 9313 ret := &ListPoliciesResponse{ 9314 ServerResponse: googleapi.ServerResponse{ 9315 Header: res.Header, 9316 HTTPStatusCode: res.StatusCode, 9317 }, 9318 } 9319 target := &ret 9320 if err := gensupport.DecodeResponse(target, res); err != nil { 9321 return nil, err 9322 } 9323 return ret, nil 9324 } 9325 9326 // Pages invokes f for each page of results. 9327 // A non-nil error returned from f will halt the iteration. 9328 // The provided context supersedes any context provided to the Context method. 9329 func (c *EnterprisesPoliciesListCall) Pages(ctx context.Context, f func(*ListPoliciesResponse) error) error { 9330 c.ctx_ = ctx 9331 defer c.PageToken(c.urlParams_.Get("pageToken")) 9332 for { 9333 x, err := c.Do() 9334 if err != nil { 9335 return err 9336 } 9337 if err := f(x); err != nil { 9338 return err 9339 } 9340 if x.NextPageToken == "" { 9341 return nil 9342 } 9343 c.PageToken(x.NextPageToken) 9344 } 9345 } 9346 9347 type EnterprisesPoliciesPatchCall struct { 9348 s *Service 9349 name string 9350 policy *Policy 9351 urlParams_ gensupport.URLParams 9352 ctx_ context.Context 9353 header_ http.Header 9354 } 9355 9356 // Patch: Updates or creates a policy. 9357 // 9358 // - name: The name of the policy in the form 9359 // enterprises/{enterpriseId}/policies/{policyId}. 9360 func (r *EnterprisesPoliciesService) Patch(name string, policy *Policy) *EnterprisesPoliciesPatchCall { 9361 c := &EnterprisesPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9362 c.name = name 9363 c.policy = policy 9364 return c 9365 } 9366 9367 // UpdateMask sets the optional parameter "updateMask": The field mask 9368 // indicating the fields to update. If not set, all modifiable fields will be 9369 // modified. 9370 func (c *EnterprisesPoliciesPatchCall) UpdateMask(updateMask string) *EnterprisesPoliciesPatchCall { 9371 c.urlParams_.Set("updateMask", updateMask) 9372 return c 9373 } 9374 9375 // Fields allows partial responses to be retrieved. See 9376 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9377 // details. 9378 func (c *EnterprisesPoliciesPatchCall) Fields(s ...googleapi.Field) *EnterprisesPoliciesPatchCall { 9379 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9380 return c 9381 } 9382 9383 // Context sets the context to be used in this call's Do method. 9384 func (c *EnterprisesPoliciesPatchCall) Context(ctx context.Context) *EnterprisesPoliciesPatchCall { 9385 c.ctx_ = ctx 9386 return c 9387 } 9388 9389 // Header returns a http.Header that can be modified by the caller to add 9390 // headers to the request. 9391 func (c *EnterprisesPoliciesPatchCall) Header() http.Header { 9392 if c.header_ == nil { 9393 c.header_ = make(http.Header) 9394 } 9395 return c.header_ 9396 } 9397 9398 func (c *EnterprisesPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { 9399 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9400 var body io.Reader = nil 9401 body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy) 9402 if err != nil { 9403 return nil, err 9404 } 9405 c.urlParams_.Set("alt", alt) 9406 c.urlParams_.Set("prettyPrint", "false") 9407 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 9408 urls += "?" + c.urlParams_.Encode() 9409 req, err := http.NewRequest("PATCH", urls, body) 9410 if err != nil { 9411 return nil, err 9412 } 9413 req.Header = reqHeaders 9414 googleapi.Expand(req.URL, map[string]string{ 9415 "name": c.name, 9416 }) 9417 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9418 } 9419 9420 // Do executes the "androidmanagement.enterprises.policies.patch" call. 9421 // Any non-2xx status code is an error. Response headers are in either 9422 // *Policy.ServerResponse.Header or (if a response was returned at all) in 9423 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9424 // whether the returned error was because http.StatusNotModified was returned. 9425 func (c *EnterprisesPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 9426 gensupport.SetOptions(c.urlParams_, opts...) 9427 res, err := c.doRequest("json") 9428 if res != nil && res.StatusCode == http.StatusNotModified { 9429 if res.Body != nil { 9430 res.Body.Close() 9431 } 9432 return nil, gensupport.WrapError(&googleapi.Error{ 9433 Code: res.StatusCode, 9434 Header: res.Header, 9435 }) 9436 } 9437 if err != nil { 9438 return nil, err 9439 } 9440 defer googleapi.CloseBody(res) 9441 if err := googleapi.CheckResponse(res); err != nil { 9442 return nil, gensupport.WrapError(err) 9443 } 9444 ret := &Policy{ 9445 ServerResponse: googleapi.ServerResponse{ 9446 Header: res.Header, 9447 HTTPStatusCode: res.StatusCode, 9448 }, 9449 } 9450 target := &ret 9451 if err := gensupport.DecodeResponse(target, res); err != nil { 9452 return nil, err 9453 } 9454 return ret, nil 9455 } 9456 9457 type EnterprisesWebAppsCreateCall struct { 9458 s *Service 9459 parent string 9460 webapp *WebApp 9461 urlParams_ gensupport.URLParams 9462 ctx_ context.Context 9463 header_ http.Header 9464 } 9465 9466 // Create: Creates a web app. 9467 // 9468 // - parent: The name of the enterprise in the form enterprises/{enterpriseId}. 9469 func (r *EnterprisesWebAppsService) Create(parent string, webapp *WebApp) *EnterprisesWebAppsCreateCall { 9470 c := &EnterprisesWebAppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9471 c.parent = parent 9472 c.webapp = webapp 9473 return c 9474 } 9475 9476 // Fields allows partial responses to be retrieved. See 9477 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9478 // details. 9479 func (c *EnterprisesWebAppsCreateCall) Fields(s ...googleapi.Field) *EnterprisesWebAppsCreateCall { 9480 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9481 return c 9482 } 9483 9484 // Context sets the context to be used in this call's Do method. 9485 func (c *EnterprisesWebAppsCreateCall) Context(ctx context.Context) *EnterprisesWebAppsCreateCall { 9486 c.ctx_ = ctx 9487 return c 9488 } 9489 9490 // Header returns a http.Header that can be modified by the caller to add 9491 // headers to the request. 9492 func (c *EnterprisesWebAppsCreateCall) Header() http.Header { 9493 if c.header_ == nil { 9494 c.header_ = make(http.Header) 9495 } 9496 return c.header_ 9497 } 9498 9499 func (c *EnterprisesWebAppsCreateCall) doRequest(alt string) (*http.Response, error) { 9500 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9501 var body io.Reader = nil 9502 body, err := googleapi.WithoutDataWrapper.JSONReader(c.webapp) 9503 if err != nil { 9504 return nil, err 9505 } 9506 c.urlParams_.Set("alt", alt) 9507 c.urlParams_.Set("prettyPrint", "false") 9508 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/webApps") 9509 urls += "?" + c.urlParams_.Encode() 9510 req, err := http.NewRequest("POST", urls, body) 9511 if err != nil { 9512 return nil, err 9513 } 9514 req.Header = reqHeaders 9515 googleapi.Expand(req.URL, map[string]string{ 9516 "parent": c.parent, 9517 }) 9518 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9519 } 9520 9521 // Do executes the "androidmanagement.enterprises.webApps.create" call. 9522 // Any non-2xx status code is an error. Response headers are in either 9523 // *WebApp.ServerResponse.Header or (if a response was returned at all) in 9524 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9525 // whether the returned error was because http.StatusNotModified was returned. 9526 func (c *EnterprisesWebAppsCreateCall) Do(opts ...googleapi.CallOption) (*WebApp, error) { 9527 gensupport.SetOptions(c.urlParams_, opts...) 9528 res, err := c.doRequest("json") 9529 if res != nil && res.StatusCode == http.StatusNotModified { 9530 if res.Body != nil { 9531 res.Body.Close() 9532 } 9533 return nil, gensupport.WrapError(&googleapi.Error{ 9534 Code: res.StatusCode, 9535 Header: res.Header, 9536 }) 9537 } 9538 if err != nil { 9539 return nil, err 9540 } 9541 defer googleapi.CloseBody(res) 9542 if err := googleapi.CheckResponse(res); err != nil { 9543 return nil, gensupport.WrapError(err) 9544 } 9545 ret := &WebApp{ 9546 ServerResponse: googleapi.ServerResponse{ 9547 Header: res.Header, 9548 HTTPStatusCode: res.StatusCode, 9549 }, 9550 } 9551 target := &ret 9552 if err := gensupport.DecodeResponse(target, res); err != nil { 9553 return nil, err 9554 } 9555 return ret, nil 9556 } 9557 9558 type EnterprisesWebAppsDeleteCall struct { 9559 s *Service 9560 name string 9561 urlParams_ gensupport.URLParams 9562 ctx_ context.Context 9563 header_ http.Header 9564 } 9565 9566 // Delete: Deletes a web app. 9567 // 9568 // - name: The name of the web app in the form 9569 // enterprises/{enterpriseId}/webApps/{packageName}. 9570 func (r *EnterprisesWebAppsService) Delete(name string) *EnterprisesWebAppsDeleteCall { 9571 c := &EnterprisesWebAppsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9572 c.name = name 9573 return c 9574 } 9575 9576 // Fields allows partial responses to be retrieved. See 9577 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9578 // details. 9579 func (c *EnterprisesWebAppsDeleteCall) Fields(s ...googleapi.Field) *EnterprisesWebAppsDeleteCall { 9580 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9581 return c 9582 } 9583 9584 // Context sets the context to be used in this call's Do method. 9585 func (c *EnterprisesWebAppsDeleteCall) Context(ctx context.Context) *EnterprisesWebAppsDeleteCall { 9586 c.ctx_ = ctx 9587 return c 9588 } 9589 9590 // Header returns a http.Header that can be modified by the caller to add 9591 // headers to the request. 9592 func (c *EnterprisesWebAppsDeleteCall) Header() http.Header { 9593 if c.header_ == nil { 9594 c.header_ = make(http.Header) 9595 } 9596 return c.header_ 9597 } 9598 9599 func (c *EnterprisesWebAppsDeleteCall) doRequest(alt string) (*http.Response, error) { 9600 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9601 var body io.Reader = nil 9602 c.urlParams_.Set("alt", alt) 9603 c.urlParams_.Set("prettyPrint", "false") 9604 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 9605 urls += "?" + c.urlParams_.Encode() 9606 req, err := http.NewRequest("DELETE", urls, body) 9607 if err != nil { 9608 return nil, err 9609 } 9610 req.Header = reqHeaders 9611 googleapi.Expand(req.URL, map[string]string{ 9612 "name": c.name, 9613 }) 9614 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9615 } 9616 9617 // Do executes the "androidmanagement.enterprises.webApps.delete" call. 9618 // Any non-2xx status code is an error. Response headers are in either 9619 // *Empty.ServerResponse.Header or (if a response was returned at all) in 9620 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9621 // whether the returned error was because http.StatusNotModified was returned. 9622 func (c *EnterprisesWebAppsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 9623 gensupport.SetOptions(c.urlParams_, opts...) 9624 res, err := c.doRequest("json") 9625 if res != nil && res.StatusCode == http.StatusNotModified { 9626 if res.Body != nil { 9627 res.Body.Close() 9628 } 9629 return nil, gensupport.WrapError(&googleapi.Error{ 9630 Code: res.StatusCode, 9631 Header: res.Header, 9632 }) 9633 } 9634 if err != nil { 9635 return nil, err 9636 } 9637 defer googleapi.CloseBody(res) 9638 if err := googleapi.CheckResponse(res); err != nil { 9639 return nil, gensupport.WrapError(err) 9640 } 9641 ret := &Empty{ 9642 ServerResponse: googleapi.ServerResponse{ 9643 Header: res.Header, 9644 HTTPStatusCode: res.StatusCode, 9645 }, 9646 } 9647 target := &ret 9648 if err := gensupport.DecodeResponse(target, res); err != nil { 9649 return nil, err 9650 } 9651 return ret, nil 9652 } 9653 9654 type EnterprisesWebAppsGetCall struct { 9655 s *Service 9656 name string 9657 urlParams_ gensupport.URLParams 9658 ifNoneMatch_ string 9659 ctx_ context.Context 9660 header_ http.Header 9661 } 9662 9663 // Get: Gets a web app. 9664 // 9665 // - name: The name of the web app in the form 9666 // enterprises/{enterpriseId}/webApp/{packageName}. 9667 func (r *EnterprisesWebAppsService) Get(name string) *EnterprisesWebAppsGetCall { 9668 c := &EnterprisesWebAppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9669 c.name = name 9670 return c 9671 } 9672 9673 // Fields allows partial responses to be retrieved. See 9674 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9675 // details. 9676 func (c *EnterprisesWebAppsGetCall) Fields(s ...googleapi.Field) *EnterprisesWebAppsGetCall { 9677 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9678 return c 9679 } 9680 9681 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9682 // object's ETag matches the given value. This is useful for getting updates 9683 // only after the object has changed since the last request. 9684 func (c *EnterprisesWebAppsGetCall) IfNoneMatch(entityTag string) *EnterprisesWebAppsGetCall { 9685 c.ifNoneMatch_ = entityTag 9686 return c 9687 } 9688 9689 // Context sets the context to be used in this call's Do method. 9690 func (c *EnterprisesWebAppsGetCall) Context(ctx context.Context) *EnterprisesWebAppsGetCall { 9691 c.ctx_ = ctx 9692 return c 9693 } 9694 9695 // Header returns a http.Header that can be modified by the caller to add 9696 // headers to the request. 9697 func (c *EnterprisesWebAppsGetCall) Header() http.Header { 9698 if c.header_ == nil { 9699 c.header_ = make(http.Header) 9700 } 9701 return c.header_ 9702 } 9703 9704 func (c *EnterprisesWebAppsGetCall) doRequest(alt string) (*http.Response, error) { 9705 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9706 if c.ifNoneMatch_ != "" { 9707 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9708 } 9709 var body io.Reader = nil 9710 c.urlParams_.Set("alt", alt) 9711 c.urlParams_.Set("prettyPrint", "false") 9712 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 9713 urls += "?" + c.urlParams_.Encode() 9714 req, err := http.NewRequest("GET", urls, body) 9715 if err != nil { 9716 return nil, err 9717 } 9718 req.Header = reqHeaders 9719 googleapi.Expand(req.URL, map[string]string{ 9720 "name": c.name, 9721 }) 9722 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9723 } 9724 9725 // Do executes the "androidmanagement.enterprises.webApps.get" call. 9726 // Any non-2xx status code is an error. Response headers are in either 9727 // *WebApp.ServerResponse.Header or (if a response was returned at all) in 9728 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9729 // whether the returned error was because http.StatusNotModified was returned. 9730 func (c *EnterprisesWebAppsGetCall) Do(opts ...googleapi.CallOption) (*WebApp, error) { 9731 gensupport.SetOptions(c.urlParams_, opts...) 9732 res, err := c.doRequest("json") 9733 if res != nil && res.StatusCode == http.StatusNotModified { 9734 if res.Body != nil { 9735 res.Body.Close() 9736 } 9737 return nil, gensupport.WrapError(&googleapi.Error{ 9738 Code: res.StatusCode, 9739 Header: res.Header, 9740 }) 9741 } 9742 if err != nil { 9743 return nil, err 9744 } 9745 defer googleapi.CloseBody(res) 9746 if err := googleapi.CheckResponse(res); err != nil { 9747 return nil, gensupport.WrapError(err) 9748 } 9749 ret := &WebApp{ 9750 ServerResponse: googleapi.ServerResponse{ 9751 Header: res.Header, 9752 HTTPStatusCode: res.StatusCode, 9753 }, 9754 } 9755 target := &ret 9756 if err := gensupport.DecodeResponse(target, res); err != nil { 9757 return nil, err 9758 } 9759 return ret, nil 9760 } 9761 9762 type EnterprisesWebAppsListCall struct { 9763 s *Service 9764 parent string 9765 urlParams_ gensupport.URLParams 9766 ifNoneMatch_ string 9767 ctx_ context.Context 9768 header_ http.Header 9769 } 9770 9771 // List: Lists web apps for a given enterprise. 9772 // 9773 // - parent: The name of the enterprise in the form enterprises/{enterpriseId}. 9774 func (r *EnterprisesWebAppsService) List(parent string) *EnterprisesWebAppsListCall { 9775 c := &EnterprisesWebAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9776 c.parent = parent 9777 return c 9778 } 9779 9780 // PageSize sets the optional parameter "pageSize": The requested page size. 9781 // This is a hint and the actual page size in the response may be different. 9782 func (c *EnterprisesWebAppsListCall) PageSize(pageSize int64) *EnterprisesWebAppsListCall { 9783 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9784 return c 9785 } 9786 9787 // PageToken sets the optional parameter "pageToken": A token identifying a 9788 // page of results returned by the server. 9789 func (c *EnterprisesWebAppsListCall) PageToken(pageToken string) *EnterprisesWebAppsListCall { 9790 c.urlParams_.Set("pageToken", pageToken) 9791 return c 9792 } 9793 9794 // Fields allows partial responses to be retrieved. See 9795 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9796 // details. 9797 func (c *EnterprisesWebAppsListCall) Fields(s ...googleapi.Field) *EnterprisesWebAppsListCall { 9798 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9799 return c 9800 } 9801 9802 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9803 // object's ETag matches the given value. This is useful for getting updates 9804 // only after the object has changed since the last request. 9805 func (c *EnterprisesWebAppsListCall) IfNoneMatch(entityTag string) *EnterprisesWebAppsListCall { 9806 c.ifNoneMatch_ = entityTag 9807 return c 9808 } 9809 9810 // Context sets the context to be used in this call's Do method. 9811 func (c *EnterprisesWebAppsListCall) Context(ctx context.Context) *EnterprisesWebAppsListCall { 9812 c.ctx_ = ctx 9813 return c 9814 } 9815 9816 // Header returns a http.Header that can be modified by the caller to add 9817 // headers to the request. 9818 func (c *EnterprisesWebAppsListCall) Header() http.Header { 9819 if c.header_ == nil { 9820 c.header_ = make(http.Header) 9821 } 9822 return c.header_ 9823 } 9824 9825 func (c *EnterprisesWebAppsListCall) doRequest(alt string) (*http.Response, error) { 9826 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9827 if c.ifNoneMatch_ != "" { 9828 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9829 } 9830 var body io.Reader = nil 9831 c.urlParams_.Set("alt", alt) 9832 c.urlParams_.Set("prettyPrint", "false") 9833 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/webApps") 9834 urls += "?" + c.urlParams_.Encode() 9835 req, err := http.NewRequest("GET", urls, body) 9836 if err != nil { 9837 return nil, err 9838 } 9839 req.Header = reqHeaders 9840 googleapi.Expand(req.URL, map[string]string{ 9841 "parent": c.parent, 9842 }) 9843 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9844 } 9845 9846 // Do executes the "androidmanagement.enterprises.webApps.list" call. 9847 // Any non-2xx status code is an error. Response headers are in either 9848 // *ListWebAppsResponse.ServerResponse.Header or (if a response was returned at 9849 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9850 // check whether the returned error was because http.StatusNotModified was 9851 // returned. 9852 func (c *EnterprisesWebAppsListCall) Do(opts ...googleapi.CallOption) (*ListWebAppsResponse, error) { 9853 gensupport.SetOptions(c.urlParams_, opts...) 9854 res, err := c.doRequest("json") 9855 if res != nil && res.StatusCode == http.StatusNotModified { 9856 if res.Body != nil { 9857 res.Body.Close() 9858 } 9859 return nil, gensupport.WrapError(&googleapi.Error{ 9860 Code: res.StatusCode, 9861 Header: res.Header, 9862 }) 9863 } 9864 if err != nil { 9865 return nil, err 9866 } 9867 defer googleapi.CloseBody(res) 9868 if err := googleapi.CheckResponse(res); err != nil { 9869 return nil, gensupport.WrapError(err) 9870 } 9871 ret := &ListWebAppsResponse{ 9872 ServerResponse: googleapi.ServerResponse{ 9873 Header: res.Header, 9874 HTTPStatusCode: res.StatusCode, 9875 }, 9876 } 9877 target := &ret 9878 if err := gensupport.DecodeResponse(target, res); err != nil { 9879 return nil, err 9880 } 9881 return ret, nil 9882 } 9883 9884 // Pages invokes f for each page of results. 9885 // A non-nil error returned from f will halt the iteration. 9886 // The provided context supersedes any context provided to the Context method. 9887 func (c *EnterprisesWebAppsListCall) Pages(ctx context.Context, f func(*ListWebAppsResponse) error) error { 9888 c.ctx_ = ctx 9889 defer c.PageToken(c.urlParams_.Get("pageToken")) 9890 for { 9891 x, err := c.Do() 9892 if err != nil { 9893 return err 9894 } 9895 if err := f(x); err != nil { 9896 return err 9897 } 9898 if x.NextPageToken == "" { 9899 return nil 9900 } 9901 c.PageToken(x.NextPageToken) 9902 } 9903 } 9904 9905 type EnterprisesWebAppsPatchCall struct { 9906 s *Service 9907 name string 9908 webapp *WebApp 9909 urlParams_ gensupport.URLParams 9910 ctx_ context.Context 9911 header_ http.Header 9912 } 9913 9914 // Patch: Updates a web app. 9915 // 9916 // - name: The name of the web app in the form 9917 // enterprises/{enterpriseId}/webApps/{packageName}. 9918 func (r *EnterprisesWebAppsService) Patch(name string, webapp *WebApp) *EnterprisesWebAppsPatchCall { 9919 c := &EnterprisesWebAppsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9920 c.name = name 9921 c.webapp = webapp 9922 return c 9923 } 9924 9925 // UpdateMask sets the optional parameter "updateMask": The field mask 9926 // indicating the fields to update. If not set, all modifiable fields will be 9927 // modified. 9928 func (c *EnterprisesWebAppsPatchCall) UpdateMask(updateMask string) *EnterprisesWebAppsPatchCall { 9929 c.urlParams_.Set("updateMask", updateMask) 9930 return c 9931 } 9932 9933 // Fields allows partial responses to be retrieved. See 9934 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9935 // details. 9936 func (c *EnterprisesWebAppsPatchCall) Fields(s ...googleapi.Field) *EnterprisesWebAppsPatchCall { 9937 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9938 return c 9939 } 9940 9941 // Context sets the context to be used in this call's Do method. 9942 func (c *EnterprisesWebAppsPatchCall) Context(ctx context.Context) *EnterprisesWebAppsPatchCall { 9943 c.ctx_ = ctx 9944 return c 9945 } 9946 9947 // Header returns a http.Header that can be modified by the caller to add 9948 // headers to the request. 9949 func (c *EnterprisesWebAppsPatchCall) Header() http.Header { 9950 if c.header_ == nil { 9951 c.header_ = make(http.Header) 9952 } 9953 return c.header_ 9954 } 9955 9956 func (c *EnterprisesWebAppsPatchCall) doRequest(alt string) (*http.Response, error) { 9957 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9958 var body io.Reader = nil 9959 body, err := googleapi.WithoutDataWrapper.JSONReader(c.webapp) 9960 if err != nil { 9961 return nil, err 9962 } 9963 c.urlParams_.Set("alt", alt) 9964 c.urlParams_.Set("prettyPrint", "false") 9965 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 9966 urls += "?" + c.urlParams_.Encode() 9967 req, err := http.NewRequest("PATCH", urls, body) 9968 if err != nil { 9969 return nil, err 9970 } 9971 req.Header = reqHeaders 9972 googleapi.Expand(req.URL, map[string]string{ 9973 "name": c.name, 9974 }) 9975 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9976 } 9977 9978 // Do executes the "androidmanagement.enterprises.webApps.patch" call. 9979 // Any non-2xx status code is an error. Response headers are in either 9980 // *WebApp.ServerResponse.Header or (if a response was returned at all) in 9981 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9982 // whether the returned error was because http.StatusNotModified was returned. 9983 func (c *EnterprisesWebAppsPatchCall) Do(opts ...googleapi.CallOption) (*WebApp, error) { 9984 gensupport.SetOptions(c.urlParams_, opts...) 9985 res, err := c.doRequest("json") 9986 if res != nil && res.StatusCode == http.StatusNotModified { 9987 if res.Body != nil { 9988 res.Body.Close() 9989 } 9990 return nil, gensupport.WrapError(&googleapi.Error{ 9991 Code: res.StatusCode, 9992 Header: res.Header, 9993 }) 9994 } 9995 if err != nil { 9996 return nil, err 9997 } 9998 defer googleapi.CloseBody(res) 9999 if err := googleapi.CheckResponse(res); err != nil { 10000 return nil, gensupport.WrapError(err) 10001 } 10002 ret := &WebApp{ 10003 ServerResponse: googleapi.ServerResponse{ 10004 Header: res.Header, 10005 HTTPStatusCode: res.StatusCode, 10006 }, 10007 } 10008 target := &ret 10009 if err := gensupport.DecodeResponse(target, res); err != nil { 10010 return nil, err 10011 } 10012 return ret, nil 10013 } 10014 10015 type EnterprisesWebTokensCreateCall struct { 10016 s *Service 10017 parent string 10018 webtoken *WebToken 10019 urlParams_ gensupport.URLParams 10020 ctx_ context.Context 10021 header_ http.Header 10022 } 10023 10024 // Create: Creates a web token to access an embeddable managed Google Play web 10025 // UI for a given enterprise. 10026 // 10027 // - parent: The name of the enterprise in the form enterprises/{enterpriseId}. 10028 func (r *EnterprisesWebTokensService) Create(parent string, webtoken *WebToken) *EnterprisesWebTokensCreateCall { 10029 c := &EnterprisesWebTokensCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10030 c.parent = parent 10031 c.webtoken = webtoken 10032 return c 10033 } 10034 10035 // Fields allows partial responses to be retrieved. See 10036 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10037 // details. 10038 func (c *EnterprisesWebTokensCreateCall) Fields(s ...googleapi.Field) *EnterprisesWebTokensCreateCall { 10039 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10040 return c 10041 } 10042 10043 // Context sets the context to be used in this call's Do method. 10044 func (c *EnterprisesWebTokensCreateCall) Context(ctx context.Context) *EnterprisesWebTokensCreateCall { 10045 c.ctx_ = ctx 10046 return c 10047 } 10048 10049 // Header returns a http.Header that can be modified by the caller to add 10050 // headers to the request. 10051 func (c *EnterprisesWebTokensCreateCall) Header() http.Header { 10052 if c.header_ == nil { 10053 c.header_ = make(http.Header) 10054 } 10055 return c.header_ 10056 } 10057 10058 func (c *EnterprisesWebTokensCreateCall) doRequest(alt string) (*http.Response, error) { 10059 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10060 var body io.Reader = nil 10061 body, err := googleapi.WithoutDataWrapper.JSONReader(c.webtoken) 10062 if err != nil { 10063 return nil, err 10064 } 10065 c.urlParams_.Set("alt", alt) 10066 c.urlParams_.Set("prettyPrint", "false") 10067 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/webTokens") 10068 urls += "?" + c.urlParams_.Encode() 10069 req, err := http.NewRequest("POST", urls, body) 10070 if err != nil { 10071 return nil, err 10072 } 10073 req.Header = reqHeaders 10074 googleapi.Expand(req.URL, map[string]string{ 10075 "parent": c.parent, 10076 }) 10077 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10078 } 10079 10080 // Do executes the "androidmanagement.enterprises.webTokens.create" call. 10081 // Any non-2xx status code is an error. Response headers are in either 10082 // *WebToken.ServerResponse.Header or (if a response was returned at all) in 10083 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10084 // whether the returned error was because http.StatusNotModified was returned. 10085 func (c *EnterprisesWebTokensCreateCall) Do(opts ...googleapi.CallOption) (*WebToken, error) { 10086 gensupport.SetOptions(c.urlParams_, opts...) 10087 res, err := c.doRequest("json") 10088 if res != nil && res.StatusCode == http.StatusNotModified { 10089 if res.Body != nil { 10090 res.Body.Close() 10091 } 10092 return nil, gensupport.WrapError(&googleapi.Error{ 10093 Code: res.StatusCode, 10094 Header: res.Header, 10095 }) 10096 } 10097 if err != nil { 10098 return nil, err 10099 } 10100 defer googleapi.CloseBody(res) 10101 if err := googleapi.CheckResponse(res); err != nil { 10102 return nil, gensupport.WrapError(err) 10103 } 10104 ret := &WebToken{ 10105 ServerResponse: googleapi.ServerResponse{ 10106 Header: res.Header, 10107 HTTPStatusCode: res.StatusCode, 10108 }, 10109 } 10110 target := &ret 10111 if err := gensupport.DecodeResponse(target, res); err != nil { 10112 return nil, err 10113 } 10114 return ret, nil 10115 } 10116 10117 type ProvisioningInfoGetCall struct { 10118 s *Service 10119 nameid string 10120 urlParams_ gensupport.URLParams 10121 ifNoneMatch_ string 10122 ctx_ context.Context 10123 header_ http.Header 10124 } 10125 10126 // Get: Get the device provisioning information by the identifier provided in 10127 // the sign-in url. 10128 // 10129 // - name: The identifier that Android Device Policy passes to the 3P sign-in 10130 // page in the form of provisioningInfo/{provisioning_info}. 10131 func (r *ProvisioningInfoService) Get(nameid string) *ProvisioningInfoGetCall { 10132 c := &ProvisioningInfoGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10133 c.nameid = nameid 10134 return c 10135 } 10136 10137 // Fields allows partial responses to be retrieved. See 10138 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10139 // details. 10140 func (c *ProvisioningInfoGetCall) Fields(s ...googleapi.Field) *ProvisioningInfoGetCall { 10141 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10142 return c 10143 } 10144 10145 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10146 // object's ETag matches the given value. This is useful for getting updates 10147 // only after the object has changed since the last request. 10148 func (c *ProvisioningInfoGetCall) IfNoneMatch(entityTag string) *ProvisioningInfoGetCall { 10149 c.ifNoneMatch_ = entityTag 10150 return c 10151 } 10152 10153 // Context sets the context to be used in this call's Do method. 10154 func (c *ProvisioningInfoGetCall) Context(ctx context.Context) *ProvisioningInfoGetCall { 10155 c.ctx_ = ctx 10156 return c 10157 } 10158 10159 // Header returns a http.Header that can be modified by the caller to add 10160 // headers to the request. 10161 func (c *ProvisioningInfoGetCall) Header() http.Header { 10162 if c.header_ == nil { 10163 c.header_ = make(http.Header) 10164 } 10165 return c.header_ 10166 } 10167 10168 func (c *ProvisioningInfoGetCall) doRequest(alt string) (*http.Response, error) { 10169 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10170 if c.ifNoneMatch_ != "" { 10171 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10172 } 10173 var body io.Reader = nil 10174 c.urlParams_.Set("alt", alt) 10175 c.urlParams_.Set("prettyPrint", "false") 10176 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 10177 urls += "?" + c.urlParams_.Encode() 10178 req, err := http.NewRequest("GET", urls, body) 10179 if err != nil { 10180 return nil, err 10181 } 10182 req.Header = reqHeaders 10183 googleapi.Expand(req.URL, map[string]string{ 10184 "name": c.nameid, 10185 }) 10186 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10187 } 10188 10189 // Do executes the "androidmanagement.provisioningInfo.get" call. 10190 // Any non-2xx status code is an error. Response headers are in either 10191 // *ProvisioningInfo.ServerResponse.Header or (if a response was returned at 10192 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10193 // check whether the returned error was because http.StatusNotModified was 10194 // returned. 10195 func (c *ProvisioningInfoGetCall) Do(opts ...googleapi.CallOption) (*ProvisioningInfo, error) { 10196 gensupport.SetOptions(c.urlParams_, opts...) 10197 res, err := c.doRequest("json") 10198 if res != nil && res.StatusCode == http.StatusNotModified { 10199 if res.Body != nil { 10200 res.Body.Close() 10201 } 10202 return nil, gensupport.WrapError(&googleapi.Error{ 10203 Code: res.StatusCode, 10204 Header: res.Header, 10205 }) 10206 } 10207 if err != nil { 10208 return nil, err 10209 } 10210 defer googleapi.CloseBody(res) 10211 if err := googleapi.CheckResponse(res); err != nil { 10212 return nil, gensupport.WrapError(err) 10213 } 10214 ret := &ProvisioningInfo{ 10215 ServerResponse: googleapi.ServerResponse{ 10216 Header: res.Header, 10217 HTTPStatusCode: res.StatusCode, 10218 }, 10219 } 10220 target := &ret 10221 if err := gensupport.DecodeResponse(target, res); err != nil { 10222 return nil, err 10223 } 10224 return ret, nil 10225 } 10226 10227 type SignupUrlsCreateCall struct { 10228 s *Service 10229 urlParams_ gensupport.URLParams 10230 ctx_ context.Context 10231 header_ http.Header 10232 } 10233 10234 // Create: Creates an enterprise signup URL. 10235 func (r *SignupUrlsService) Create() *SignupUrlsCreateCall { 10236 c := &SignupUrlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10237 return c 10238 } 10239 10240 // CallbackUrl sets the optional parameter "callbackUrl": The callback URL that 10241 // the admin will be redirected to after successfully creating an enterprise. 10242 // Before redirecting there the system will add a query parameter to this URL 10243 // named enterpriseToken which will contain an opaque token to be used for the 10244 // create enterprise request. The URL will be parsed then reformatted in order 10245 // to add the enterpriseToken parameter, so there may be some minor formatting 10246 // changes. 10247 func (c *SignupUrlsCreateCall) CallbackUrl(callbackUrl string) *SignupUrlsCreateCall { 10248 c.urlParams_.Set("callbackUrl", callbackUrl) 10249 return c 10250 } 10251 10252 // ProjectId sets the optional parameter "projectId": The ID of the Google 10253 // Cloud Platform project which will own the enterprise. 10254 func (c *SignupUrlsCreateCall) ProjectId(projectId string) *SignupUrlsCreateCall { 10255 c.urlParams_.Set("projectId", projectId) 10256 return c 10257 } 10258 10259 // Fields allows partial responses to be retrieved. See 10260 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10261 // details. 10262 func (c *SignupUrlsCreateCall) Fields(s ...googleapi.Field) *SignupUrlsCreateCall { 10263 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10264 return c 10265 } 10266 10267 // Context sets the context to be used in this call's Do method. 10268 func (c *SignupUrlsCreateCall) Context(ctx context.Context) *SignupUrlsCreateCall { 10269 c.ctx_ = ctx 10270 return c 10271 } 10272 10273 // Header returns a http.Header that can be modified by the caller to add 10274 // headers to the request. 10275 func (c *SignupUrlsCreateCall) Header() http.Header { 10276 if c.header_ == nil { 10277 c.header_ = make(http.Header) 10278 } 10279 return c.header_ 10280 } 10281 10282 func (c *SignupUrlsCreateCall) doRequest(alt string) (*http.Response, error) { 10283 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10284 var body io.Reader = nil 10285 c.urlParams_.Set("alt", alt) 10286 c.urlParams_.Set("prettyPrint", "false") 10287 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/signupUrls") 10288 urls += "?" + c.urlParams_.Encode() 10289 req, err := http.NewRequest("POST", urls, body) 10290 if err != nil { 10291 return nil, err 10292 } 10293 req.Header = reqHeaders 10294 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10295 } 10296 10297 // Do executes the "androidmanagement.signupUrls.create" call. 10298 // Any non-2xx status code is an error. Response headers are in either 10299 // *SignupUrl.ServerResponse.Header or (if a response was returned at all) in 10300 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10301 // whether the returned error was because http.StatusNotModified was returned. 10302 func (c *SignupUrlsCreateCall) Do(opts ...googleapi.CallOption) (*SignupUrl, error) { 10303 gensupport.SetOptions(c.urlParams_, opts...) 10304 res, err := c.doRequest("json") 10305 if res != nil && res.StatusCode == http.StatusNotModified { 10306 if res.Body != nil { 10307 res.Body.Close() 10308 } 10309 return nil, gensupport.WrapError(&googleapi.Error{ 10310 Code: res.StatusCode, 10311 Header: res.Header, 10312 }) 10313 } 10314 if err != nil { 10315 return nil, err 10316 } 10317 defer googleapi.CloseBody(res) 10318 if err := googleapi.CheckResponse(res); err != nil { 10319 return nil, gensupport.WrapError(err) 10320 } 10321 ret := &SignupUrl{ 10322 ServerResponse: googleapi.ServerResponse{ 10323 Header: res.Header, 10324 HTTPStatusCode: res.StatusCode, 10325 }, 10326 } 10327 target := &ret 10328 if err := gensupport.DecodeResponse(target, res); err != nil { 10329 return nil, err 10330 } 10331 return ret, nil 10332 } 10333