Index: discovery/googleapis/androiddeviceprovisioning__v1.json |
diff --git a/discovery/googleapis/androiddeviceprovisioning__v1.json b/discovery/googleapis/androiddeviceprovisioning__v1.json |
index 195f0decd07c49ac4ffac7560176697a9240cf45..5cf50ecb414a6ee1f6d2e3391308591961d37d72 100644 |
--- a/discovery/googleapis/androiddeviceprovisioning__v1.json |
+++ b/discovery/googleapis/androiddeviceprovisioning__v1.json |
@@ -16,6 +16,45 @@ |
"ownerDomain": "google.com", |
"ownerName": "Google", |
"parameters": { |
+ "upload_protocol": { |
+ "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", |
+ "location": "query", |
+ "type": "string" |
+ }, |
+ "prettyPrint": { |
+ "default": "true", |
+ "description": "Returns response with indentations and line breaks.", |
+ "location": "query", |
+ "type": "boolean" |
+ }, |
+ "uploadType": { |
+ "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", |
+ "location": "query", |
+ "type": "string" |
+ }, |
+ "fields": { |
+ "description": "Selector specifying which fields to include in a partial response.", |
+ "location": "query", |
+ "type": "string" |
+ }, |
+ "$.xgafv": { |
+ "description": "V1 error format.", |
+ "enum": [ |
+ "1", |
+ "2" |
+ ], |
+ "enumDescriptions": [ |
+ "v1 error format", |
+ "v2 error format" |
+ ], |
+ "location": "query", |
+ "type": "string" |
+ }, |
+ "callback": { |
+ "description": "JSONP", |
+ "location": "query", |
+ "type": "string" |
+ }, |
"alt": { |
"default": "json", |
"description": "Data format for response.", |
@@ -32,13 +71,13 @@ |
"location": "query", |
"type": "string" |
}, |
- "access_token": { |
- "description": "OAuth access token.", |
+ "key": { |
+ "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", |
"location": "query", |
"type": "string" |
}, |
- "key": { |
- "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", |
+ "access_token": { |
+ "description": "OAuth access token.", |
"location": "query", |
"type": "string" |
}, |
@@ -53,52 +92,13 @@ |
"location": "query", |
"type": "boolean" |
}, |
- "bearer_token": { |
- "description": "OAuth bearer token.", |
- "location": "query", |
- "type": "string" |
- }, |
"oauth_token": { |
"description": "OAuth 2.0 token for the current user.", |
"location": "query", |
"type": "string" |
}, |
- "upload_protocol": { |
- "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", |
- "location": "query", |
- "type": "string" |
- }, |
- "prettyPrint": { |
- "default": "true", |
- "description": "Returns response with indentations and line breaks.", |
- "location": "query", |
- "type": "boolean" |
- }, |
- "uploadType": { |
- "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", |
- "location": "query", |
- "type": "string" |
- }, |
- "fields": { |
- "description": "Selector specifying which fields to include in a partial response.", |
- "location": "query", |
- "type": "string" |
- }, |
- "$.xgafv": { |
- "description": "V1 error format.", |
- "enum": [ |
- "1", |
- "2" |
- ], |
- "enumDescriptions": [ |
- "v1 error format", |
- "v2 error format" |
- ], |
- "location": "query", |
- "type": "string" |
- }, |
- "callback": { |
- "description": "JSONP", |
+ "bearer_token": { |
+ "description": "OAuth bearer token.", |
"location": "query", |
"type": "string" |
} |
@@ -109,8 +109,33 @@ |
"resources": { |
"devices": { |
"methods": { |
+ "updateMetadataAsync": { |
+ "description": "Set metadata in batch asynchronously.", |
+ "httpMethod": "POST", |
+ "id": "androiddeviceprovisioning.partners.devices.updateMetadataAsync", |
+ "parameterOrder": [ |
+ "partnerId" |
+ ], |
+ "parameters": { |
+ "partnerId": { |
+ "description": "Partner ID.", |
+ "format": "int64", |
+ "location": "path", |
+ "pattern": "^[^/]+$", |
+ "required": true, |
+ "type": "string" |
+ } |
+ }, |
+ "path": "v1/partners/{+partnerId}/devices:updateMetadataAsync", |
+ "request": { |
+ "$ref": "UpdateDeviceMetadataInBatchRequest" |
+ }, |
+ "response": { |
+ "$ref": "Operation" |
+ } |
+ }, |
"get": { |
- "description": "Get a device", |
+ "description": "Get a device.", |
"httpMethod": "GET", |
"id": "androiddeviceprovisioning.partners.devices.get", |
"parameterOrder": [ |
@@ -118,7 +143,7 @@ |
], |
"parameters": { |
"name": { |
- "description": "resource name in 'partners/[PARTNER_ID]/devices/[DEVICE_ID]'.", |
+ "description": "Resource name in `partners/[PARTNER_ID]/devices/[DEVICE_ID]`.", |
"location": "path", |
"pattern": "^partners/[^/]+/devices/[^/]+$", |
"required": true, |
@@ -131,7 +156,7 @@ |
} |
}, |
"unclaim": { |
- "description": "Unclaim the device identified by device_id or identifier.", |
+ "description": "Unclaim the device identified by the `device_id` or the `deviceIdentifier`.", |
"httpMethod": "POST", |
"id": "androiddeviceprovisioning.partners.devices.unclaim", |
"parameterOrder": [ |
@@ -139,7 +164,7 @@ |
], |
"parameters": { |
"partnerId": { |
- "description": "Id of the partner.", |
+ "description": "ID of the partner.", |
"format": "int64", |
"location": "path", |
"pattern": "^[^/]+$", |
@@ -164,7 +189,7 @@ |
], |
"parameters": { |
"partnerId": { |
- "description": "id of the partner.", |
+ "description": "ID of the partner.", |
"format": "int64", |
"location": "path", |
"pattern": "^[^/]+$", |
@@ -189,7 +214,7 @@ |
], |
"parameters": { |
"partnerId": { |
- "description": "Id of the partner.", |
+ "description": "ID of the partner.", |
"format": "int64", |
"location": "path", |
"pattern": "^[^/]+$", |
@@ -206,7 +231,7 @@ |
} |
}, |
"claimAsync": { |
- "description": "Claim devices asynchronously", |
+ "description": "Claim devices asynchronously.", |
"httpMethod": "POST", |
"id": "androiddeviceprovisioning.partners.devices.claimAsync", |
"parameterOrder": [ |
@@ -214,7 +239,7 @@ |
], |
"parameters": { |
"partnerId": { |
- "description": "partner id.", |
+ "description": "Partner ID.", |
"format": "int64", |
"location": "path", |
"pattern": "^[^/]+$", |
@@ -239,7 +264,7 @@ |
], |
"parameters": { |
"partnerId": { |
- "description": "id of the partner.", |
+ "description": "ID of the partner.", |
"format": "int64", |
"location": "path", |
"pattern": "^[^/]+$", |
@@ -256,7 +281,7 @@ |
} |
}, |
"unclaimAsync": { |
- "description": "Unclaim devices asynchronously", |
+ "description": "Unclaim devices asynchronously.", |
"httpMethod": "POST", |
"id": "androiddeviceprovisioning.partners.devices.unclaimAsync", |
"parameterOrder": [ |
@@ -264,7 +289,7 @@ |
], |
"parameters": { |
"partnerId": { |
- "description": "partner id.", |
+ "description": "Partner ID.", |
"format": "int64", |
"location": "path", |
"pattern": "^[^/]+$", |
@@ -281,7 +306,7 @@ |
} |
}, |
"metadata": { |
- "description": "Update the metadata", |
+ "description": "Update the metadata.", |
"httpMethod": "POST", |
"id": "androiddeviceprovisioning.partners.devices.metadata", |
"parameterOrder": [ |
@@ -290,7 +315,7 @@ |
], |
"parameters": { |
"metadataOwnerId": { |
- "description": "The owner of the newly set metadata. Should be partner id itself.", |
+ "description": "The owner of the newly set metadata. Set this to the partner ID.", |
"format": "int64", |
"location": "path", |
"pattern": "^[^/]+$", |
@@ -298,7 +323,7 @@ |
"type": "string" |
}, |
"deviceId": { |
- "description": "id of the partner.", |
+ "description": "ID of the partner.", |
"format": "int64", |
"location": "path", |
"pattern": "^[^/]+$", |
@@ -313,38 +338,13 @@ |
"response": { |
"$ref": "DeviceMetadata" |
} |
- }, |
- "updateMetadataAsync": { |
- "description": "Set metadata in batch asynchronously.", |
- "httpMethod": "POST", |
- "id": "androiddeviceprovisioning.partners.devices.updateMetadataAsync", |
- "parameterOrder": [ |
- "partnerId" |
- ], |
- "parameters": { |
- "partnerId": { |
- "description": "partner id.", |
- "format": "int64", |
- "location": "path", |
- "pattern": "^[^/]+$", |
- "required": true, |
- "type": "string" |
- } |
- }, |
- "path": "v1/partners/{+partnerId}/devices:updateMetadataAsync", |
- "request": { |
- "$ref": "UpdateDeviceMetadataInBatchRequest" |
- }, |
- "response": { |
- "$ref": "Operation" |
- } |
} |
} |
}, |
"customers": { |
"methods": { |
"list": { |
- "description": "List all the customers that has delegates some role to this customer.", |
+ "description": "List the customers that are enrolled to the reseller identified by the\n`partnerId` argument. This list includes customers that the reseller\ncreated and customers that enrolled themselves using the portal.", |
"httpMethod": "GET", |
"id": "androiddeviceprovisioning.partners.customers.list", |
"parameterOrder": [ |
@@ -352,7 +352,7 @@ |
], |
"parameters": { |
"partnerId": { |
- "description": "the id of the partner.", |
+ "description": "The ID of the partner.", |
"format": "int64", |
"location": "path", |
"pattern": "^[^/]+$", |
@@ -364,6 +364,30 @@ |
"response": { |
"$ref": "ListCustomersResponse" |
} |
+ }, |
+ "create": { |
+ "description": "A customer for Zero Touch Provisioning will be created.\nAfter a Customer is created, their admins and owners will be able to manage\ndevices on partner.android.com/zerotouch or via their API.", |
+ "httpMethod": "POST", |
+ "id": "androiddeviceprovisioning.partners.customers.create", |
+ "parameterOrder": [ |
+ "parent" |
+ ], |
+ "parameters": { |
+ "parent": { |
+ "description": "The parent resource in format `partners/[PARTNER_ID]'.", |
+ "location": "path", |
+ "pattern": "^partners/[^/]+$", |
+ "required": true, |
+ "type": "string" |
+ } |
+ }, |
+ "path": "v1/{+parent}/customers", |
+ "request": { |
+ "$ref": "CreateCustomerRequest" |
+ }, |
+ "response": { |
+ "$ref": "Company" |
+ } |
} |
} |
} |
@@ -395,533 +419,565 @@ |
} |
} |
}, |
- "revision": "20170805", |
+ "revision": "20170903", |
"rootUrl": "https://androiddeviceprovisioning.googleapis.com/", |
"schemas": { |
- "DeviceClaim": { |
- "description": "containing the necessary info about a claim for a partner.", |
- "id": "DeviceClaim", |
+ "UpdateMetadataArguments": { |
+ "description": "Identifies metdata updates to one device.", |
+ "id": "UpdateMetadataArguments", |
"properties": { |
- "ownerCompanyId": { |
- "description": "owner id", |
+ "deviceIdentifier": { |
+ "$ref": "DeviceIdentifier", |
+ "description": "Device identifier." |
+ }, |
+ "deviceMetadata": { |
+ "$ref": "DeviceMetadata", |
+ "description": "The metadata to update." |
+ }, |
+ "deviceId": { |
+ "description": "Device ID of the device.", |
+ "format": "int64", |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "ClaimDeviceResponse": { |
+ "description": "Response message containing device id of the claim.", |
+ "id": "ClaimDeviceResponse", |
+ "properties": { |
+ "deviceId": { |
+ "description": "The device ID of the claimed device.", |
"format": "int64", |
"type": "string" |
}, |
- "sectionType": { |
- "description": "section type.", |
- "enum": [ |
- "SECTION_TYPE_UNSPECIFIED", |
- "SECTION_TYPE_ZERO_TOUCH" |
- ], |
- "enumDescriptions": [ |
- "Unspecified", |
- "Zero touch" |
- ], |
+ "deviceName": { |
+ "description": "The resource name of the device in the format\n`partners/[PARTNER_ID]/devices/[DEVICE_ID]`.", |
"type": "string" |
} |
}, |
"type": "object" |
}, |
- "DevicesLongRunningOperationResponse": { |
- "description": "Long running operation response.", |
- "id": "DevicesLongRunningOperationResponse", |
+ "ListCustomersResponse": { |
+ "description": "Response message of all customers related to this partner.", |
+ "id": "ListCustomersResponse", |
"properties": { |
- "successCount": { |
- "description": "Number of succeesfully processed ones.", |
- "format": "int32", |
- "type": "integer" |
- }, |
- "perDeviceStatus": { |
- "description": "processing status for each device.\nOne PerDeviceStatus per device. The order is the same as in your requests.", |
+ "customers": { |
+ "description": "List of customers related to this partner.", |
"items": { |
- "$ref": "OperationPerDevice" |
+ "$ref": "Company" |
}, |
"type": "array" |
} |
}, |
"type": "object" |
}, |
- "PerDeviceStatusInBatch": { |
- "description": "Stores the processing result for each device.", |
- "id": "PerDeviceStatusInBatch", |
+ "Device": { |
+ "description": "An Android device.", |
+ "id": "Device", |
"properties": { |
- "errorMessage": { |
- "description": "Error message", |
+ "configuration": { |
+ "description": "The resource name of the configuration.\nOnly set for customers.", |
"type": "string" |
}, |
- "deviceId": { |
- "description": "device id of the device if process succeeds.", |
- "format": "int64", |
- "type": "string" |
+ "claims": { |
+ "description": "Claims.", |
+ "items": { |
+ "$ref": "DeviceClaim" |
+ }, |
+ "type": "array" |
}, |
- "status": { |
- "description": "Process result.", |
- "enum": [ |
- "SINGLE_DEVICE_STATUS_UNSPECIFIED", |
- "SINGLE_DEVICE_STATUS_UNKNOWN_ERROR", |
- "SINGLE_DEVICE_STATUS_OTHER_ERROR", |
- "SINGLE_DEVICE_STATUS_SUCCESS", |
- "SINGLE_DEVICE_STATUS_PERMISSION_DENIED", |
- "SINGLE_DEVICE_STATUS_INVALID_DEVICE_IDENTIFIER", |
- "SINGLE_DEVICE_STATUS_INVALID_SECTION_TYPE", |
- "SINGLE_DEVICE_STATUS_SECTION_NOT_YOURS" |
- ], |
- "enumDescriptions": [ |
- "Invalid code. Shouldn' be used.", |
- "Unknown error.\nUnknown error is we don't expect it here.", |
- "Other error.\nOther error is we know/expect this error, but not having proper error\ncode yet.", |
- "Success.", |
- "Permission denied", |
- "Invalid device identifier.", |
- "Invalid section type.", |
- "This section is claimed by other company." |
- ], |
+ "deviceIdentifier": { |
+ "$ref": "DeviceIdentifier", |
+ "description": "Device identifier." |
+ }, |
+ "deviceMetadata": { |
+ "$ref": "DeviceMetadata", |
+ "description": "Device metadata." |
+ }, |
+ "name": { |
+ "description": "Resource name in `partners/[PARTNER_ID]/devices/[DEVICE_ID]`.", |
"type": "string" |
}, |
- "errorIdentifier": { |
- "description": "Error identifier.", |
+ "deviceId": { |
+ "description": "Device ID.", |
+ "format": "int64", |
"type": "string" |
} |
}, |
"type": "object" |
}, |
- "ClaimDevicesRequest": { |
- "description": "Request to claim devices asynchronously in batch.", |
- "id": "ClaimDevicesRequest", |
+ "CreateCustomerRequest": { |
+ "description": "Request message to create a customer.", |
+ "id": "CreateCustomerRequest", |
"properties": { |
- "claims": { |
- "description": "list of claims.", |
- "items": { |
- "$ref": "PartnerClaim" |
- }, |
- "type": "array" |
+ "customer": { |
+ "$ref": "Company", |
+ "description": "The customer to create." |
} |
}, |
"type": "object" |
}, |
- "FindDevicesByOwnerRequest": { |
- "description": "Request to find devices by customers.", |
- "id": "FindDevicesByOwnerRequest", |
- "properties": { |
- "sectionType": { |
- "description": "The section type.", |
- "enum": [ |
- "SECTION_TYPE_UNSPECIFIED", |
- "SECTION_TYPE_ZERO_TOUCH" |
- ], |
- "enumDescriptions": [ |
- "Unspecified", |
- "Zero touch" |
- ], |
+ "Company": { |
+ "description": "Company", |
+ "id": "Company", |
+ "properties": { |
+ "ownerEmails": { |
+ "description": "Owner emails.\nOwners are able to operate on the portal, and modify admins or other\nowners. This field is a write-only field at creation time.", |
+ "items": { |
+ "type": "string" |
+ }, |
+ "type": "array" |
+ }, |
+ "companyId": { |
+ "description": "Company ID.", |
+ "format": "int64", |
"type": "string" |
}, |
- "pageToken": { |
- "description": "Page token", |
+ "companyName": { |
+ "description": "Company name.", |
"type": "string" |
}, |
- "customerId": { |
- "description": "List of customer ids to search for.", |
+ "name": { |
+ "description": "The API resource name of the company in the format\n`partners/[PARTNER_ID]/customers/[CUSTOMER_ID]`.", |
+ "type": "string" |
+ }, |
+ "adminEmails": { |
+ "description": "Admin emails.\nAdmins are able to operate on the portal.\nThis field is a write-only field at creation time.", |
"items": { |
- "format": "int64", |
"type": "string" |
}, |
"type": "array" |
- }, |
- "limit": { |
- "description": "The number of devices to show in the result.", |
- "format": "int64", |
- "type": "string" |
} |
}, |
"type": "object" |
}, |
- "Operation": { |
- "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", |
- "id": "Operation", |
+ "UpdateDeviceMetadataRequest": { |
+ "description": "Request to set metadata for a device.", |
+ "id": "UpdateDeviceMetadataRequest", |
"properties": { |
- "response": { |
- "additionalProperties": { |
- "description": "Properties of the object. Contains field @type with type URL.", |
- "type": "any" |
- }, |
- "description": "This field will contain a `DevicesLongRunningOperationResponse` object if the operation is created by `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`.", |
- "type": "object" |
- }, |
- "name": { |
- "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", |
- "type": "string" |
- }, |
- "error": { |
- "$ref": "Status", |
- "description": "This field will always be not set if the operation is created by `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`. In this case, error information for each device is set in `response.perDeviceStatus.result.status`." |
- }, |
- "metadata": { |
- "additionalProperties": { |
- "description": "Properties of the object. Contains field @type with type URL.", |
- "type": "any" |
- }, |
- "description": "This field will contain a `DevicesLongRunningOperationMetadata` object if the operation is created by `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`.", |
- "type": "object" |
- }, |
- "done": { |
- "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", |
- "type": "boolean" |
+ "deviceMetadata": { |
+ "$ref": "DeviceMetadata", |
+ "description": "The metdata to set." |
} |
}, |
"type": "object" |
}, |
- "DeviceIdentifier": { |
- "description": "DeviceIdentifiers identifies an unique device.", |
- "id": "DeviceIdentifier", |
+ "PartnerUnclaim": { |
+ "description": "Identifies one unclaim request.", |
+ "id": "PartnerUnclaim", |
"properties": { |
- "manufacturer": { |
- "description": "Manufacturer name to match `android.os.Build.MANUFACTURER` (required).\nAllowed values listed in\n[manufacturer names](/zero-touch/resources/manufacturer-names).", |
- "type": "string" |
- }, |
- "meid": { |
- "description": "MEID", |
+ "deviceId": { |
+ "description": "Device ID of the device.", |
+ "format": "int64", |
"type": "string" |
}, |
- "serialNumber": { |
- "description": "Serial number (optional)", |
- "type": "string" |
+ "deviceIdentifier": { |
+ "$ref": "DeviceIdentifier", |
+ "description": "Device identifier of the device." |
}, |
- "imei": { |
- "description": "IMEI (either IMEI or MEID is required).", |
+ "sectionType": { |
+ "description": "Section type to unclaim.", |
+ "enum": [ |
+ "SECTION_TYPE_UNSPECIFIED", |
+ "SECTION_TYPE_ZERO_TOUCH" |
+ ], |
+ "enumDescriptions": [ |
+ "Unspecified section type.", |
+ "Zero touch section type." |
+ ], |
"type": "string" |
} |
}, |
"type": "object" |
}, |
- "UnclaimDevicesRequest": { |
- "description": "Request to unclaim devices asynchronously in batch.", |
- "id": "UnclaimDevicesRequest", |
+ "Empty": { |
+ "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", |
+ "id": "Empty", |
+ "properties": {}, |
+ "type": "object" |
+ }, |
+ "FindDevicesByDeviceIdentifierResponse": { |
+ "description": "Response containing found devices.", |
+ "id": "FindDevicesByDeviceIdentifierResponse", |
"properties": { |
- "unclaims": { |
- "description": "list of unclaims.", |
+ "nextPageToken": { |
+ "description": "Page token of the next page.", |
+ "type": "string" |
+ }, |
+ "devices": { |
+ "description": "Found devices.", |
"items": { |
- "$ref": "PartnerUnclaim" |
+ "$ref": "Device" |
}, |
"type": "array" |
} |
}, |
"type": "object" |
}, |
- "FindDevicesByDeviceIdentifierRequest": { |
- "description": "Request to find devices.", |
- "id": "FindDevicesByDeviceIdentifierRequest", |
+ "PartnerClaim": { |
+ "description": "Identifies one claim request.", |
+ "id": "PartnerClaim", |
"properties": { |
"deviceIdentifier": { |
"$ref": "DeviceIdentifier", |
- "description": "The device identifier to search" |
+ "description": "Device identifier of the device." |
}, |
- "pageToken": { |
- "description": "Page token", |
+ "deviceMetadata": { |
+ "$ref": "DeviceMetadata", |
+ "description": "Metadata to set at claim." |
+ }, |
+ "sectionType": { |
+ "description": "Section type to claim.", |
+ "enum": [ |
+ "SECTION_TYPE_UNSPECIFIED", |
+ "SECTION_TYPE_ZERO_TOUCH" |
+ ], |
+ "enumDescriptions": [ |
+ "Unspecified section type.", |
+ "Zero touch section type." |
+ ], |
"type": "string" |
}, |
- "limit": { |
- "description": "Number of devices to show.", |
+ "customerId": { |
+ "description": "Customer ID to claim for.", |
"format": "int64", |
"type": "string" |
} |
}, |
"type": "object" |
}, |
- "Status": { |
- "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", |
- "id": "Status", |
+ "UnclaimDeviceRequest": { |
+ "description": "Request message to unclaim a device.", |
+ "id": "UnclaimDeviceRequest", |
"properties": { |
- "details": { |
- "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", |
- "items": { |
- "additionalProperties": { |
- "description": "Properties of the object. Contains field @type with type URL.", |
- "type": "any" |
- }, |
- "type": "object" |
- }, |
- "type": "array" |
- }, |
- "code": { |
- "description": "The status code, which should be an enum value of google.rpc.Code.", |
- "format": "int32", |
- "type": "integer" |
+ "deviceIdentifier": { |
+ "$ref": "DeviceIdentifier", |
+ "description": "The device identifier you used when you claimed this device." |
}, |
- "message": { |
- "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", |
+ "sectionType": { |
+ "description": "The section type to unclaim for.", |
+ "enum": [ |
+ "SECTION_TYPE_UNSPECIFIED", |
+ "SECTION_TYPE_ZERO_TOUCH" |
+ ], |
+ "enumDescriptions": [ |
+ "Unspecified section type.", |
+ "Zero touch section type." |
+ ], |
"type": "string" |
- } |
- }, |
- "type": "object" |
- }, |
- "OperationPerDevice": { |
- "description": "Operation the server received for every device.", |
- "id": "OperationPerDevice", |
- "properties": { |
- "claim": { |
- "$ref": "PartnerClaim", |
- "description": "Request to claim a device." |
}, |
- "updateMetadata": { |
- "$ref": "UpdateMetadataArguments", |
- "description": "Request to set metadata for a device." |
- }, |
- "result": { |
- "$ref": "PerDeviceStatusInBatch", |
- "description": "Processing result for every device." |
- }, |
- "unclaim": { |
- "$ref": "PartnerUnclaim", |
- "description": "Request to unclaim a device." |
+ "deviceId": { |
+ "description": "The device ID returned by `ClaimDevice`.", |
+ "format": "int64", |
+ "type": "string" |
} |
}, |
"type": "object" |
}, |
- "FindDevicesByOwnerResponse": { |
- "description": "Response containing found devices.", |
- "id": "FindDevicesByOwnerResponse", |
+ "DeviceMetadata": { |
+ "description": "A key-value pair of the device metadata.", |
+ "id": "DeviceMetadata", |
"properties": { |
- "devices": { |
- "description": "Devices found.", |
- "items": { |
- "$ref": "Device" |
+ "entries": { |
+ "additionalProperties": { |
+ "type": "string" |
}, |
- "type": "array" |
- }, |
- "nextPageToken": { |
- "description": "Page token of next page", |
- "type": "string" |
+ "description": "Metadata entries", |
+ "type": "object" |
} |
}, |
"type": "object" |
}, |
- "ClaimDeviceRequest": { |
- "description": "Request message to claim a device on behalf of a customer.", |
- "id": "ClaimDeviceRequest", |
+ "DeviceClaim": { |
+ "description": "Information about a device claimed for a partner.", |
+ "id": "DeviceClaim", |
"properties": { |
- "deviceIdentifier": { |
- "$ref": "DeviceIdentifier", |
- "description": "The device identifier of the device to claim." |
+ "ownerCompanyId": { |
+ "description": "Owner ID.", |
+ "format": "int64", |
+ "type": "string" |
}, |
"sectionType": { |
- "description": "Section to claim", |
+ "description": "Section type of the device claim.", |
"enum": [ |
"SECTION_TYPE_UNSPECIFIED", |
"SECTION_TYPE_ZERO_TOUCH" |
], |
"enumDescriptions": [ |
- "Unspecified", |
- "Zero touch" |
+ "Unspecified section type.", |
+ "Zero touch section type." |
], |
"type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "DevicesLongRunningOperationResponse": { |
+ "description": "Long running operation response.", |
+ "id": "DevicesLongRunningOperationResponse", |
+ "properties": { |
+ "successCount": { |
+ "description": "Number of succeesfully processed ones.", |
+ "format": "int32", |
+ "type": "integer" |
}, |
- "customerId": { |
- "description": "The customer to claim for.", |
- "format": "int64", |
- "type": "string" |
+ "perDeviceStatus": { |
+ "description": "Processing status for each device.\nOne `PerDeviceStatus` per device. The order is the same as in your requests.", |
+ "items": { |
+ "$ref": "OperationPerDevice" |
+ }, |
+ "type": "array" |
} |
}, |
"type": "object" |
}, |
- "DevicesLongRunningOperationMetadata": { |
- "description": "Long running operation metadata.", |
- "id": "DevicesLongRunningOperationMetadata", |
+ "PerDeviceStatusInBatch": { |
+ "description": "Stores the processing result for each device.", |
+ "id": "PerDeviceStatusInBatch", |
"properties": { |
- "processingStatus": { |
- "description": "The overall processing status.", |
+ "deviceId": { |
+ "description": "Device ID of the device if process succeeds.", |
+ "format": "int64", |
+ "type": "string" |
+ }, |
+ "status": { |
+ "description": "Process result.", |
"enum": [ |
- "BATCH_PROCESS_STATUS_UNSPECIFIED", |
- "BATCH_PROCESS_PENDING", |
- "BATCH_PROCESS_IN_PROGRESS", |
- "BATCH_PROCESS_PROCESSED" |
+ "SINGLE_DEVICE_STATUS_UNSPECIFIED", |
+ "SINGLE_DEVICE_STATUS_UNKNOWN_ERROR", |
+ "SINGLE_DEVICE_STATUS_OTHER_ERROR", |
+ "SINGLE_DEVICE_STATUS_SUCCESS", |
+ "SINGLE_DEVICE_STATUS_PERMISSION_DENIED", |
+ "SINGLE_DEVICE_STATUS_INVALID_DEVICE_IDENTIFIER", |
+ "SINGLE_DEVICE_STATUS_INVALID_SECTION_TYPE", |
+ "SINGLE_DEVICE_STATUS_SECTION_NOT_YOURS" |
], |
"enumDescriptions": [ |
"Invalid code. Shouldn't be used.", |
- "Pending", |
- "In progress", |
- "Processed.\nThis doesn't mean all items were processed sucessfully, you should\ncheck the `response` field for the result of every item." |
+ "Unknown error.\nWe don't expect this error to occur here.", |
+ "Other error.\nWe know/expect this error, but there's no defined error code for the\nerror.", |
+ "Success.", |
+ "Permission denied.", |
+ "Invalid device identifier.", |
+ "Invalid section type.", |
+ "This section is claimed by another company." |
], |
"type": "string" |
}, |
- "progress": { |
- "description": "Processing progress from 0 to 100.", |
- "format": "int32", |
- "type": "integer" |
+ "errorIdentifier": { |
+ "description": "Error identifier.", |
+ "type": "string" |
}, |
- "devicesCount": { |
- "description": "Number of devices parsed in your requests.", |
- "format": "int32", |
- "type": "integer" |
- } |
- }, |
- "type": "object" |
- }, |
- "UpdateDeviceMetadataInBatchRequest": { |
- "description": "Request to update device metadata in batch.", |
- "id": "UpdateDeviceMetadataInBatchRequest", |
- "properties": { |
- "updates": { |
- "description": "list of metadata updates.", |
- "items": { |
- "$ref": "UpdateMetadataArguments" |
- }, |
- "type": "array" |
+ "errorMessage": { |
+ "description": "Error message.", |
+ "type": "string" |
} |
}, |
"type": "object" |
}, |
- "ClaimDeviceResponse": { |
- "description": "Response message containing device id of the claim.", |
- "id": "ClaimDeviceResponse", |
+ "FindDevicesByOwnerRequest": { |
+ "description": "Request to find devices by customers.", |
+ "id": "FindDevicesByOwnerRequest", |
"properties": { |
- "deviceId": { |
- "description": "the device id of the claimed device.", |
+ "limit": { |
+ "description": "The number of devices to show in the result.", |
"format": "int64", |
"type": "string" |
}, |
- "deviceName": { |
- "description": "the resource name of the device in\n'partners/[PARTNER_ID]/devices/[DEVICE_ID]'.", |
+ "pageToken": { |
+ "description": "Page token.", |
+ "type": "string" |
+ }, |
+ "sectionType": { |
+ "description": "The section type.", |
+ "enum": [ |
+ "SECTION_TYPE_UNSPECIFIED", |
+ "SECTION_TYPE_ZERO_TOUCH" |
+ ], |
+ "enumDescriptions": [ |
+ "Unspecified section type.", |
+ "Zero touch section type." |
+ ], |
"type": "string" |
+ }, |
+ "customerId": { |
+ "description": "List of customer IDs to search for.", |
+ "items": { |
+ "format": "int64", |
+ "type": "string" |
+ }, |
+ "type": "array" |
} |
}, |
"type": "object" |
}, |
- "ListCustomersResponse": { |
- "description": "Response message of all customers related to this partner.", |
- "id": "ListCustomersResponse", |
+ "ClaimDevicesRequest": { |
+ "description": "Request to claim devices asynchronously in batch.", |
+ "id": "ClaimDevicesRequest", |
"properties": { |
- "customers": { |
- "description": "List of customers related to this partner.", |
+ "claims": { |
+ "description": "List of claims.", |
"items": { |
- "$ref": "Company" |
+ "$ref": "PartnerClaim" |
}, |
"type": "array" |
} |
}, |
"type": "object" |
}, |
- "UpdateMetadataArguments": { |
- "description": "Identifies metdata updates to one device.", |
- "id": "UpdateMetadataArguments", |
+ "DeviceIdentifier": { |
+ "description": "Identifies a unique device.", |
+ "id": "DeviceIdentifier", |
"properties": { |
- "deviceMetadata": { |
- "$ref": "DeviceMetadata", |
- "description": "The metadata to update." |
+ "serialNumber": { |
+ "description": "Serial number (optional).", |
+ "type": "string" |
}, |
- "deviceIdentifier": { |
- "$ref": "DeviceIdentifier", |
- "description": "device identifier." |
+ "imei": { |
+ "description": "IMEI number.", |
+ "type": "string" |
}, |
- "deviceId": { |
- "description": "device id of the device.", |
- "format": "int64", |
+ "meid": { |
+ "description": "MEID number.", |
+ "type": "string" |
+ }, |
+ "manufacturer": { |
+ "description": "Manufacturer name to match `android.os.Build.MANUFACTURER` (required).\nAllowed values listed in\n[manufacturer names](/zero-touch/resources/manufacturer-names).", |
"type": "string" |
} |
}, |
"type": "object" |
}, |
- "Device": { |
- "description": "Device", |
- "id": "Device", |
+ "Operation": { |
+ "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", |
+ "id": "Operation", |
"properties": { |
- "deviceMetadata": { |
- "$ref": "DeviceMetadata", |
- "description": "Device metadata" |
+ "done": { |
+ "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", |
+ "type": "boolean" |
}, |
- "deviceIdentifier": { |
- "$ref": "DeviceIdentifier", |
- "description": "Device identifier" |
+ "response": { |
+ "additionalProperties": { |
+ "description": "Properties of the object. Contains field @type with type URL.", |
+ "type": "any" |
+ }, |
+ "description": "This field will contain a `DevicesLongRunningOperationResponse` object if the operation is created by `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`.", |
+ "type": "object" |
}, |
"name": { |
- "description": "Resource name in 'partners/[PARTNER_ID]/devices/[DEVICE_ID]'.", |
+ "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", |
"type": "string" |
}, |
- "claims": { |
- "description": "claims", |
- "items": { |
- "$ref": "DeviceClaim" |
- }, |
- "type": "array" |
+ "error": { |
+ "$ref": "Status", |
+ "description": "This field will always be not set if the operation is created by `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`. In this case, error information for each device is set in `response.perDeviceStatus.result.status`." |
}, |
- "deviceId": { |
- "description": "Device id", |
- "format": "int64", |
- "type": "string" |
+ "metadata": { |
+ "additionalProperties": { |
+ "description": "Properties of the object. Contains field @type with type URL.", |
+ "type": "any" |
+ }, |
+ "description": "This field will contain a `DevicesLongRunningOperationMetadata` object if the operation is created by `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`.", |
+ "type": "object" |
} |
}, |
"type": "object" |
}, |
- "Company": { |
- "description": "Company", |
- "id": "Company", |
+ "UnclaimDevicesRequest": { |
+ "description": "Request to unclaim devices asynchronously in batch.", |
+ "id": "UnclaimDevicesRequest", |
"properties": { |
- "companyName": { |
- "description": "company name", |
- "type": "string" |
- }, |
- "companyId": { |
- "description": "company id", |
- "format": "int64", |
- "type": "string" |
+ "unclaims": { |
+ "description": "List of devices to unclaim.", |
+ "items": { |
+ "$ref": "PartnerUnclaim" |
+ }, |
+ "type": "array" |
} |
}, |
"type": "object" |
}, |
- "UpdateDeviceMetadataRequest": { |
- "description": "Request to set metadata for a device.", |
- "id": "UpdateDeviceMetadataRequest", |
+ "Status": { |
+ "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", |
+ "id": "Status", |
"properties": { |
- "deviceMetadata": { |
- "$ref": "DeviceMetadata", |
- "description": "The metdata to set." |
+ "details": { |
+ "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", |
+ "items": { |
+ "additionalProperties": { |
+ "description": "Properties of the object. Contains field @type with type URL.", |
+ "type": "any" |
+ }, |
+ "type": "object" |
+ }, |
+ "type": "array" |
+ }, |
+ "code": { |
+ "description": "The status code, which should be an enum value of google.rpc.Code.", |
+ "format": "int32", |
+ "type": "integer" |
+ }, |
+ "message": { |
+ "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", |
+ "type": "string" |
} |
}, |
"type": "object" |
}, |
- "PartnerUnclaim": { |
- "description": "Identifies one unclaim request.", |
- "id": "PartnerUnclaim", |
+ "FindDevicesByDeviceIdentifierRequest": { |
+ "description": "Request to find devices.", |
+ "id": "FindDevicesByDeviceIdentifierRequest", |
"properties": { |
- "deviceId": { |
- "description": "device id of the device.", |
- "format": "int64", |
- "type": "string" |
- }, |
"deviceIdentifier": { |
"$ref": "DeviceIdentifier", |
- "description": "device identifier of the device." |
+ "description": "The device identifier to search." |
}, |
- "sectionType": { |
- "description": "section type to unclaim.", |
- "enum": [ |
- "SECTION_TYPE_UNSPECIFIED", |
- "SECTION_TYPE_ZERO_TOUCH" |
- ], |
- "enumDescriptions": [ |
- "Unspecified", |
- "Zero touch" |
- ], |
+ "pageToken": { |
+ "description": "Page token.", |
+ "type": "string" |
+ }, |
+ "limit": { |
+ "description": "Number of devices to show.", |
+ "format": "int64", |
"type": "string" |
} |
}, |
"type": "object" |
}, |
- "Empty": { |
- "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", |
- "id": "Empty", |
- "properties": {}, |
+ "OperationPerDevice": { |
+ "description": "Operation the server received for every device.", |
+ "id": "OperationPerDevice", |
+ "properties": { |
+ "updateMetadata": { |
+ "$ref": "UpdateMetadataArguments", |
+ "description": "Request to set metadata for a device." |
+ }, |
+ "unclaim": { |
+ "$ref": "PartnerUnclaim", |
+ "description": "Request to unclaim a device." |
+ }, |
+ "result": { |
+ "$ref": "PerDeviceStatusInBatch", |
+ "description": "Processing result for every device." |
+ }, |
+ "claim": { |
+ "$ref": "PartnerClaim", |
+ "description": "Request to claim a device." |
+ } |
+ }, |
"type": "object" |
}, |
- "FindDevicesByDeviceIdentifierResponse": { |
+ "FindDevicesByOwnerResponse": { |
"description": "Response containing found devices.", |
- "id": "FindDevicesByDeviceIdentifierResponse", |
+ "id": "FindDevicesByOwnerResponse", |
"properties": { |
"nextPageToken": { |
- "description": "Page token of next page", |
+ "description": "Page token of the next page.", |
"type": "string" |
}, |
"devices": { |
- "description": "Found devices.", |
+ "description": "Devices found.", |
"items": { |
"$ref": "Device" |
}, |
@@ -930,76 +986,77 @@ |
}, |
"type": "object" |
}, |
- "PartnerClaim": { |
- "description": "Identifies one claim request.", |
- "id": "PartnerClaim", |
+ "ClaimDeviceRequest": { |
+ "description": "Request message to claim a device on behalf of a customer.", |
+ "id": "ClaimDeviceRequest", |
"properties": { |
- "deviceMetadata": { |
- "$ref": "DeviceMetadata", |
- "description": "metadata to set at claim." |
+ "customerId": { |
+ "description": "The customer to claim for.", |
+ "format": "int64", |
+ "type": "string" |
}, |
"deviceIdentifier": { |
"$ref": "DeviceIdentifier", |
- "description": "Device identifier of the device." |
+ "description": "The device identifier of the device to claim." |
}, |
"sectionType": { |
- "description": "section type to claim.", |
+ "description": "The section to claim.", |
"enum": [ |
"SECTION_TYPE_UNSPECIFIED", |
"SECTION_TYPE_ZERO_TOUCH" |
], |
"enumDescriptions": [ |
- "Unspecified", |
- "Zero touch" |
+ "Unspecified section type.", |
+ "Zero touch section type." |
], |
"type": "string" |
- }, |
- "customerId": { |
- "description": "customer id to claim for.", |
- "format": "int64", |
- "type": "string" |
} |
}, |
"type": "object" |
}, |
- "UnclaimDeviceRequest": { |
- "description": "Request message to unclaim a device.", |
- "id": "UnclaimDeviceRequest", |
+ "DevicesLongRunningOperationMetadata": { |
+ "description": "Long running operation metadata.", |
+ "id": "DevicesLongRunningOperationMetadata", |
"properties": { |
- "deviceIdentifier": { |
- "$ref": "DeviceIdentifier", |
- "description": "The device identifier you use when you claimed this device." |
+ "devicesCount": { |
+ "description": "Number of devices parsed in your requests.", |
+ "format": "int32", |
+ "type": "integer" |
}, |
- "sectionType": { |
- "description": "The section type to unclaim for.", |
+ "processingStatus": { |
+ "description": "The overall processing status.", |
"enum": [ |
- "SECTION_TYPE_UNSPECIFIED", |
- "SECTION_TYPE_ZERO_TOUCH" |
+ "BATCH_PROCESS_STATUS_UNSPECIFIED", |
+ "BATCH_PROCESS_PENDING", |
+ "BATCH_PROCESS_IN_PROGRESS", |
+ "BATCH_PROCESS_PROCESSED" |
], |
"enumDescriptions": [ |
- "Unspecified", |
- "Zero touch" |
+ "Invalid code. Shouldn't be used.", |
+ "Pending.", |
+ "In progress.", |
+ "Processed.\nThis doesn't mean all items were processed sucessfully, you should\ncheck the `response` field for the result of every item." |
], |
"type": "string" |
}, |
- "deviceId": { |
- "description": "The device id returned by ClaimDevice.", |
- "format": "int64", |
- "type": "string" |
+ "progress": { |
+ "description": "Processing progress from 0 to 100.", |
+ "format": "int32", |
+ "type": "integer" |
} |
}, |
"type": "object" |
}, |
- "DeviceMetadata": { |
- "description": "metadata", |
- "id": "DeviceMetadata", |
+ "UpdateDeviceMetadataInBatchRequest": { |
+ "description": "Request to update device metadata in batch.", |
+ "id": "UpdateDeviceMetadataInBatchRequest", |
"properties": { |
- "entries": { |
- "additionalProperties": { |
- "type": "string" |
+ "updates": { |
+ "description": "List of metadata updates.", |
+ "items": { |
+ "$ref": "UpdateMetadataArguments" |
}, |
- "description": "Metadata entries", |
- "type": "object" |
+ "type": "array" |
} |
}, |
"type": "object" |