Bye bye openapi (#1081)

* add DateTime sans mgo

* change all uses of strfmt.DateTime to common.DateTime, remove test strfmt usage

* remove api tests, system-test dep on api test

multiple reasons to remove the api tests:

* awkward dependency with fn_go meant generating bindings on a branched fn to
vendor those to test new stuff. this is at a minimum not at all intuitive,
worth it, nor a fun way to spend the finite amount of time we have to live.
* api tests only tested a subset of functionality that the server/ api tests
already test, and we risk having tests where one tests some thing and the
other doesn't. let's not. we have too many test suites as it is, and these
pretty much only test that we updated the fn_go bindings, which is actually a
hassle as noted above and the cli will pretty quickly figure out anyway.
* fn_go relies on openapi, which relies on mgo, which is deprecated and we'd
like to remove as a dependency. openapi is a _huge_ dep built in a NIH
fashion, that cannot simply remove the mgo dep as users may be using it.
we've now stolen their date time and otherwise killed usage of it in fn core,
for fn_go it still exists but that's less of a problem.

* update deps

removals:

* easyjson
* mgo
* go-openapi
* mapstructure
* fn_go
* purell
* go-validator

also, had to lock docker. we shouldn't use docker on master anyway, they
strongly advise against that. had no luck with latest version rev, so i locked
it to what we were using before. until next time.

the rest is just playing dep roulette, those end up removing a ton tho

* fix exec test to work

* account for john le cache
This commit is contained in:
Reed Allman
2018-06-21 11:09:16 -07:00
committed by GitHub
parent aa5d7169f4
commit 51ff7caeb2
2635 changed files with 440440 additions and 402994 deletions

View File

@@ -60,11 +60,6 @@
"location": "query",
"type": "string"
},
"bearer_token": {
"description": "OAuth bearer token.",
"location": "query",
"type": "string"
},
"callback": {
"description": "JSONP",
"location": "query",
@@ -85,12 +80,6 @@
"location": "query",
"type": "string"
},
"pp": {
"default": "true",
"description": "Pretty-print response.",
"location": "query",
"type": "boolean"
},
"prettyPrint": {
"default": "true",
"description": "Returns response with indentations and line breaks.",
@@ -766,7 +755,7 @@
}
}
},
"revision": "20180305",
"revision": "20180604",
"rootUrl": "https://androidmanagement.googleapis.com/",
"schemas": {
"AlwaysOnVpnPackage": {
@@ -825,6 +814,44 @@
},
"type": "object"
},
"ApplicationEvent": {
"description": "An app-related event.",
"id": "ApplicationEvent",
"properties": {
"createTime": {
"description": "The creation time of the event.",
"format": "google-datetime",
"type": "string"
},
"eventType": {
"description": "App event type.",
"enum": [
"APPLICATION_EVENT_TYPE_UNSPECIFIED",
"INSTALLED",
"CHANGED",
"DATA_CLEARED",
"REMOVED",
"REPLACED",
"RESTARTED",
"PINNED",
"UNPINNED"
],
"enumDescriptions": [
"This value is disallowed.",
"The app was installed.",
"The app was changed, for example, a component was enabled or disabled.",
"The app data was cleared.",
"The app was removed.",
"A new version of the app has been installed, replacing the old version.",
"The app was restarted.",
"The app was pinned to the foreground.",
"The app was unpinned."
],
"type": "string"
}
},
"type": "object"
},
"ApplicationPermission": {
"description": "A permission required by the app.",
"id": "ApplicationPermission",
@@ -849,7 +876,7 @@
"id": "ApplicationPolicy",
"properties": {
"defaultPermissionPolicy": {
"description": "The default policy for all permissions requested by the app. If specified, this overrides the policy-level default_permission_policy which applies to all apps.",
"description": "The default policy for all permissions requested by the app. If specified, this overrides the policy-level default_permission_policy which applies to all apps. It does not override the permission_grants which applies to all apps.",
"enum": [
"PERMISSION_POLICY_UNSPECIFIED",
"PROMPT",
@@ -889,17 +916,23 @@
},
"type": "array"
},
"disabled": {
"description": "Whether the app is disabled. When disabled, the app data is still preserved.",
"type": "boolean"
},
"installType": {
"description": "The type of installation to perform.",
"enum": [
"INSTALL_TYPE_UNSPECIFIED",
"PREINSTALLED",
"FORCE_INSTALLED"
"FORCE_INSTALLED",
"AVAILABLE"
],
"enumDescriptions": [
"No automatic installation is performed. Any other app policies will be applied if the user installs the app.",
"Unspecified. Defaults to AVAILABLE.",
"The app is automatically installed and can be removed by the user.",
"The app is automatically installed and can't be removed by the user."
"The app is automatically installed and can't be removed by the user.",
"The app is available to install."
],
"type": "string"
},
@@ -925,7 +958,7 @@
"type": "string"
},
"permissionGrants": {
"description": "Explicit permission grants or denials for the app. These values override the default_permission_policy.",
"description": "Explicit permission grants or denials for the app. These values override the default_permission_policy and permission_grants which apply to all apps.",
"items": {
"$ref": "PermissionGrant"
},
@@ -934,6 +967,102 @@
},
"type": "object"
},
"ApplicationReport": {
"description": "Information reported about an installed app.",
"id": "ApplicationReport",
"properties": {
"applicationSource": {
"description": "The source of the package.",
"enum": [
"APPLICATION_SOURCE_UNSPECIFIED",
"SYSTEM_APP_FACTORY_VERSION",
"SYSTEM_APP_UPDATED_VERSION",
"INSTALLED_FROM_PLAY_STORE"
],
"enumDescriptions": [
"The app was sideloaded from an unspecified source.",
"This is a system app from the device's factory image.",
"This is an updated system app.",
"The app was installed from the Google Play Store."
],
"type": "string"
},
"displayName": {
"description": "The display name of the app.",
"type": "string"
},
"events": {
"description": "List of app events. The most recent 20 events are stored in the list.",
"items": {
"$ref": "ApplicationEvent"
},
"type": "array"
},
"installerPackageName": {
"description": "The package name of the app that installed this app.",
"type": "string"
},
"packageName": {
"description": "Package name of the app.",
"type": "string"
},
"packageSha256Hash": {
"description": "The SHA-256 hash of the app's APK file, which can be used to verify the app hasn't been modified. Each byte of the hash value is represented as a two-digit hexadecimal number.",
"type": "string"
},
"signingKeyCertFingerprints": {
"description": "The SHA-1 hash of each android.content.pm.Signature (https://developer.android.com/reference/android/content/pm/Signature.html) associated with the app package. Each byte of each hash value is represented as a two-digit hexadecimal number.",
"items": {
"type": "string"
},
"type": "array"
},
"state": {
"description": "Application state.",
"enum": [
"INSTALLED",
"REMOVED"
],
"enumDescriptions": [
"App is installed on the device",
"App was removed from the device"
],
"type": "string"
},
"versionCode": {
"description": "The app version code, which can be used to determine whether one version is more recent than another.",
"format": "int32",
"type": "integer"
},
"versionName": {
"description": "The app version as displayed to the user.",
"type": "string"
}
},
"type": "object"
},
"ChoosePrivateKeyRule": {
"description": "A rule for automatically choosing a private key and certificate to authenticate the device to a server.",
"id": "ChoosePrivateKeyRule",
"properties": {
"packageNames": {
"description": "The package names for which outgoing requests are subject to this rule. If no package names are specified, then the rule applies to all packages. For each package name listed, the rule applies to that package and all other packages that shared the same Android UID. The SHA256 hash of the signing key signatures of each package_name will be verified against those provided by Play",
"items": {
"type": "string"
},
"type": "array"
},
"privateKeyAlias": {
"description": "The alias of the private key to be used.",
"type": "string"
},
"urlPattern": {
"description": "The URL pattern to match against the URL of the outgoing request. The pattern may contain asterisk (*) wildcards. Any URL is matched if unspecified.",
"type": "string"
}
},
"type": "object"
},
"Command": {
"description": "A command.",
"id": "Command",
@@ -948,6 +1077,26 @@
"format": "google-duration",
"type": "string"
},
"errorCode": {
"description": "If the command failed, an error code explaining the failure. This is not set when the command is cancelled by the caller.",
"enum": [
"COMMAND_ERROR_CODE_UNSPECIFIED",
"UNKNOWN",
"API_LEVEL",
"MANAGEMENT_MODE",
"INVALID_VALUE",
"UNSUPPORTED"
],
"enumDescriptions": [
"There was no error.",
"An unknown error occurred.",
"The API level of the device does not support this command.",
"The management mode (profile owner, device owner, etc.) does not support the command.",
"The command has an invalid parameter value.",
"The device doesn't support the command. Updating Android Device Policy to the latest version may resolve the issue."
],
"type": "string"
},
"newPassword": {
"description": "For commands of type RESET_PASSWORD, optionally specifies the new password.",
"type": "string"
@@ -1022,6 +1171,13 @@
"format": "int32",
"type": "integer"
},
"applicationReports": {
"description": "Reports for apps installed on the device. This information is only available when application_reports_enabled is true in the device's policy.",
"items": {
"$ref": "ApplicationReport"
},
"type": "array"
},
"appliedPolicyName": {
"description": "The name of the policy currently applied to the device.",
"type": "string"
@@ -1089,7 +1245,7 @@
"type": "array"
},
"lastPolicyComplianceReportTime": {
"description": "The last time the device sent a policy compliance report.",
"description": "The last time the device sent a policy compliance report. Important: This field is deprecated. The timestamp will be on last_status_report_time field, and last_status_report_time will be used for both status report and compliance report.",
"format": "google-datetime",
"type": "string"
},
@@ -1335,7 +1491,7 @@
"id": "Enterprise",
"properties": {
"appAutoApprovalEnabled": {
"description": "Whether permissions for apps installed via policy are automatically approved. If enabled, you must display an app's permissions to the enterprise admin before setting the app to be installed in a policy.",
"description": "Deprecated and unused.",
"type": "boolean"
},
"enabledNotificationTypes": {
@@ -1343,7 +1499,7 @@
"enumDescriptions": [
"This value is ignored.",
"A notification sent when a device enrolls.",
"A notification sent when a device issues a policy compliance report.",
"A notification sent when a device issues a policy compliance report. Important: This enum value is deprecated. The notification will be sent as STATUS_REPORT.",
"A notification sent when a device issues a status report.",
"A notification sent when a device command has completed."
],
@@ -1379,6 +1535,13 @@
"pubsubTopic": {
"description": "The topic that Cloud Pub/Sub notifications are published to, in the form projects/{project}/topics/{topic}. This field is only required if Pub/Sub notifications are enabled.",
"type": "string"
},
"termsAndConditions": {
"description": "Terms and conditions that must be accepted when provisioning a device for this enterprise. A page of terms is generated for each value in this list.",
"items": {
"$ref": "TermsAndConditions"
},
"type": "array"
}
},
"type": "object"
@@ -2023,7 +2186,7 @@
"id": "PermissionGrant",
"properties": {
"permission": {
"description": "The android permission, e.g. android.permission.READ_CALENDAR.",
"description": "The android permission or group, e.g. android.permission.READ_CALENDAR or android.permission_group.CALENDAR.",
"type": "string"
},
"policy": {
@@ -2111,7 +2274,7 @@
"type": "array"
},
"appAutoUpdatePolicy": {
"description": "The auto update policy value. Specifies whether the user is given a choice to configure the app update policy, or otherwise contains the enforced update policy",
"description": "The app auto update policy, which controls when automatic app updates can be applied.",
"enum": [
"APP_AUTO_UPDATE_POLICY_UNSPECIFIED",
"CHOICE_TO_THE_USER",
@@ -2120,7 +2283,7 @@
"ALWAYS"
],
"enumDescriptions": [
"The auto-update policy is not set. Same as giving auto-update policy choice to the user.",
"The auto-update policy is not set. Equivalent to CHOICE_TO_THE_USER.",
"The user can control auto-updates.",
"Apps are never auto-updated.",
"Apps are auto-updated over Wi-Fi only.",
@@ -2163,6 +2326,13 @@
"description": "Whether configuring cell broadcast is disabled.",
"type": "boolean"
},
"choosePrivateKeyRules": {
"description": "Rules for automatically choosing a private key and certificate to authenticate the device to a server. The rules are ordered by increasing precedence, so if an outgoing request matches more than one rule, the last rule defines which private key to use.",
"items": {
"$ref": "ChoosePrivateKeyRule"
},
"type": "array"
},
"complianceRules": {
"description": "Rules declaring which mitigating actions to take when a device is not compliant with its policy. When the conditions for multiple rules are satisfied, all of the mitigating actions for the rules are taken. There is a maximum limit of 100 rules.",
"items": {
@@ -2202,6 +2372,24 @@
],
"type": "string"
},
"deviceOwnerLockScreenInfo": {
"$ref": "UserFacingMessage",
"description": "The device owner information to be shown on the lock screen."
},
"encryptionPolicy": {
"description": "Whether encryption is enabled",
"enum": [
"ENCRYPTION_POLICY_UNSPECIFIED",
"ENABLED_WITHOUT_PASSWORD",
"ENABLED_WITH_PASSWORD"
],
"enumDescriptions": [
"This value is ignored, i.e. no encryption required",
"Encryption required but no password required to boot",
"Encryption required with password required to boot"
],
"type": "string"
},
"ensureVerifyAppsEnabled": {
"description": "Whether app verification is force-enabled.",
"type": "boolean"
@@ -2264,6 +2452,24 @@
"description": "Whether the kiosk custom launcher is enabled. This replaces the home screen with a launcher that locks down the device to the apps installed via the applications setting. The apps appear on a single page in alphabetical order. It is recommended to also use status_bar_disabled to block access to device settings.",
"type": "boolean"
},
"locationMode": {
"description": "The degree of location detection enabled. The user may change the value unless the user is otherwise blocked from accessing device settings.",
"enum": [
"LOCATION_MODE_UNSPECIFIED",
"HIGH_ACCURACY",
"SENSORS_ONLY",
"BATTERY_SAVING",
"OFF"
],
"enumDescriptions": [
"The current device value is not modified.",
"All location detection methods are enabled, including GPS, networks, and other sensors.",
"Only GPS and other sensors are enabled.",
"Only the network location provider is enabled.",
"Location detection is disabled."
],
"type": "string"
},
"longSupportMessage": {
"$ref": "UserFacingMessage",
"description": "A message displayed to the user in the device administators settings screen."
@@ -2328,6 +2534,10 @@
},
"type": "array"
},
"privateKeySelectionEnabled": {
"description": "Allows showing UI on a device for a user to choose a private key alias if there are no matching rules in ChoosePrivateKeyRules. For devices below Android P, setting this may leave enterprise keys vulnerable.",
"type": "boolean"
},
"recommendedGlobalProxy": {
"$ref": "ProxyInfo",
"description": "The network-independent global HTTP proxy. Typically proxies should be configured per-network in open_network_configuration. However for unusual configurations like general internal filtering a global HTTP proxy may be useful. If the proxy is not accessible, network access may break. The global proxy is only a recommendation and some apps may ignore it."
@@ -2352,10 +2562,18 @@
"description": "Whether changing the wallpaper is disabled.",
"type": "boolean"
},
"shareLocationDisabled": {
"description": "Whether location sharing is disabled.",
"type": "boolean"
},
"shortSupportMessage": {
"$ref": "UserFacingMessage",
"description": "A message displayed to the user in the settings screen wherever functionality has been disabled by the admin."
},
"skipFirstUseHintsEnabled": {
"description": "Flag to skip hints on the first use. Enterprise admin can enable the system recommendation for apps to skip their user tutorial and other introductory hints on first start-up.",
"type": "boolean"
},
"smsDisabled": {
"description": "Whether sending and receiving SMS messages is disabled.",
"type": "boolean"
@@ -2407,6 +2625,10 @@
"description": "Whether transferring files over USB is disabled.",
"type": "boolean"
},
"usbMassStorageEnabled": {
"description": "Whether USB storage is enabled.",
"type": "boolean"
},
"version": {
"description": "The version of the policy. This is a read-only field. The version is incremented each time the policy is updated.",
"format": "int64",
@@ -2586,6 +2808,10 @@
"description": "Settings controlling the behavior of status reports.",
"id": "StatusReportingSettings",
"properties": {
"applicationReportsEnabled": {
"description": "Whether app reports are enabled.",
"type": "boolean"
},
"deviceSettingsEnabled": {
"description": "Whether device settings reporting is enabled.",
"type": "boolean"
@@ -2650,6 +2876,21 @@
},
"type": "object"
},
"TermsAndConditions": {
"description": "A terms and conditions page to be accepted during provisioning.",
"id": "TermsAndConditions",
"properties": {
"content": {
"$ref": "UserFacingMessage",
"description": "A well-formatted HTML string. It will be parsed on the client with android.text.Html#fromHtml."
},
"header": {
"$ref": "UserFacingMessage",
"description": "A short header which appears above the HTML content."
}
},
"type": "object"
},
"UserFacingMessage": {
"description": "Provides a user-facing message with locale info. The maximum message length is 4096 characters.",
"id": "UserFacingMessage",

View File

@@ -277,6 +277,50 @@ func (s *Application) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ApplicationEvent: An app-related event.
type ApplicationEvent struct {
// CreateTime: The creation time of the event.
CreateTime string `json:"createTime,omitempty"`
// EventType: App event type.
//
// Possible values:
// "APPLICATION_EVENT_TYPE_UNSPECIFIED" - This value is disallowed.
// "INSTALLED" - The app was installed.
// "CHANGED" - The app was changed, for example, a component was
// enabled or disabled.
// "DATA_CLEARED" - The app data was cleared.
// "REMOVED" - The app was removed.
// "REPLACED" - A new version of the app has been installed, replacing
// the old version.
// "RESTARTED" - The app was restarted.
// "PINNED" - The app was pinned to the foreground.
// "UNPINNED" - The app was unpinned.
EventType string `json:"eventType,omitempty"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ApplicationEvent) MarshalJSON() ([]byte, error) {
type NoMethod ApplicationEvent
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ApplicationPermission: A permission required by the app.
type ApplicationPermission struct {
// Description: A longer description of the permission, providing more
@@ -317,7 +361,8 @@ func (s *ApplicationPermission) MarshalJSON() ([]byte, error) {
type ApplicationPolicy struct {
// DefaultPermissionPolicy: The default policy for all permissions
// requested by the app. If specified, this overrides the policy-level
// default_permission_policy which applies to all apps.
// default_permission_policy which applies to all apps. It does not
// override the permission_grants which applies to all apps.
//
// Possible values:
// "PERMISSION_POLICY_UNSPECIFIED" - Policy not specified. If no
@@ -344,16 +389,19 @@ type ApplicationPolicy struct {
// "ENABLE_SYSTEM_APP" - Grants access for enabling system apps.
DelegatedScopes []string `json:"delegatedScopes,omitempty"`
// Disabled: Whether the app is disabled. When disabled, the app data is
// still preserved.
Disabled bool `json:"disabled,omitempty"`
// InstallType: The type of installation to perform.
//
// Possible values:
// "INSTALL_TYPE_UNSPECIFIED" - No automatic installation is
// performed. Any other app policies will be applied if the user
// installs the app.
// "INSTALL_TYPE_UNSPECIFIED" - Unspecified. Defaults to AVAILABLE.
// "PREINSTALLED" - The app is automatically installed and can be
// removed by the user.
// "FORCE_INSTALLED" - The app is automatically installed and can't be
// removed by the user.
// "AVAILABLE" - The app is available to install.
InstallType string `json:"installType,omitempty"`
// LockTaskAllowed: Whether the app is allowed to lock itself in
@@ -389,7 +437,8 @@ type ApplicationPolicy struct {
PackageName string `json:"packageName,omitempty"`
// PermissionGrants: Explicit permission grants or denials for the app.
// These values override the default_permission_policy.
// These values override the default_permission_policy and
// permission_grants which apply to all apps.
PermissionGrants []*PermissionGrant `json:"permissionGrants,omitempty"`
// ForceSendFields is a list of field names (e.g.
@@ -417,6 +466,126 @@ func (s *ApplicationPolicy) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ApplicationReport: Information reported about an installed app.
type ApplicationReport struct {
// ApplicationSource: The source of the package.
//
// Possible values:
// "APPLICATION_SOURCE_UNSPECIFIED" - The app was sideloaded from an
// unspecified source.
// "SYSTEM_APP_FACTORY_VERSION" - This is a system app from the
// device's factory image.
// "SYSTEM_APP_UPDATED_VERSION" - This is an updated system app.
// "INSTALLED_FROM_PLAY_STORE" - The app was installed from the Google
// Play Store.
ApplicationSource string `json:"applicationSource,omitempty"`
// DisplayName: The display name of the app.
DisplayName string `json:"displayName,omitempty"`
// Events: List of app events. The most recent 20 events are stored in
// the list.
Events []*ApplicationEvent `json:"events,omitempty"`
// InstallerPackageName: The package name of the app that installed this
// app.
InstallerPackageName string `json:"installerPackageName,omitempty"`
// PackageName: Package name of the app.
PackageName string `json:"packageName,omitempty"`
// PackageSha256Hash: The SHA-256 hash of the app's APK file, which can
// be used to verify the app hasn't been modified. Each byte of the hash
// value is represented as a two-digit hexadecimal number.
PackageSha256Hash string `json:"packageSha256Hash,omitempty"`
// SigningKeyCertFingerprints: The SHA-1 hash of each
// android.content.pm.Signature
// (https://developer.android.com/reference/android/content/pm/Signature.
// html) associated with the app package. Each byte of each hash value
// is represented as a two-digit hexadecimal number.
SigningKeyCertFingerprints []string `json:"signingKeyCertFingerprints,omitempty"`
// State: Application state.
//
// Possible values:
// "INSTALLED" - App is installed on the device
// "REMOVED" - App was removed from the device
State string `json:"state,omitempty"`
// VersionCode: The app version code, which can be used to determine
// whether one version is more recent than another.
VersionCode int64 `json:"versionCode,omitempty"`
// VersionName: The app version as displayed to the user.
VersionName string `json:"versionName,omitempty"`
// ForceSendFields is a list of field names (e.g. "ApplicationSource")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ApplicationSource") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *ApplicationReport) MarshalJSON() ([]byte, error) {
type NoMethod ApplicationReport
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ChoosePrivateKeyRule: A rule for automatically choosing a private key
// and certificate to authenticate the device to a server.
type ChoosePrivateKeyRule struct {
// PackageNames: The package names for which outgoing requests are
// subject to this rule. If no package names are specified, then the
// rule applies to all packages. For each package name listed, the rule
// applies to that package and all other packages that shared the same
// Android UID. The SHA256 hash of the signing key signatures of each
// package_name will be verified against those provided by Play
PackageNames []string `json:"packageNames,omitempty"`
// PrivateKeyAlias: The alias of the private key to be used.
PrivateKeyAlias string `json:"privateKeyAlias,omitempty"`
// UrlPattern: The URL pattern to match against the URL of the outgoing
// request. The pattern may contain asterisk (*) wildcards. Any URL is
// matched if unspecified.
UrlPattern string `json:"urlPattern,omitempty"`
// ForceSendFields is a list of field names (e.g. "PackageNames") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "PackageNames") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ChoosePrivateKeyRule) MarshalJSON() ([]byte, error) {
type NoMethod ChoosePrivateKeyRule
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Command: A command.
type Command struct {
// CreateTime: The timestamp at which the command was created. The
@@ -429,6 +598,21 @@ type Command struct {
// duration.
Duration string `json:"duration,omitempty"`
// ErrorCode: If the command failed, an error code explaining the
// failure. This is not set when the command is cancelled by the caller.
//
// Possible values:
// "COMMAND_ERROR_CODE_UNSPECIFIED" - There was no error.
// "UNKNOWN" - An unknown error occurred.
// "API_LEVEL" - The API level of the device does not support this
// command.
// "MANAGEMENT_MODE" - The management mode (profile owner, device
// owner, etc.) does not support the command.
// "INVALID_VALUE" - The command has an invalid parameter value.
// "UNSUPPORTED" - The device doesn't support the command. Updating
// Android Device Policy to the latest version may resolve the issue.
ErrorCode string `json:"errorCode,omitempty"`
// NewPassword: For commands of type RESET_PASSWORD, optionally
// specifies the new password.
NewPassword string `json:"newPassword,omitempty"`
@@ -538,6 +722,11 @@ type Device struct {
// the device.
ApiLevel int64 `json:"apiLevel,omitempty"`
// ApplicationReports: Reports for apps installed on the device. This
// information is only available when application_reports_enabled is
// true in the device's policy.
ApplicationReports []*ApplicationReport `json:"applicationReports,omitempty"`
// AppliedPolicyName: The name of the policy currently applied to the
// device.
AppliedPolicyName string `json:"appliedPolicyName,omitempty"`
@@ -594,7 +783,10 @@ type Device struct {
HardwareStatusSamples []*HardwareStatus `json:"hardwareStatusSamples,omitempty"`
// LastPolicyComplianceReportTime: The last time the device sent a
// policy compliance report.
// policy compliance report. Important: This field is deprecated. The
// timestamp will be on last_status_report_time field, and
// last_status_report_time will be used for both status report and
// compliance report.
LastPolicyComplianceReportTime string `json:"lastPolicyComplianceReportTime,omitempty"`
// LastPolicySyncTime: The last time the device fetched its policy.
@@ -910,10 +1102,7 @@ func (s *EnrollmentToken) MarshalJSON() ([]byte, error) {
// Enterprise: The configuration applied to an enterprise.
type Enterprise struct {
// AppAutoApprovalEnabled: Whether permissions for apps installed via
// policy are automatically approved. If enabled, you must display an
// app's permissions to the enterprise admin before setting the app to
// be installed in a policy.
// AppAutoApprovalEnabled: Deprecated and unused.
AppAutoApprovalEnabled bool `json:"appAutoApprovalEnabled,omitempty"`
// EnabledNotificationTypes: The types of Google Pub/Sub notifications
@@ -923,7 +1112,8 @@ type Enterprise struct {
// "NOTIFICATION_TYPE_UNSPECIFIED" - This value is ignored.
// "ENROLLMENT" - A notification sent when a device enrolls.
// "COMPLIANCE_REPORT" - A notification sent when a device issues a
// policy compliance report.
// policy compliance report. Important: This enum value is deprecated.
// The notification will be sent as STATUS_REPORT.
// "STATUS_REPORT" - A notification sent when a device issues a status
// report.
// "COMMAND" - A notification sent when a device command has
@@ -953,6 +1143,11 @@ type Enterprise struct {
// required if Pub/Sub notifications are enabled.
PubsubTopic string `json:"pubsubTopic,omitempty"`
// TermsAndConditions: Terms and conditions that must be accepted when
// provisioning a device for this enterprise. A page of terms is
// generated for each value in this list.
TermsAndConditions []*TermsAndConditions `json:"termsAndConditions,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
@@ -1845,8 +2040,9 @@ func (s *PasswordRequirements) MarshalJSON() ([]byte, error) {
// PermissionGrant: Configuration for an Android permission and its
// grant state.
type PermissionGrant struct {
// Permission: The android permission, e.g.
// android.permission.READ_CALENDAR.
// Permission: The android permission or group, e.g.
// android.permission.READ_CALENDAR or
// android.permission_group.CALENDAR.
Permission string `json:"permission,omitempty"`
// Policy: The policy for granting the permission.
@@ -1959,13 +2155,12 @@ type Policy struct {
// "BETA" - The beta track, which provides the latest beta release.
AndroidDevicePolicyTracks []string `json:"androidDevicePolicyTracks,omitempty"`
// AppAutoUpdatePolicy: The auto update policy value. Specifies whether
// the user is given a choice to configure the app update policy, or
// otherwise contains the enforced update policy
// AppAutoUpdatePolicy: The app auto update policy, which controls when
// automatic app updates can be applied.
//
// Possible values:
// "APP_AUTO_UPDATE_POLICY_UNSPECIFIED" - The auto-update policy is
// not set. Same as giving auto-update policy choice to the user.
// not set. Equivalent to CHOICE_TO_THE_USER.
// "CHOICE_TO_THE_USER" - The user can control auto-updates.
// "NEVER" - Apps are never auto-updated.
// "WIFI_ONLY" - Apps are auto-updated over Wi-Fi only.
@@ -2005,6 +2200,12 @@ type Policy struct {
// disabled.
CellBroadcastsConfigDisabled bool `json:"cellBroadcastsConfigDisabled,omitempty"`
// ChoosePrivateKeyRules: Rules for automatically choosing a private key
// and certificate to authenticate the device to a server. The rules are
// ordered by increasing precedence, so if an outgoing request matches
// more than one rule, the last rule defines which private key to use.
ChoosePrivateKeyRules []*ChoosePrivateKeyRule `json:"choosePrivateKeyRules,omitempty"`
// ComplianceRules: Rules declaring which mitigating actions to take
// when a device is not compliant with its policy. When the conditions
// for multiple rules are satisfied, all of the mitigating actions for
@@ -2038,6 +2239,21 @@ type Policy struct {
// "DENY" - Automatically deny a permission.
DefaultPermissionPolicy string `json:"defaultPermissionPolicy,omitempty"`
// DeviceOwnerLockScreenInfo: The device owner information to be shown
// on the lock screen.
DeviceOwnerLockScreenInfo *UserFacingMessage `json:"deviceOwnerLockScreenInfo,omitempty"`
// EncryptionPolicy: Whether encryption is enabled
//
// Possible values:
// "ENCRYPTION_POLICY_UNSPECIFIED" - This value is ignored, i.e. no
// encryption required
// "ENABLED_WITHOUT_PASSWORD" - Encryption required but no password
// required to boot
// "ENABLED_WITH_PASSWORD" - Encryption required with password
// required to boot
EncryptionPolicy string `json:"encryptionPolicy,omitempty"`
// EnsureVerifyAppsEnabled: Whether app verification is force-enabled.
EnsureVerifyAppsEnabled bool `json:"ensureVerifyAppsEnabled,omitempty"`
@@ -2096,6 +2312,20 @@ type Policy struct {
// settings.
KioskCustomLauncherEnabled bool `json:"kioskCustomLauncherEnabled,omitempty"`
// LocationMode: The degree of location detection enabled. The user may
// change the value unless the user is otherwise blocked from accessing
// device settings.
//
// Possible values:
// "LOCATION_MODE_UNSPECIFIED" - The current device value is not
// modified.
// "HIGH_ACCURACY" - All location detection methods are enabled,
// including GPS, networks, and other sensors.
// "SENSORS_ONLY" - Only GPS and other sensors are enabled.
// "BATTERY_SAVING" - Only the network location provider is enabled.
// "OFF" - Location detection is disabled.
LocationMode string `json:"locationMode,omitempty"`
// LongSupportMessage: A message displayed to the user in the device
// administators settings screen.
LongSupportMessage *UserFacingMessage `json:"longSupportMessage,omitempty"`
@@ -2156,6 +2386,12 @@ type Policy struct {
// PersistentPreferredActivities: Default intent handler activities.
PersistentPreferredActivities []*PersistentPreferredActivity `json:"persistentPreferredActivities,omitempty"`
// PrivateKeySelectionEnabled: Allows showing UI on a device for a user
// to choose a private key alias if there are no matching rules in
// ChoosePrivateKeyRules. For devices below Android P, setting this may
// leave enterprise keys vulnerable.
PrivateKeySelectionEnabled bool `json:"privateKeySelectionEnabled,omitempty"`
// RecommendedGlobalProxy: The network-independent global HTTP proxy.
// Typically proxies should be configured per-network in
// open_network_configuration. However for unusual configurations like
@@ -2180,10 +2416,19 @@ type Policy struct {
// SetWallpaperDisabled: Whether changing the wallpaper is disabled.
SetWallpaperDisabled bool `json:"setWallpaperDisabled,omitempty"`
// ShareLocationDisabled: Whether location sharing is disabled.
ShareLocationDisabled bool `json:"shareLocationDisabled,omitempty"`
// ShortSupportMessage: A message displayed to the user in the settings
// screen wherever functionality has been disabled by the admin.
ShortSupportMessage *UserFacingMessage `json:"shortSupportMessage,omitempty"`
// SkipFirstUseHintsEnabled: Flag to skip hints on the first use.
// Enterprise admin can enable the system recommendation for apps to
// skip their user tutorial and other introductory hints on first
// start-up.
SkipFirstUseHintsEnabled bool `json:"skipFirstUseHintsEnabled,omitempty"`
// SmsDisabled: Whether sending and receiving SMS messages is disabled.
SmsDisabled bool `json:"smsDisabled,omitempty"`
@@ -2228,6 +2473,9 @@ type Policy struct {
// disabled.
UsbFileTransferDisabled bool `json:"usbFileTransferDisabled,omitempty"`
// UsbMassStorageEnabled: Whether USB storage is enabled.
UsbMassStorageEnabled bool `json:"usbMassStorageEnabled,omitempty"`
// Version: The version of the policy. This is a read-only field. The
// version is incremented each time the policy is updated.
Version int64 `json:"version,omitempty,string"`
@@ -2549,6 +2797,9 @@ func (s *Status) MarshalJSON() ([]byte, error) {
// StatusReportingSettings: Settings controlling the behavior of status
// reports.
type StatusReportingSettings struct {
// ApplicationReportsEnabled: Whether app reports are enabled.
ApplicationReportsEnabled bool `json:"applicationReportsEnabled,omitempty"`
// DeviceSettingsEnabled: Whether device settings reporting is enabled.
DeviceSettingsEnabled bool `json:"deviceSettingsEnabled,omitempty"`
@@ -2572,21 +2823,21 @@ type StatusReportingSettings struct {
SoftwareInfoEnabled bool `json:"softwareInfoEnabled,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "DeviceSettingsEnabled") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// "ApplicationReportsEnabled") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DeviceSettingsEnabled") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
// NullFields is a list of field names (e.g.
// "ApplicationReportsEnabled") to include in API requests with the JSON
// null value. By default, fields with empty values are omitted from API
// requests. However, any field with an empty value appearing in
// NullFields will be sent to the server as null. It is an error if a
// field in this list has a non-empty value. This may be used to include
// null fields in Patch requests.
NullFields []string `json:"-"`
}
@@ -2652,6 +2903,39 @@ func (s *SystemUpdate) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// TermsAndConditions: A terms and conditions page to be accepted during
// provisioning.
type TermsAndConditions struct {
// Content: A well-formatted HTML string. It will be parsed on the
// client with android.text.Html#fromHtml.
Content *UserFacingMessage `json:"content,omitempty"`
// Header: A short header which appears above the HTML content.
Header *UserFacingMessage `json:"header,omitempty"`
// ForceSendFields is a list of field names (e.g. "Content") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Content") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *TermsAndConditions) MarshalJSON() ([]byte, error) {
type NoMethod TermsAndConditions
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// UserFacingMessage: Provides a user-facing message with locale info.
// The maximum message length is 4096 characters.
type UserFacingMessage struct {