Autogenerated update (2017-08-25)
Add: - adexperiencereport_v1 - androiddeviceprovisioning_v1 - androidmanagement_v1 - bigquerydatatransfer_v1 - cloudtrace_v2 - clouduseraccounts_vm_alpha - consumersurveys_v2 - dlp_v2beta1 - oslogin_v1alpha - playcustomapp_v1 - playmoviespartner_v1 - safebrowsing_v4 - spectrum_v1explorer - speech_v1 - streetviewpublish_v1 - vault_v1 - videointelligence_v1beta1 Update: - acceleratedmobilepageurl_v1 - adexchangebuyer2_v2beta1 - adexchangebuyer_v1_4 - adsense_v1_4 - adsensehost_v4_1 - analytics_v3 - analyticsreporting_v4 - androidenterprise_v1 - androidpublisher_v2 - appengine_v1 - appsactivity_v1 - appstate_v1 - bigquery_v2 - calendar_v3 - classroom_v1 - cloudbilling_v1 - cloudbuild_v1 - clouddebugger_v2 - clouderrorreporting_v1beta1 - cloudfunctions_v1 - cloudkms_v1 - cloudmonitoring_v2beta2 - cloudresourcemanager_v1 - compute_beta - compute_v1 - container_v1 - content_v2 - dataflow_v1b3 - dataproc_v1 - datastore_v1 - deploymentmanager_v2 - dfareporting_v2_8 - dns_v1 - doubleclicksearch_v2 - drive_v3 - firebasedynamiclinks_v1 - firebaserules_v1 - fitness_v1 - games_configuration_v1configuration - games_management_v1management - games_v1 - genomics_v1 - gmail_v1 - iam_v1 - identitytoolkit_v3 - language_v1 - logging_v2 - manufacturers_v1 - ml_v1 - monitoring_v3 - oauth2_v2 - partners_v2 - people_v1 - plus_domains_v1 - plus_v1 - proximitybeacon_v1beta1 - pubsub_v1 - runtimeconfig_v1 - script_v1 - searchconsole_v1 - servicecontrol_v1 - servicemanagement_v1 - serviceuser_v1 - sheets_v4 - slides_v1 - sourcerepo_v1 - spanner_v1 - sqladmin_v1beta4 - storage_v1 - storagetransfer_v1 - toolresults_v1beta3 - vision_v1 - webmasters_v3 - youtube_analytics_v1 - youtube_partner_v1 - youtubereporting_v1
This commit is contained in:
1 parent
ce32deabcf
commit
2dd396ce6e
315 files changed
+158012
-116092
No files matched your search
@@ -0,0 +1,917 @@
|
||||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'date'
|
||||
require 'google/apis/core/base_service'
|
||||
require 'google/apis/core/json_representation'
|
||||
require 'google/apis/core/hashable'
|
||||
require 'google/apis/errors'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
module AndroiddeviceprovisioningV1
|
||||
|
||||
# Request message to claim a device on behalf of a customer.
|
||||
class ClaimDeviceRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The customer to claim for.
|
||||
# Corresponds to the JSON property `customerId`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :customer_id
|
||||
|
||||
# DeviceIdentifiers identifies an unique device.
|
||||
# Corresponds to the JSON property `deviceIdentifier`
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier]
|
||||
attr_accessor :device_identifier
|
||||
|
||||
# Section to claim
|
||||
# Corresponds to the JSON property `sectionType`
|
||||
# @return [String]
|
||||
attr_accessor :section_type
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@customer_id = args[:customer_id] if args.key?(:customer_id)
|
||||
@device_identifier = args[:device_identifier] if args.key?(:device_identifier)
|
||||
@section_type = args[:section_type] if args.key?(:section_type)
|
||||
end
|
||||
end
|
||||
|
||||
# Response message containing device id of the claim.
|
||||
class ClaimDeviceResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# the device id of the claimed device.
|
||||
# Corresponds to the JSON property `deviceId`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :device_id
|
||||
|
||||
# the resource name of the device in
|
||||
# 'partners/[PARTNER_ID]/devices/[DEVICE_ID]'.
|
||||
# Corresponds to the JSON property `deviceName`
|
||||
# @return [String]
|
||||
attr_accessor :device_name
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@device_id = args[:device_id] if args.key?(:device_id)
|
||||
@device_name = args[:device_name] if args.key?(:device_name)
|
||||
end
|
||||
end
|
||||
|
||||
# Request to claim devices asynchronously in batch.
|
||||
class ClaimDevicesRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# list of claims.
|
||||
# Corresponds to the JSON property `claims`
|
||||
# @return [Array<Google::Apis::AndroiddeviceprovisioningV1::PartnerClaim>]
|
||||
attr_accessor :claims
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@claims = args[:claims] if args.key?(:claims)
|
||||
end
|
||||
end
|
||||
|
||||
# Company
|
||||
class Company
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Admin email.
|
||||
# Admins will be able to operate on the portal.
|
||||
# This field is a WRITE-only field at creation time.
|
||||
# Corresponds to the JSON property `adminEmails`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :admin_emails
|
||||
|
||||
# company id
|
||||
# Corresponds to the JSON property `companyId`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :company_id
|
||||
|
||||
# company name
|
||||
# Corresponds to the JSON property `companyName`
|
||||
# @return [String]
|
||||
attr_accessor :company_name
|
||||
|
||||
# REST Resource name.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# Owner email.
|
||||
# Owner is able to operate on the portal, and modify admins and other owners.
|
||||
# This field is a WRITE-only field at creation time.
|
||||
# Corresponds to the JSON property `ownerEmails`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :owner_emails
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@admin_emails = args[:admin_emails] if args.key?(:admin_emails)
|
||||
@company_id = args[:company_id] if args.key?(:company_id)
|
||||
@company_name = args[:company_name] if args.key?(:company_name)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@owner_emails = args[:owner_emails] if args.key?(:owner_emails)
|
||||
end
|
||||
end
|
||||
|
||||
# Device
|
||||
class Device
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# claims
|
||||
# Corresponds to the JSON property `claims`
|
||||
# @return [Array<Google::Apis::AndroiddeviceprovisioningV1::DeviceClaim>]
|
||||
attr_accessor :claims
|
||||
|
||||
# The resource name of the configuration.
|
||||
# Only set for customers.
|
||||
# Corresponds to the JSON property `configuration`
|
||||
# @return [String]
|
||||
attr_accessor :configuration
|
||||
|
||||
# Device id
|
||||
# Corresponds to the JSON property `deviceId`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :device_id
|
||||
|
||||
# DeviceIdentifiers identifies an unique device.
|
||||
# Corresponds to the JSON property `deviceIdentifier`
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier]
|
||||
attr_accessor :device_identifier
|
||||
|
||||
# A key value pair of the device metadata.
|
||||
# Corresponds to the JSON property `deviceMetadata`
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::DeviceMetadata]
|
||||
attr_accessor :device_metadata
|
||||
|
||||
# Resource name in 'partners/[PARTNER_ID]/devices/[DEVICE_ID]'.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@claims = args[:claims] if args.key?(:claims)
|
||||
@configuration = args[:configuration] if args.key?(:configuration)
|
||||
@device_id = args[:device_id] if args.key?(:device_id)
|
||||
@device_identifier = args[:device_identifier] if args.key?(:device_identifier)
|
||||
@device_metadata = args[:device_metadata] if args.key?(:device_metadata)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
end
|
||||
end
|
||||
|
||||
# containing the necessary info about a claim for a partner.
|
||||
class DeviceClaim
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# owner id
|
||||
# Corresponds to the JSON property `ownerCompanyId`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :owner_company_id
|
||||
|
||||
# section type.
|
||||
# Corresponds to the JSON property `sectionType`
|
||||
# @return [String]
|
||||
attr_accessor :section_type
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@owner_company_id = args[:owner_company_id] if args.key?(:owner_company_id)
|
||||
@section_type = args[:section_type] if args.key?(:section_type)
|
||||
end
|
||||
end
|
||||
|
||||
# DeviceIdentifiers identifies an unique device.
|
||||
class DeviceIdentifier
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# IMEI
|
||||
# Corresponds to the JSON property `imei`
|
||||
# @return [String]
|
||||
attr_accessor :imei
|
||||
|
||||
# Manufacturer name to match `android.os.Build.MANUFACTURER` (required).
|
||||
# Allowed values listed in
|
||||
# [manufacturer names](/zero-touch/resources/manufacturer-names).
|
||||
# Corresponds to the JSON property `manufacturer`
|
||||
# @return [String]
|
||||
attr_accessor :manufacturer
|
||||
|
||||
# MEID
|
||||
# Corresponds to the JSON property `meid`
|
||||
# @return [String]
|
||||
attr_accessor :meid
|
||||
|
||||
# Serial number (optional)
|
||||
# Corresponds to the JSON property `serialNumber`
|
||||
# @return [String]
|
||||
attr_accessor :serial_number
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@imei = args[:imei] if args.key?(:imei)
|
||||
@manufacturer = args[:manufacturer] if args.key?(:manufacturer)
|
||||
@meid = args[:meid] if args.key?(:meid)
|
||||
@serial_number = args[:serial_number] if args.key?(:serial_number)
|
||||
end
|
||||
end
|
||||
|
||||
# A key value pair of the device metadata.
|
||||
class DeviceMetadata
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Metadata entries
|
||||
# Corresponds to the JSON property `entries`
|
||||
# @return [Hash<String,String>]
|
||||
attr_accessor :entries
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@entries = args[:entries] if args.key?(:entries)
|
||||
end
|
||||
end
|
||||
|
||||
# Long running operation metadata.
|
||||
class DevicesLongRunningOperationMetadata
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Number of devices parsed in your requests.
|
||||
# Corresponds to the JSON property `devicesCount`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :devices_count
|
||||
|
||||
# The overall processing status.
|
||||
# Corresponds to the JSON property `processingStatus`
|
||||
# @return [String]
|
||||
attr_accessor :processing_status
|
||||
|
||||
# Processing progress from 0 to 100.
|
||||
# Corresponds to the JSON property `progress`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :progress
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@devices_count = args[:devices_count] if args.key?(:devices_count)
|
||||
@processing_status = args[:processing_status] if args.key?(:processing_status)
|
||||
@progress = args[:progress] if args.key?(:progress)
|
||||
end
|
||||
end
|
||||
|
||||
# Long running operation response.
|
||||
class DevicesLongRunningOperationResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# processing status for each device.
|
||||
# One PerDeviceStatus per device. The order is the same as in your requests.
|
||||
# Corresponds to the JSON property `perDeviceStatus`
|
||||
# @return [Array<Google::Apis::AndroiddeviceprovisioningV1::OperationPerDevice>]
|
||||
attr_accessor :per_device_status
|
||||
|
||||
# Number of succeesfully processed ones.
|
||||
# Corresponds to the JSON property `successCount`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :success_count
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@per_device_status = args[:per_device_status] if args.key?(:per_device_status)
|
||||
@success_count = args[:success_count] if args.key?(:success_count)
|
||||
end
|
||||
end
|
||||
|
||||
# A generic empty message that you can re-use to avoid defining duplicated
|
||||
# empty messages in your APIs. A typical example is to use it as the request
|
||||
# or the response type of an API method. For instance:
|
||||
# service Foo `
|
||||
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||
# `
|
||||
# The JSON representation for `Empty` is empty JSON object ````.
|
||||
class Empty
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# Request to find devices.
|
||||
class FindDevicesByDeviceIdentifierRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# DeviceIdentifiers identifies an unique device.
|
||||
# Corresponds to the JSON property `deviceIdentifier`
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier]
|
||||
attr_accessor :device_identifier
|
||||
|
||||
# Number of devices to show.
|
||||
# Corresponds to the JSON property `limit`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :limit
|
||||
|
||||
# Page token
|
||||
# Corresponds to the JSON property `pageToken`
|
||||
# @return [String]
|
||||
attr_accessor :page_token
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@device_identifier = args[:device_identifier] if args.key?(:device_identifier)
|
||||
@limit = args[:limit] if args.key?(:limit)
|
||||
@page_token = args[:page_token] if args.key?(:page_token)
|
||||
end
|
||||
end
|
||||
|
||||
# Response containing found devices.
|
||||
class FindDevicesByDeviceIdentifierResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Found devices.
|
||||
# Corresponds to the JSON property `devices`
|
||||
# @return [Array<Google::Apis::AndroiddeviceprovisioningV1::Device>]
|
||||
attr_accessor :devices
|
||||
|
||||
# Page token of next page
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@devices = args[:devices] if args.key?(:devices)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
end
|
||||
end
|
||||
|
||||
# Request to find devices by customers.
|
||||
class FindDevicesByOwnerRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# List of customer ids to search for.
|
||||
# Corresponds to the JSON property `customerId`
|
||||
# @return [Array<Fixnum>]
|
||||
attr_accessor :customer_id
|
||||
|
||||
# The number of devices to show in the result.
|
||||
# Corresponds to the JSON property `limit`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :limit
|
||||
|
||||
# Page token
|
||||
# Corresponds to the JSON property `pageToken`
|
||||
# @return [String]
|
||||
attr_accessor :page_token
|
||||
|
||||
# The section type.
|
||||
# Corresponds to the JSON property `sectionType`
|
||||
# @return [String]
|
||||
attr_accessor :section_type
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@customer_id = args[:customer_id] if args.key?(:customer_id)
|
||||
@limit = args[:limit] if args.key?(:limit)
|
||||
@page_token = args[:page_token] if args.key?(:page_token)
|
||||
@section_type = args[:section_type] if args.key?(:section_type)
|
||||
end
|
||||
end
|
||||
|
||||
# Response containing found devices.
|
||||
class FindDevicesByOwnerResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Devices found.
|
||||
# Corresponds to the JSON property `devices`
|
||||
# @return [Array<Google::Apis::AndroiddeviceprovisioningV1::Device>]
|
||||
attr_accessor :devices
|
||||
|
||||
# Page token of next page
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@devices = args[:devices] if args.key?(:devices)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
end
|
||||
end
|
||||
|
||||
# Response message of all customers related to this partner.
|
||||
class ListCustomersResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# List of customers related to this partner.
|
||||
# Corresponds to the JSON property `customers`
|
||||
# @return [Array<Google::Apis::AndroiddeviceprovisioningV1::Company>]
|
||||
attr_accessor :customers
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@customers = args[:customers] if args.key?(:customers)
|
||||
end
|
||||
end
|
||||
|
||||
# This resource represents a long-running operation that is the result of a
|
||||
# network API call.
|
||||
class Operation
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# 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.
|
||||
# Corresponds to the JSON property `done`
|
||||
# @return [Boolean]
|
||||
attr_accessor :done
|
||||
alias_method :done?, :done
|
||||
|
||||
# The `Status` type defines a logical error model that is suitable for different
|
||||
# programming environments, including REST APIs and RPC APIs. It is used by
|
||||
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
||||
# - Simple to use and understand for most users
|
||||
# - Flexible enough to meet unexpected needs
|
||||
# # Overview
|
||||
# The `Status` message contains three pieces of data: error code, error message,
|
||||
# and error details. The error code should be an enum value of
|
||||
# google.rpc.Code, but it may accept additional error codes if needed. The
|
||||
# error message should be a developer-facing English message that helps
|
||||
# developers *understand* and *resolve* the error. If a localized user-facing
|
||||
# error message is needed, put the localized message in the error details or
|
||||
# localize it in the client. The optional error details may contain arbitrary
|
||||
# information about the error. There is a predefined set of error detail types
|
||||
# in the package `google.rpc` that can be used for common error conditions.
|
||||
# # Language mapping
|
||||
# The `Status` message is the logical representation of the error model, but it
|
||||
# is not necessarily the actual wire format. When the `Status` message is
|
||||
# exposed in different client libraries and different wire protocols, it can be
|
||||
# mapped differently. For example, it will likely be mapped to some exceptions
|
||||
# in Java, but more likely mapped to some error codes in C.
|
||||
# # Other uses
|
||||
# The error model and the `Status` message can be used in a variety of
|
||||
# environments, either with or without APIs, to provide a
|
||||
# consistent developer experience across different environments.
|
||||
# Example uses of this error model include:
|
||||
# - Partial errors. If a service needs to return partial errors to the client,
|
||||
# it may embed the `Status` in the normal response to indicate the partial
|
||||
# errors.
|
||||
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
||||
# have a `Status` message for error reporting.
|
||||
# - Batch operations. If a client uses batch request and batch response, the
|
||||
# `Status` message should be used directly inside batch response, one for
|
||||
# each error sub-response.
|
||||
# - Asynchronous operations. If an API call embeds asynchronous operation
|
||||
# results in its response, the status of those operations should be
|
||||
# represented directly using the `Status` message.
|
||||
# - Logging. If some API errors are stored in logs, the message `Status` could
|
||||
# be used directly after any stripping needed for security/privacy reasons.
|
||||
# Corresponds to the JSON property `error`
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::Status]
|
||||
attr_accessor :error
|
||||
|
||||
# This field will contain a `DevicesLongRunningOperationMetadata` object if the
|
||||
# operation is created by `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`.
|
||||
# Corresponds to the JSON property `metadata`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :metadata
|
||||
|
||||
# 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`.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# This field will contain a `DevicesLongRunningOperationResponse` object if the
|
||||
# operation is created by `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`.
|
||||
# Corresponds to the JSON property `response`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :response
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@done = args[:done] if args.key?(:done)
|
||||
@error = args[:error] if args.key?(:error)
|
||||
@metadata = args[:metadata] if args.key?(:metadata)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@response = args[:response] if args.key?(:response)
|
||||
end
|
||||
end
|
||||
|
||||
# Operation the server received for every device.
|
||||
class OperationPerDevice
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Identifies one claim request.
|
||||
# Corresponds to the JSON property `claim`
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::PartnerClaim]
|
||||
attr_accessor :claim
|
||||
|
||||
# Stores the processing result for each device.
|
||||
# Corresponds to the JSON property `result`
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::PerDeviceStatusInBatch]
|
||||
attr_accessor :result
|
||||
|
||||
# Identifies one unclaim request.
|
||||
# Corresponds to the JSON property `unclaim`
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::PartnerUnclaim]
|
||||
attr_accessor :unclaim
|
||||
|
||||
# Identifies metdata updates to one device.
|
||||
# Corresponds to the JSON property `updateMetadata`
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::UpdateMetadataArguments]
|
||||
attr_accessor :update_metadata
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@claim = args[:claim] if args.key?(:claim)
|
||||
@result = args[:result] if args.key?(:result)
|
||||
@unclaim = args[:unclaim] if args.key?(:unclaim)
|
||||
@update_metadata = args[:update_metadata] if args.key?(:update_metadata)
|
||||
end
|
||||
end
|
||||
|
||||
# Identifies one claim request.
|
||||
class PartnerClaim
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# customer id to claim for.
|
||||
# Corresponds to the JSON property `customerId`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :customer_id
|
||||
|
||||
# DeviceIdentifiers identifies an unique device.
|
||||
# Corresponds to the JSON property `deviceIdentifier`
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier]
|
||||
attr_accessor :device_identifier
|
||||
|
||||
# A key value pair of the device metadata.
|
||||
# Corresponds to the JSON property `deviceMetadata`
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::DeviceMetadata]
|
||||
attr_accessor :device_metadata
|
||||
|
||||
# section type to claim.
|
||||
# Corresponds to the JSON property `sectionType`
|
||||
# @return [String]
|
||||
attr_accessor :section_type
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@customer_id = args[:customer_id] if args.key?(:customer_id)
|
||||
@device_identifier = args[:device_identifier] if args.key?(:device_identifier)
|
||||
@device_metadata = args[:device_metadata] if args.key?(:device_metadata)
|
||||
@section_type = args[:section_type] if args.key?(:section_type)
|
||||
end
|
||||
end
|
||||
|
||||
# Identifies one unclaim request.
|
||||
class PartnerUnclaim
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# device id of the device.
|
||||
# Corresponds to the JSON property `deviceId`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :device_id
|
||||
|
||||
# DeviceIdentifiers identifies an unique device.
|
||||
# Corresponds to the JSON property `deviceIdentifier`
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier]
|
||||
attr_accessor :device_identifier
|
||||
|
||||
# section type to unclaim.
|
||||
# Corresponds to the JSON property `sectionType`
|
||||
# @return [String]
|
||||
attr_accessor :section_type
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@device_id = args[:device_id] if args.key?(:device_id)
|
||||
@device_identifier = args[:device_identifier] if args.key?(:device_identifier)
|
||||
@section_type = args[:section_type] if args.key?(:section_type)
|
||||
end
|
||||
end
|
||||
|
||||
# Stores the processing result for each device.
|
||||
class PerDeviceStatusInBatch
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# device id of the device if process succeeds.
|
||||
# Corresponds to the JSON property `deviceId`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :device_id
|
||||
|
||||
# Error identifier.
|
||||
# Corresponds to the JSON property `errorIdentifier`
|
||||
# @return [String]
|
||||
attr_accessor :error_identifier
|
||||
|
||||
# Error message
|
||||
# Corresponds to the JSON property `errorMessage`
|
||||
# @return [String]
|
||||
attr_accessor :error_message
|
||||
|
||||
# Process result.
|
||||
# Corresponds to the JSON property `status`
|
||||
# @return [String]
|
||||
attr_accessor :status
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@device_id = args[:device_id] if args.key?(:device_id)
|
||||
@error_identifier = args[:error_identifier] if args.key?(:error_identifier)
|
||||
@error_message = args[:error_message] if args.key?(:error_message)
|
||||
@status = args[:status] if args.key?(:status)
|
||||
end
|
||||
end
|
||||
|
||||
# The `Status` type defines a logical error model that is suitable for different
|
||||
# programming environments, including REST APIs and RPC APIs. It is used by
|
||||
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
||||
# - Simple to use and understand for most users
|
||||
# - Flexible enough to meet unexpected needs
|
||||
# # Overview
|
||||
# The `Status` message contains three pieces of data: error code, error message,
|
||||
# and error details. The error code should be an enum value of
|
||||
# google.rpc.Code, but it may accept additional error codes if needed. The
|
||||
# error message should be a developer-facing English message that helps
|
||||
# developers *understand* and *resolve* the error. If a localized user-facing
|
||||
# error message is needed, put the localized message in the error details or
|
||||
# localize it in the client. The optional error details may contain arbitrary
|
||||
# information about the error. There is a predefined set of error detail types
|
||||
# in the package `google.rpc` that can be used for common error conditions.
|
||||
# # Language mapping
|
||||
# The `Status` message is the logical representation of the error model, but it
|
||||
# is not necessarily the actual wire format. When the `Status` message is
|
||||
# exposed in different client libraries and different wire protocols, it can be
|
||||
# mapped differently. For example, it will likely be mapped to some exceptions
|
||||
# in Java, but more likely mapped to some error codes in C.
|
||||
# # Other uses
|
||||
# The error model and the `Status` message can be used in a variety of
|
||||
# environments, either with or without APIs, to provide a
|
||||
# consistent developer experience across different environments.
|
||||
# Example uses of this error model include:
|
||||
# - Partial errors. If a service needs to return partial errors to the client,
|
||||
# it may embed the `Status` in the normal response to indicate the partial
|
||||
# errors.
|
||||
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
||||
# have a `Status` message for error reporting.
|
||||
# - Batch operations. If a client uses batch request and batch response, the
|
||||
# `Status` message should be used directly inside batch response, one for
|
||||
# each error sub-response.
|
||||
# - Asynchronous operations. If an API call embeds asynchronous operation
|
||||
# results in its response, the status of those operations should be
|
||||
# represented directly using the `Status` message.
|
||||
# - Logging. If some API errors are stored in logs, the message `Status` could
|
||||
# be used directly after any stripping needed for security/privacy reasons.
|
||||
class Status
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The status code, which should be an enum value of google.rpc.Code.
|
||||
# Corresponds to the JSON property `code`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :code
|
||||
|
||||
# A list of messages that carry the error details. There is a common set of
|
||||
# message types for APIs to use.
|
||||
# Corresponds to the JSON property `details`
|
||||
# @return [Array<Hash<String,Object>>]
|
||||
attr_accessor :details
|
||||
|
||||
# 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.
|
||||
# Corresponds to the JSON property `message`
|
||||
# @return [String]
|
||||
attr_accessor :message
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@code = args[:code] if args.key?(:code)
|
||||
@details = args[:details] if args.key?(:details)
|
||||
@message = args[:message] if args.key?(:message)
|
||||
end
|
||||
end
|
||||
|
||||
# Request message to unclaim a device.
|
||||
class UnclaimDeviceRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The device id returned by ClaimDevice.
|
||||
# Corresponds to the JSON property `deviceId`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :device_id
|
||||
|
||||
# DeviceIdentifiers identifies an unique device.
|
||||
# Corresponds to the JSON property `deviceIdentifier`
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier]
|
||||
attr_accessor :device_identifier
|
||||
|
||||
# The section type to unclaim for.
|
||||
# Corresponds to the JSON property `sectionType`
|
||||
# @return [String]
|
||||
attr_accessor :section_type
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@device_id = args[:device_id] if args.key?(:device_id)
|
||||
@device_identifier = args[:device_identifier] if args.key?(:device_identifier)
|
||||
@section_type = args[:section_type] if args.key?(:section_type)
|
||||
end
|
||||
end
|
||||
|
||||
# Request to unclaim devices asynchronously in batch.
|
||||
class UnclaimDevicesRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# list of unclaims.
|
||||
# Corresponds to the JSON property `unclaims`
|
||||
# @return [Array<Google::Apis::AndroiddeviceprovisioningV1::PartnerUnclaim>]
|
||||
attr_accessor :unclaims
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@unclaims = args[:unclaims] if args.key?(:unclaims)
|
||||
end
|
||||
end
|
||||
|
||||
# Request to update device metadata in batch.
|
||||
class UpdateDeviceMetadataInBatchRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# list of metadata updates.
|
||||
# Corresponds to the JSON property `updates`
|
||||
# @return [Array<Google::Apis::AndroiddeviceprovisioningV1::UpdateMetadataArguments>]
|
||||
attr_accessor :updates
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@updates = args[:updates] if args.key?(:updates)
|
||||
end
|
||||
end
|
||||
|
||||
# Request to set metadata for a device.
|
||||
class UpdateDeviceMetadataRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A key value pair of the device metadata.
|
||||
# Corresponds to the JSON property `deviceMetadata`
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::DeviceMetadata]
|
||||
attr_accessor :device_metadata
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@device_metadata = args[:device_metadata] if args.key?(:device_metadata)
|
||||
end
|
||||
end
|
||||
|
||||
# Identifies metdata updates to one device.
|
||||
class UpdateMetadataArguments
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# device id of the device.
|
||||
# Corresponds to the JSON property `deviceId`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :device_id
|
||||
|
||||
# DeviceIdentifiers identifies an unique device.
|
||||
# Corresponds to the JSON property `deviceIdentifier`
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier]
|
||||
attr_accessor :device_identifier
|
||||
|
||||
# A key value pair of the device metadata.
|
||||
# Corresponds to the JSON property `deviceMetadata`
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::DeviceMetadata]
|
||||
attr_accessor :device_metadata
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@device_id = args[:device_id] if args.key?(:device_id)
|
||||
@device_identifier = args[:device_identifier] if args.key?(:device_identifier)
|
||||
@device_metadata = args[:device_metadata] if args.key?(:device_metadata)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,447 @@
|
||||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'date'
|
||||
require 'google/apis/core/base_service'
|
||||
require 'google/apis/core/json_representation'
|
||||
require 'google/apis/core/hashable'
|
||||
require 'google/apis/errors'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
module AndroiddeviceprovisioningV1
|
||||
|
||||
class ClaimDeviceRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ClaimDeviceResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ClaimDevicesRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Company
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Device
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DeviceClaim
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DeviceIdentifier
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DeviceMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DevicesLongRunningOperationMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DevicesLongRunningOperationResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Empty
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class FindDevicesByDeviceIdentifierRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class FindDevicesByDeviceIdentifierResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class FindDevicesByOwnerRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class FindDevicesByOwnerResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListCustomersResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Operation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationPerDevice
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PartnerClaim
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PartnerUnclaim
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PerDeviceStatusInBatch
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Status
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UnclaimDeviceRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UnclaimDevicesRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UpdateDeviceMetadataInBatchRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UpdateDeviceMetadataRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UpdateMetadataArguments
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ClaimDeviceRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :customer_id, :numeric_string => true, as: 'customerId'
|
||||
property :device_identifier, as: 'deviceIdentifier', class: Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier, decorator: Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier::Representation
|
||||
|
||||
property :section_type, as: 'sectionType'
|
||||
end
|
||||
end
|
||||
|
||||
class ClaimDeviceResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :device_id, :numeric_string => true, as: 'deviceId'
|
||||
property :device_name, as: 'deviceName'
|
||||
end
|
||||
end
|
||||
|
||||
class ClaimDevicesRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :claims, as: 'claims', class: Google::Apis::AndroiddeviceprovisioningV1::PartnerClaim, decorator: Google::Apis::AndroiddeviceprovisioningV1::PartnerClaim::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Company
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :admin_emails, as: 'adminEmails'
|
||||
property :company_id, :numeric_string => true, as: 'companyId'
|
||||
property :company_name, as: 'companyName'
|
||||
property :name, as: 'name'
|
||||
collection :owner_emails, as: 'ownerEmails'
|
||||
end
|
||||
end
|
||||
|
||||
class Device
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :claims, as: 'claims', class: Google::Apis::AndroiddeviceprovisioningV1::DeviceClaim, decorator: Google::Apis::AndroiddeviceprovisioningV1::DeviceClaim::Representation
|
||||
|
||||
property :configuration, as: 'configuration'
|
||||
property :device_id, :numeric_string => true, as: 'deviceId'
|
||||
property :device_identifier, as: 'deviceIdentifier', class: Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier, decorator: Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier::Representation
|
||||
|
||||
property :device_metadata, as: 'deviceMetadata', class: Google::Apis::AndroiddeviceprovisioningV1::DeviceMetadata, decorator: Google::Apis::AndroiddeviceprovisioningV1::DeviceMetadata::Representation
|
||||
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class DeviceClaim
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :owner_company_id, :numeric_string => true, as: 'ownerCompanyId'
|
||||
property :section_type, as: 'sectionType'
|
||||
end
|
||||
end
|
||||
|
||||
class DeviceIdentifier
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :imei, as: 'imei'
|
||||
property :manufacturer, as: 'manufacturer'
|
||||
property :meid, as: 'meid'
|
||||
property :serial_number, as: 'serialNumber'
|
||||
end
|
||||
end
|
||||
|
||||
class DeviceMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
hash :entries, as: 'entries'
|
||||
end
|
||||
end
|
||||
|
||||
class DevicesLongRunningOperationMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :devices_count, as: 'devicesCount'
|
||||
property :processing_status, as: 'processingStatus'
|
||||
property :progress, as: 'progress'
|
||||
end
|
||||
end
|
||||
|
||||
class DevicesLongRunningOperationResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :per_device_status, as: 'perDeviceStatus', class: Google::Apis::AndroiddeviceprovisioningV1::OperationPerDevice, decorator: Google::Apis::AndroiddeviceprovisioningV1::OperationPerDevice::Representation
|
||||
|
||||
property :success_count, as: 'successCount'
|
||||
end
|
||||
end
|
||||
|
||||
class Empty
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class FindDevicesByDeviceIdentifierRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :device_identifier, as: 'deviceIdentifier', class: Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier, decorator: Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier::Representation
|
||||
|
||||
property :limit, :numeric_string => true, as: 'limit'
|
||||
property :page_token, as: 'pageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class FindDevicesByDeviceIdentifierResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :devices, as: 'devices', class: Google::Apis::AndroiddeviceprovisioningV1::Device, decorator: Google::Apis::AndroiddeviceprovisioningV1::Device::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class FindDevicesByOwnerRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :customer_id, as: 'customerId'
|
||||
property :limit, :numeric_string => true, as: 'limit'
|
||||
property :page_token, as: 'pageToken'
|
||||
property :section_type, as: 'sectionType'
|
||||
end
|
||||
end
|
||||
|
||||
class FindDevicesByOwnerResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :devices, as: 'devices', class: Google::Apis::AndroiddeviceprovisioningV1::Device, decorator: Google::Apis::AndroiddeviceprovisioningV1::Device::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListCustomersResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :customers, as: 'customers', class: Google::Apis::AndroiddeviceprovisioningV1::Company, decorator: Google::Apis::AndroiddeviceprovisioningV1::Company::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Operation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :done, as: 'done'
|
||||
property :error, as: 'error', class: Google::Apis::AndroiddeviceprovisioningV1::Status, decorator: Google::Apis::AndroiddeviceprovisioningV1::Status::Representation
|
||||
|
||||
hash :metadata, as: 'metadata'
|
||||
property :name, as: 'name'
|
||||
hash :response, as: 'response'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationPerDevice
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :claim, as: 'claim', class: Google::Apis::AndroiddeviceprovisioningV1::PartnerClaim, decorator: Google::Apis::AndroiddeviceprovisioningV1::PartnerClaim::Representation
|
||||
|
||||
property :result, as: 'result', class: Google::Apis::AndroiddeviceprovisioningV1::PerDeviceStatusInBatch, decorator: Google::Apis::AndroiddeviceprovisioningV1::PerDeviceStatusInBatch::Representation
|
||||
|
||||
property :unclaim, as: 'unclaim', class: Google::Apis::AndroiddeviceprovisioningV1::PartnerUnclaim, decorator: Google::Apis::AndroiddeviceprovisioningV1::PartnerUnclaim::Representation
|
||||
|
||||
property :update_metadata, as: 'updateMetadata', class: Google::Apis::AndroiddeviceprovisioningV1::UpdateMetadataArguments, decorator: Google::Apis::AndroiddeviceprovisioningV1::UpdateMetadataArguments::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class PartnerClaim
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :customer_id, :numeric_string => true, as: 'customerId'
|
||||
property :device_identifier, as: 'deviceIdentifier', class: Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier, decorator: Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier::Representation
|
||||
|
||||
property :device_metadata, as: 'deviceMetadata', class: Google::Apis::AndroiddeviceprovisioningV1::DeviceMetadata, decorator: Google::Apis::AndroiddeviceprovisioningV1::DeviceMetadata::Representation
|
||||
|
||||
property :section_type, as: 'sectionType'
|
||||
end
|
||||
end
|
||||
|
||||
class PartnerUnclaim
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :device_id, :numeric_string => true, as: 'deviceId'
|
||||
property :device_identifier, as: 'deviceIdentifier', class: Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier, decorator: Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier::Representation
|
||||
|
||||
property :section_type, as: 'sectionType'
|
||||
end
|
||||
end
|
||||
|
||||
class PerDeviceStatusInBatch
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :device_id, :numeric_string => true, as: 'deviceId'
|
||||
property :error_identifier, as: 'errorIdentifier'
|
||||
property :error_message, as: 'errorMessage'
|
||||
property :status, as: 'status'
|
||||
end
|
||||
end
|
||||
|
||||
class Status
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
collection :details, as: 'details'
|
||||
property :message, as: 'message'
|
||||
end
|
||||
end
|
||||
|
||||
class UnclaimDeviceRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :device_id, :numeric_string => true, as: 'deviceId'
|
||||
property :device_identifier, as: 'deviceIdentifier', class: Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier, decorator: Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier::Representation
|
||||
|
||||
property :section_type, as: 'sectionType'
|
||||
end
|
||||
end
|
||||
|
||||
class UnclaimDevicesRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :unclaims, as: 'unclaims', class: Google::Apis::AndroiddeviceprovisioningV1::PartnerUnclaim, decorator: Google::Apis::AndroiddeviceprovisioningV1::PartnerUnclaim::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateDeviceMetadataInBatchRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :updates, as: 'updates', class: Google::Apis::AndroiddeviceprovisioningV1::UpdateMetadataArguments, decorator: Google::Apis::AndroiddeviceprovisioningV1::UpdateMetadataArguments::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateDeviceMetadataRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :device_metadata, as: 'deviceMetadata', class: Google::Apis::AndroiddeviceprovisioningV1::DeviceMetadata, decorator: Google::Apis::AndroiddeviceprovisioningV1::DeviceMetadata::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateMetadataArguments
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :device_id, :numeric_string => true, as: 'deviceId'
|
||||
property :device_identifier, as: 'deviceIdentifier', class: Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier, decorator: Google::Apis::AndroiddeviceprovisioningV1::DeviceIdentifier::Representation
|
||||
|
||||
property :device_metadata, as: 'deviceMetadata', class: Google::Apis::AndroiddeviceprovisioningV1::DeviceMetadata, decorator: Google::Apis::AndroiddeviceprovisioningV1::DeviceMetadata::Representation
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,419 @@
|
||||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'google/apis/core/base_service'
|
||||
require 'google/apis/core/json_representation'
|
||||
require 'google/apis/core/hashable'
|
||||
require 'google/apis/errors'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
module AndroiddeviceprovisioningV1
|
||||
# Android Device Provisioning Partner API
|
||||
#
|
||||
# Automates reseller integration into Zero Touch Provisioning by assigning
|
||||
# devices to customers and creating device reports.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/androiddeviceprovisioning_v1'
|
||||
#
|
||||
# Androiddeviceprovisioning = Google::Apis::AndroiddeviceprovisioningV1 # Alias the module
|
||||
# service = Androiddeviceprovisioning::AndroidProvisioningPartnerService.new
|
||||
#
|
||||
# @see https://developers.google.com/zero-touch/
|
||||
class AndroidProvisioningPartnerService < Google::Apis::Core::BaseService
|
||||
# @return [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.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# 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.
|
||||
attr_accessor :quota_user
|
||||
|
||||
def initialize
|
||||
super('https://androiddeviceprovisioning.googleapis.com/', '')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# 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.
|
||||
# @param [String] name
|
||||
# The name of the operation resource.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AndroiddeviceprovisioningV1::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::Operation]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}', options)
|
||||
command.response_representation = Google::Apis::AndroiddeviceprovisioningV1::Operation::Representation
|
||||
command.response_class = Google::Apis::AndroiddeviceprovisioningV1::Operation
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# List all the customers that has delegates some role to this customer.
|
||||
# @param [Fixnum] partner_id
|
||||
# the id of the partner.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AndroiddeviceprovisioningV1::ListCustomersResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::ListCustomersResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_partner_customers(partner_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/partners/{+partnerId}/customers', options)
|
||||
command.response_representation = Google::Apis::AndroiddeviceprovisioningV1::ListCustomersResponse::Representation
|
||||
command.response_class = Google::Apis::AndroiddeviceprovisioningV1::ListCustomersResponse
|
||||
command.params['partnerId'] = partner_id unless partner_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Claim the device identified by device identifier.
|
||||
# @param [Fixnum] partner_id
|
||||
# Id of the partner.
|
||||
# @param [Google::Apis::AndroiddeviceprovisioningV1::ClaimDeviceRequest] claim_device_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AndroiddeviceprovisioningV1::ClaimDeviceResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::ClaimDeviceResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def claim_device(partner_id, claim_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/partners/{+partnerId}/devices:claim', options)
|
||||
command.request_representation = Google::Apis::AndroiddeviceprovisioningV1::ClaimDeviceRequest::Representation
|
||||
command.request_object = claim_device_request_object
|
||||
command.response_representation = Google::Apis::AndroiddeviceprovisioningV1::ClaimDeviceResponse::Representation
|
||||
command.response_class = Google::Apis::AndroiddeviceprovisioningV1::ClaimDeviceResponse
|
||||
command.params['partnerId'] = partner_id unless partner_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Claim devices asynchronously
|
||||
# @param [Fixnum] partner_id
|
||||
# partner id.
|
||||
# @param [Google::Apis::AndroiddeviceprovisioningV1::ClaimDevicesRequest] claim_devices_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AndroiddeviceprovisioningV1::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::Operation]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def claim_partner_device_async(partner_id, claim_devices_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/partners/{+partnerId}/devices:claimAsync', options)
|
||||
command.request_representation = Google::Apis::AndroiddeviceprovisioningV1::ClaimDevicesRequest::Representation
|
||||
command.request_object = claim_devices_request_object
|
||||
command.response_representation = Google::Apis::AndroiddeviceprovisioningV1::Operation::Representation
|
||||
command.response_class = Google::Apis::AndroiddeviceprovisioningV1::Operation
|
||||
command.params['partnerId'] = partner_id unless partner_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Find devices by device identifier.
|
||||
# @param [Fixnum] partner_id
|
||||
# id of the partner.
|
||||
# @param [Google::Apis::AndroiddeviceprovisioningV1::FindDevicesByDeviceIdentifierRequest] find_devices_by_device_identifier_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AndroiddeviceprovisioningV1::FindDevicesByDeviceIdentifierResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::FindDevicesByDeviceIdentifierResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def find_partner_device_by_identifier(partner_id, find_devices_by_device_identifier_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/partners/{+partnerId}/devices:findByIdentifier', options)
|
||||
command.request_representation = Google::Apis::AndroiddeviceprovisioningV1::FindDevicesByDeviceIdentifierRequest::Representation
|
||||
command.request_object = find_devices_by_device_identifier_request_object
|
||||
command.response_representation = Google::Apis::AndroiddeviceprovisioningV1::FindDevicesByDeviceIdentifierResponse::Representation
|
||||
command.response_class = Google::Apis::AndroiddeviceprovisioningV1::FindDevicesByDeviceIdentifierResponse
|
||||
command.params['partnerId'] = partner_id unless partner_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Find devices by ownership.
|
||||
# @param [Fixnum] partner_id
|
||||
# id of the partner.
|
||||
# @param [Google::Apis::AndroiddeviceprovisioningV1::FindDevicesByOwnerRequest] find_devices_by_owner_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AndroiddeviceprovisioningV1::FindDevicesByOwnerResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::FindDevicesByOwnerResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def find_partner_device_by_owner(partner_id, find_devices_by_owner_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/partners/{+partnerId}/devices:findByOwner', options)
|
||||
command.request_representation = Google::Apis::AndroiddeviceprovisioningV1::FindDevicesByOwnerRequest::Representation
|
||||
command.request_object = find_devices_by_owner_request_object
|
||||
command.response_representation = Google::Apis::AndroiddeviceprovisioningV1::FindDevicesByOwnerResponse::Representation
|
||||
command.response_class = Google::Apis::AndroiddeviceprovisioningV1::FindDevicesByOwnerResponse
|
||||
command.params['partnerId'] = partner_id unless partner_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Get a device
|
||||
# @param [String] name
|
||||
# resource name in 'partners/[PARTNER_ID]/devices/[DEVICE_ID]'.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AndroiddeviceprovisioningV1::Device] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::Device]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_partner_device(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}', options)
|
||||
command.response_representation = Google::Apis::AndroiddeviceprovisioningV1::Device::Representation
|
||||
command.response_class = Google::Apis::AndroiddeviceprovisioningV1::Device
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Update the metadata
|
||||
# @param [Fixnum] metadata_owner_id
|
||||
# The owner of the newly set metadata. Should be partner id itself.
|
||||
# @param [Fixnum] device_id
|
||||
# id of the partner.
|
||||
# @param [Google::Apis::AndroiddeviceprovisioningV1::UpdateDeviceMetadataRequest] update_device_metadata_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AndroiddeviceprovisioningV1::DeviceMetadata] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::DeviceMetadata]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def metadata_partner_device(metadata_owner_id, device_id, update_device_metadata_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/partners/{+metadataOwnerId}/devices/{+deviceId}/metadata', options)
|
||||
command.request_representation = Google::Apis::AndroiddeviceprovisioningV1::UpdateDeviceMetadataRequest::Representation
|
||||
command.request_object = update_device_metadata_request_object
|
||||
command.response_representation = Google::Apis::AndroiddeviceprovisioningV1::DeviceMetadata::Representation
|
||||
command.response_class = Google::Apis::AndroiddeviceprovisioningV1::DeviceMetadata
|
||||
command.params['metadataOwnerId'] = metadata_owner_id unless metadata_owner_id.nil?
|
||||
command.params['deviceId'] = device_id unless device_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Unclaim the device identified by device_id or identifier.
|
||||
# @param [Fixnum] partner_id
|
||||
# Id of the partner.
|
||||
# @param [Google::Apis::AndroiddeviceprovisioningV1::UnclaimDeviceRequest] unclaim_device_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AndroiddeviceprovisioningV1::Empty] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::Empty]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def unclaim_device(partner_id, unclaim_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/partners/{+partnerId}/devices:unclaim', options)
|
||||
command.request_representation = Google::Apis::AndroiddeviceprovisioningV1::UnclaimDeviceRequest::Representation
|
||||
command.request_object = unclaim_device_request_object
|
||||
command.response_representation = Google::Apis::AndroiddeviceprovisioningV1::Empty::Representation
|
||||
command.response_class = Google::Apis::AndroiddeviceprovisioningV1::Empty
|
||||
command.params['partnerId'] = partner_id unless partner_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Unclaim devices asynchronously
|
||||
# @param [Fixnum] partner_id
|
||||
# partner id.
|
||||
# @param [Google::Apis::AndroiddeviceprovisioningV1::UnclaimDevicesRequest] unclaim_devices_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AndroiddeviceprovisioningV1::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::Operation]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def unclaim_partner_device_async(partner_id, unclaim_devices_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/partners/{+partnerId}/devices:unclaimAsync', options)
|
||||
command.request_representation = Google::Apis::AndroiddeviceprovisioningV1::UnclaimDevicesRequest::Representation
|
||||
command.request_object = unclaim_devices_request_object
|
||||
command.response_representation = Google::Apis::AndroiddeviceprovisioningV1::Operation::Representation
|
||||
command.response_class = Google::Apis::AndroiddeviceprovisioningV1::Operation
|
||||
command.params['partnerId'] = partner_id unless partner_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Set metadata in batch asynchronously.
|
||||
# @param [Fixnum] partner_id
|
||||
# partner id.
|
||||
# @param [Google::Apis::AndroiddeviceprovisioningV1::UpdateDeviceMetadataInBatchRequest] update_device_metadata_in_batch_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# 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.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AndroiddeviceprovisioningV1::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AndroiddeviceprovisioningV1::Operation]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def update_partner_device_metadata_async(partner_id, update_device_metadata_in_batch_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/partners/{+partnerId}/devices:updateMetadataAsync', options)
|
||||
command.request_representation = Google::Apis::AndroiddeviceprovisioningV1::UpdateDeviceMetadataInBatchRequest::Representation
|
||||
command.request_object = update_device_metadata_in_batch_request_object
|
||||
command.response_representation = Google::Apis::AndroiddeviceprovisioningV1::Operation::Representation
|
||||
command.response_class = Google::Apis::AndroiddeviceprovisioningV1::Operation
|
||||
command.params['partnerId'] = partner_id unless partner_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user