// Type definitions for non-npm package Google Android Device Provisioning Partner API v1 1.0 // Project: https://developers.google.com/zero-touch/ // Definitions by: Bolisov Alexey // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 // IMPORTANT // This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. // In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator // Generated from: https://androiddeviceprovisioning.googleapis.com/$discovery/rest?version=v1 /// declare namespace gapi.client { /** Load Android Device Provisioning Partner API v1 */ function load(name: "androiddeviceprovisioning", version: "v1"): PromiseLike; function load(name: "androiddeviceprovisioning", version: "v1", callback: () => any): void; const operations: androiddeviceprovisioning.OperationsResource; const partners: androiddeviceprovisioning.PartnersResource; namespace androiddeviceprovisioning { interface ClaimDeviceRequest { /** The customer to claim for. */ customerId?: string; /** The device identifier of the device to claim. */ deviceIdentifier?: DeviceIdentifier; /** The section to claim. */ sectionType?: string; } interface ClaimDeviceResponse { /** The device ID of the claimed device. */ deviceId?: string; /** * The resource name of the device in the format * `partners/[PARTNER_ID]/devices/[DEVICE_ID]`. */ deviceName?: string; } interface ClaimDevicesRequest { /** List of claims. */ claims?: PartnerClaim[]; } interface Company { /** * Input only. Optional. Email address of customer's users in the admin role. * Each email address must be associated with a Google Account. */ adminEmails?: string[]; /** Output only. The ID of the company. Assigned by the server. */ companyId?: string; /** * Required. The name of the company. For example _XYZ Corp_. Characters * allowed are: Latin letters, numerals, hyphens, and spaces. Displayed to the * customer's employees in the zero-touch enrollment portal. */ companyName?: string; /** * Output only. The API resource name of the company in the format * `partners/[PARTNER_ID]/customers/[CUSTOMER_ID]`. Assigned by the server. */ name?: string; /** * Input only. Email address of customer's users in the owner role. At least * one `owner_email` is required. Each email address must be associated with a * Google Account. Owners share the same access as admins but can also add, * delete, and edit your organization's portal users. */ ownerEmails?: string[]; } interface CreateCustomerRequest { /** * Required. The company data to populate the new customer. Must contain a * value for `companyName` and at least one `owner_email` that's associated * with a Google Account. The values for `companyId` and `name` must be empty. */ customer?: Company; } interface Device { /** Claims. */ claims?: DeviceClaim[]; /** * The resource name of the configuration. * Only set for customers. */ configuration?: string; /** Device ID. */ deviceId?: string; /** Device identifier. */ deviceIdentifier?: DeviceIdentifier; /** Device metadata. */ deviceMetadata?: DeviceMetadata; /** Resource name in `partners/[PARTNER_ID]/devices/[DEVICE_ID]`. */ name?: string; } interface DeviceClaim { /** Owner ID. */ ownerCompanyId?: string; /** Section type of the device claim. */ sectionType?: string; } interface DeviceIdentifier { /** IMEI number. */ imei?: string; /** * Manufacturer name to match `android.os.Build.MANUFACTURER` (required). * Allowed values listed in * [manufacturer names](/zero-touch/resources/manufacturer-names). */ manufacturer?: string; /** MEID number. */ meid?: string; /** Serial number (optional). */ serialNumber?: string; } interface DeviceMetadata { /** Metadata entries */ entries?: Record; } interface DevicesLongRunningOperationMetadata { /** Number of devices parsed in your requests. */ devicesCount?: number; /** The overall processing status. */ processingStatus?: string; /** Processing progress from 0 to 100. */ progress?: number; } interface DevicesLongRunningOperationResponse { /** * Processing status for each device. * One `PerDeviceStatus` per device. The order is the same as in your requests. */ perDeviceStatus?: OperationPerDevice[]; /** Number of succeesfully processed ones. */ successCount?: number; } interface FindDevicesByDeviceIdentifierRequest { /** The device identifier to search. */ deviceIdentifier?: DeviceIdentifier; /** Number of devices to show. */ limit?: string; /** Page token. */ pageToken?: string; } interface FindDevicesByDeviceIdentifierResponse { /** Found devices. */ devices?: Device[]; /** Page token of the next page. */ nextPageToken?: string; } interface FindDevicesByOwnerRequest { /** List of customer IDs to search for. */ customerId?: string[]; /** The number of devices to show in the result. */ limit?: string; /** Page token. */ pageToken?: string; /** The section type. */ sectionType?: string; } interface FindDevicesByOwnerResponse { /** Devices found. */ devices?: Device[]; /** Page token of the next page. */ nextPageToken?: string; } interface ListCustomersResponse { /** List of customers related to this partner. */ customers?: Company[]; } interface Operation { /** * If the value is `false`, it means the operation is still in progress. * If `true`, the operation is completed, and either `error` or `response` is * available. */ done?: boolean; /** * 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`. */ error?: Status; /** * This field will contain a `DevicesLongRunningOperationMetadata` object if the operation is created by `claimAsync`, `unclaimAsync`, or * `updateMetadataAsync`. */ metadata?: Record; /** * The server-assigned name, which is only unique within the same service that * originally returns it. If you use the default HTTP mapping, the * `name` should have the format of `operations/some/unique/name`. */ name?: string; /** * This field will contain a `DevicesLongRunningOperationResponse` object if the operation is created by `claimAsync`, `unclaimAsync`, or * `updateMetadataAsync`. */ response?: Record; } interface OperationPerDevice { /** Request to claim a device. */ claim?: PartnerClaim; /** Processing result for every device. */ result?: PerDeviceStatusInBatch; /** Request to unclaim a device. */ unclaim?: PartnerUnclaim; /** Request to set metadata for a device. */ updateMetadata?: UpdateMetadataArguments; } interface PartnerClaim { /** Customer ID to claim for. */ customerId?: string; /** Device identifier of the device. */ deviceIdentifier?: DeviceIdentifier; /** Metadata to set at claim. */ deviceMetadata?: DeviceMetadata; /** Section type to claim. */ sectionType?: string; } interface PartnerUnclaim { /** Device ID of the device. */ deviceId?: string; /** Device identifier of the device. */ deviceIdentifier?: DeviceIdentifier; /** Section type to unclaim. */ sectionType?: string; } interface PerDeviceStatusInBatch { /** Device ID of the device if process succeeds. */ deviceId?: string; /** Error identifier. */ errorIdentifier?: string; /** Error message. */ errorMessage?: string; /** Process result. */ status?: string; } interface Status { /** The status code, which should be an enum value of google.rpc.Code. */ code?: number; /** * A list of messages that carry the error details. There is a common set of * message types for APIs to use. */ details?: Array>; /** * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the * google.rpc.Status.details field, or localized by the client. */ message?: string; } interface UnclaimDeviceRequest { /** The device ID returned by `ClaimDevice`. */ deviceId?: string; /** The device identifier you used when you claimed this device. */ deviceIdentifier?: DeviceIdentifier; /** The section type to unclaim for. */ sectionType?: string; } interface UnclaimDevicesRequest { /** List of devices to unclaim. */ unclaims?: PartnerUnclaim[]; } interface UpdateDeviceMetadataInBatchRequest { /** List of metadata updates. */ updates?: UpdateMetadataArguments[]; } interface UpdateDeviceMetadataRequest { /** The metdata to set. */ deviceMetadata?: DeviceMetadata; } interface UpdateMetadataArguments { /** Device ID of the device. */ deviceId?: string; /** Device identifier. */ deviceIdentifier?: DeviceIdentifier; /** The metadata to update. */ deviceMetadata?: DeviceMetadata; } interface OperationsResource { /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. */ get(request: { /** V1 error format. */ "$.xgafv"?: string; /** OAuth access token. */ access_token?: string; /** Data format for response. */ alt?: string; /** OAuth bearer token. */ bearer_token?: string; /** JSONP */ callback?: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; /** 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. */ key?: string; /** The name of the operation resource. */ name: string; /** OAuth 2.0 token for the current user. */ oauth_token?: string; /** Pretty-print response. */ pp?: boolean; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; }): Request; } interface CustomersResource { /** * Creates a customer for zero-touch enrollment. After the method returns * successfully, admin and owner roles can manage devices and EMM configs * by calling API methods or using their zero-touch enrollment portal. The API * doesn't notify the customer that they have access. */ create(request: { /** V1 error format. */ "$.xgafv"?: string; /** OAuth access token. */ access_token?: string; /** Data format for response. */ alt?: string; /** OAuth bearer token. */ bearer_token?: string; /** JSONP */ callback?: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; /** 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. */ key?: string; /** OAuth 2.0 token for the current user. */ oauth_token?: string; /** * Required. The parent resource ID in format `partners/[PARTNER_ID]` that * identifies the reseller. */ parent: string; /** Pretty-print response. */ pp?: boolean; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; }): Request; /** * Lists the customers that are enrolled to the reseller identified by the * `partnerId` argument. This list includes customers that the reseller * created and customers that enrolled themselves using the portal. */ list(request: { /** V1 error format. */ "$.xgafv"?: string; /** OAuth access token. */ access_token?: string; /** Data format for response. */ alt?: string; /** OAuth bearer token. */ bearer_token?: string; /** JSONP */ callback?: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; /** 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. */ key?: string; /** OAuth 2.0 token for the current user. */ oauth_token?: string; /** The ID of the partner. */ partnerId: string; /** Pretty-print response. */ pp?: boolean; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; }): Request; } interface DevicesResource { /** Claim the device identified by device identifier. */ claim(request: { /** V1 error format. */ "$.xgafv"?: string; /** OAuth access token. */ access_token?: string; /** Data format for response. */ alt?: string; /** OAuth bearer token. */ bearer_token?: string; /** JSONP */ callback?: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; /** 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. */ key?: string; /** OAuth 2.0 token for the current user. */ oauth_token?: string; /** ID of the partner. */ partnerId: string; /** Pretty-print response. */ pp?: boolean; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; }): Request; /** Claim devices asynchronously. */ claimAsync(request: { /** V1 error format. */ "$.xgafv"?: string; /** OAuth access token. */ access_token?: string; /** Data format for response. */ alt?: string; /** OAuth bearer token. */ bearer_token?: string; /** JSONP */ callback?: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; /** 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. */ key?: string; /** OAuth 2.0 token for the current user. */ oauth_token?: string; /** Partner ID. */ partnerId: string; /** Pretty-print response. */ pp?: boolean; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; }): Request; /** Find devices by device identifier. */ findByIdentifier(request: { /** V1 error format. */ "$.xgafv"?: string; /** OAuth access token. */ access_token?: string; /** Data format for response. */ alt?: string; /** OAuth bearer token. */ bearer_token?: string; /** JSONP */ callback?: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; /** 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. */ key?: string; /** OAuth 2.0 token for the current user. */ oauth_token?: string; /** ID of the partner. */ partnerId: string; /** Pretty-print response. */ pp?: boolean; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; }): Request; /** Find devices by ownership. */ findByOwner(request: { /** V1 error format. */ "$.xgafv"?: string; /** OAuth access token. */ access_token?: string; /** Data format for response. */ alt?: string; /** OAuth bearer token. */ bearer_token?: string; /** JSONP */ callback?: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; /** 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. */ key?: string; /** OAuth 2.0 token for the current user. */ oauth_token?: string; /** ID of the partner. */ partnerId: string; /** Pretty-print response. */ pp?: boolean; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; }): Request; /** Get a device. */ get(request: { /** V1 error format. */ "$.xgafv"?: string; /** OAuth access token. */ access_token?: string; /** Data format for response. */ alt?: string; /** OAuth bearer token. */ bearer_token?: string; /** JSONP */ callback?: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; /** 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. */ key?: string; /** Resource name in `partners/[PARTNER_ID]/devices/[DEVICE_ID]`. */ name: string; /** OAuth 2.0 token for the current user. */ oauth_token?: string; /** Pretty-print response. */ pp?: boolean; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; }): Request; /** Update the metadata. */ metadata(request: { /** V1 error format. */ "$.xgafv"?: string; /** OAuth access token. */ access_token?: string; /** Data format for response. */ alt?: string; /** OAuth bearer token. */ bearer_token?: string; /** JSONP */ callback?: string; /** ID of the partner. */ deviceId: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; /** 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. */ key?: string; /** The owner of the newly set metadata. Set this to the partner ID. */ metadataOwnerId: string; /** OAuth 2.0 token for the current user. */ oauth_token?: string; /** Pretty-print response. */ pp?: boolean; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; }): Request; /** Unclaim the device identified by the `device_id` or the `deviceIdentifier`. */ unclaim(request: { /** V1 error format. */ "$.xgafv"?: string; /** OAuth access token. */ access_token?: string; /** Data format for response. */ alt?: string; /** OAuth bearer token. */ bearer_token?: string; /** JSONP */ callback?: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; /** 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. */ key?: string; /** OAuth 2.0 token for the current user. */ oauth_token?: string; /** ID of the partner. */ partnerId: string; /** Pretty-print response. */ pp?: boolean; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; }): Request<{}>; /** Unclaim devices asynchronously. */ unclaimAsync(request: { /** V1 error format. */ "$.xgafv"?: string; /** OAuth access token. */ access_token?: string; /** Data format for response. */ alt?: string; /** OAuth bearer token. */ bearer_token?: string; /** JSONP */ callback?: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; /** 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. */ key?: string; /** OAuth 2.0 token for the current user. */ oauth_token?: string; /** Partner ID. */ partnerId: string; /** Pretty-print response. */ pp?: boolean; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; }): Request; /** Set metadata in batch asynchronously. */ updateMetadataAsync(request: { /** V1 error format. */ "$.xgafv"?: string; /** OAuth access token. */ access_token?: string; /** Data format for response. */ alt?: string; /** OAuth bearer token. */ bearer_token?: string; /** JSONP */ callback?: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; /** 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. */ key?: string; /** OAuth 2.0 token for the current user. */ oauth_token?: string; /** Partner ID. */ partnerId: string; /** Pretty-print response. */ pp?: boolean; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; }): Request; } interface PartnersResource { customers: CustomersResource; devices: DevicesResource; } } }