google-api-ruby-client/generated/google/apis/androidenterprise_v1/service.rb

2765 lines
172 KiB
Ruby
Raw Normal View History

2015-06-23 23:05:46 +00:00
# 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 AndroidenterpriseV1
# Google Play EMM API
#
# Manages the deployment of apps to Android Enterprise devices.
2015-06-23 23:05:46 +00:00
#
# @example
# require 'google/apis/androidenterprise_v1'
#
# Androidenterprise = Google::Apis::AndroidenterpriseV1 # Alias the module
# service = Androidenterprise::AndroidEnterpriseService.new
#
2015-12-03 01:10:07 +00:00
# @see https://developers.google.com/android/work/play/emm-api
2015-06-23 23:05:46 +00:00
class AndroidEnterpriseService < 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.
2015-06-23 23:05:46 +00:00
attr_accessor :quota_user
def initialize
super('https://androidenterprise.googleapis.com/', '')
@batch_path = 'batch'
2015-06-23 23:05:46 +00:00
end
# Uploads a report containing any changes in app states on the device since the
# last report was generated. You can call this method up to 3 times every 24
# hours for a given device. If you exceed the quota, then the Google Play EMM
# API returns HTTP 429 Too Many Requests.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] device_id
# The ID of the device.
# @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 [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @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 force_device_report_upload(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/forceReportUpload', options)
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_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
2015-06-23 23:05:46 +00:00
# Retrieves the details of a device.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] device_id
# The ID of the device.
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::Device] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::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_device(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::Device::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::Device
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_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
# Retrieves whether a device's access to Google services is enabled or disabled.
2016-07-06 21:13:29 +00:00
# The device state takes effect only if enforcing EMM policies on Android
# devices is enabled in the Google Admin Console. Otherwise, the device state is
# ignored and all devices are allowed access to Google services. This is only
# supported for Google-managed users.
2015-06-23 23:05:46 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] device_id
# The ID of the device.
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::DeviceState] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::DeviceState]
#
# @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_device_state(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::DeviceState::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::DeviceState
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_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
# Retrieves the IDs of all of a user's devices.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ListDevicesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ListDevicesResponse]
#
# @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_devices(enterprise_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::ListDevicesResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ListDevicesResponse
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_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
# Sets whether a device's access to Google services is enabled or disabled. The
# device state takes effect only if enforcing EMM policies on Android devices is
# enabled in the Google Admin Console. Otherwise, the device state is ignored
# and all devices are allowed access to Google services. This is only supported
# for Google-managed users.
2015-06-23 23:05:46 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] device_id
# The ID of the device.
# @param [Google::Apis::AndroidenterpriseV1::DeviceState] device_state_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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::DeviceState] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::DeviceState]
#
# @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 set_device_state(enterprise_id, user_id, device_id, device_state_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state', options)
2015-06-23 23:05:46 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::DeviceState::Representation
command.request_object = device_state_object
command.response_representation = Google::Apis::AndroidenterpriseV1::DeviceState::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::DeviceState
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_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
feat: Automated regeneration of androidenterprise v1 client (#1601) This PR was generated using Autosynth. :rainbow: <details><summary>Log from Synthtool</summary> ``` 2020-11-27 01:34:42,603 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py. On branch autosynth-androidenterprise-v1 nothing to commit, working tree clean 2020-11-27 01:34:42,634 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth androidenterprise v1 DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth androidenterprise v1 bundle install Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`. Fetching gem metadata from https://rubygems.org/......... Fetching gem metadata from https://rubygems.org/. Resolving dependencies... Fetching rake 11.3.0 Installing rake 11.3.0 Fetching concurrent-ruby 1.1.7 Installing concurrent-ruby 1.1.7 Fetching i18n 1.8.5 Installing i18n 1.8.5 Fetching minitest 5.14.2 Installing minitest 5.14.2 Fetching thread_safe 0.3.6 Installing thread_safe 0.3.6 Fetching tzinfo 1.2.8 Installing tzinfo 1.2.8 Fetching activesupport 5.0.7.2 Installing activesupport 5.0.7.2 Fetching public_suffix 4.0.6 Installing public_suffix 4.0.6 Fetching addressable 2.7.0 Installing addressable 2.7.0 Fetching ast 2.4.1 Installing ast 2.4.1 Using bundler 2.1.4 Fetching byebug 11.1.3 Installing byebug 11.1.3 with native extensions Fetching coderay 1.1.3 Installing coderay 1.1.3 Fetching json 2.3.1 Installing json 2.3.1 with native extensions Fetching docile 1.3.2 Installing docile 1.3.2 Fetching simplecov-html 0.10.2 Installing simplecov-html 0.10.2 Fetching simplecov 0.16.1 Installing simplecov 0.16.1 Using sync 0.5.0 Fetching tins 1.26.0 Installing tins 1.26.0 Fetching term-ansicolor 1.7.1 Installing term-ansicolor 1.7.1 Fetching thor 0.20.3 Installing thor 0.20.3 Fetching coveralls 0.8.23 Installing coveralls 0.8.23 Fetching crack 0.4.4 Installing crack 0.4.4 Fetching declarative 0.0.20 Installing declarative 0.0.20 Fetching declarative-option 0.1.0 Installing declarative-option 0.1.0 Fetching diff-lcs 1.4.4 Installing diff-lcs 1.4.4 Fetching dotenv 2.7.6 Installing dotenv 2.7.6 Fetching fakefs 0.20.1 Installing fakefs 0.20.1 Fetching multipart-post 2.1.1 Installing multipart-post 2.1.1 Fetching ruby2_keywords 0.0.2 Installing ruby2_keywords 0.0.2 Fetching faraday 1.1.0 Installing faraday 1.1.0 Fetching gems 1.2.0 Installing gems 1.2.0 Fetching github-markup 1.7.0 Installing github-markup 1.7.0 Fetching jwt 2.2.2 Installing jwt 2.2.2 Fetching memoist 0.16.2 Installing memoist 0.16.2 Fetching multi_json 1.15.0 Installing multi_json 1.15.0 Fetching os 0.9.6 Installing os 0.9.6 Fetching signet 0.14.0 Installing signet 0.14.0 Fetching googleauth 0.14.0 Installing googleauth 0.14.0 Fetching httpclient 2.8.3 Installing httpclient 2.8.3 Fetching mini_mime 1.0.2 Installing mini_mime 1.0.2 Fetching uber 0.1.0 Installing uber 0.1.0 Fetching representable 3.0.4 Installing representable 3.0.4 Fetching retriable 3.1.2 Installing retriable 3.1.2 Fetching rexml 3.2.4 Installing rexml 3.2.4 Using google-api-client 0.50.0 from source at `.` Fetching google-id-token 1.4.2 Installing google-id-token 1.4.2 Fetching hashdiff 1.0.1 Installing hashdiff 1.0.1 Fetching mime-types-data 3.2020.1104 Installing mime-types-data 3.2020.1104 Fetching mime-types 3.3.1 Installing mime-types 3.3.1 Fetching multi_xml 0.6.0 Installing multi_xml 0.6.0 Fetching httparty 0.18.1 Installing httparty 0.18.1 Fetching rspec-support 3.10.0 Installing rspec-support 3.10.0 Fetching rspec-core 3.10.0 Installing rspec-core 3.10.0 Fetching rspec-expectations 3.10.0 Installing rspec-expectations 3.10.0 Fetching rspec-mocks 3.10.0 Installing rspec-mocks 3.10.0 Fetching rspec 3.10.0 Installing rspec 3.10.0 Fetching json_spec 1.1.5 Installing json_spec 1.1.5 Fetching launchy 2.5.0 Installing launchy 2.5.0 Fetching little-plugger 1.1.4 Installing little-plugger 1.1.4 Fetching logging 2.3.0 Installing logging 2.3.0 Fetching method_source 1.0.0 Installing method_source 1.0.0 Fetching opencensus 0.5.0 Installing opencensus 0.5.0 Fetching parallel 1.20.1 Installing parallel 1.20.1 Fetching parser 2.7.2.0 Installing parser 2.7.2.0 Fetching powerpack 0.1.3 Installing powerpack 0.1.3 Fetching pry 0.13.1 Installing pry 0.13.1 Fetching pry-byebug 3.9.0 Installing pry-byebug 3.9.0 Fetching yard 0.9.25 Installing yard 0.9.25 Fetching pry-doc 0.13.5 Installing pry-doc 0.13.5 Fetching rainbow 2.2.2 Installing rainbow 2.2.2 with native extensions Fetching redcarpet 3.5.0 Installing redcarpet 3.5.0 with native extensions Fetching redis 3.3.5 Installing redis 3.3.5 Fetching rmail 1.1.4 Installing rmail 1.1.4 Fetching ruby-progressbar 1.10.1 Installing ruby-progressbar 1.10.1 Fetching unicode-display_width 1.7.0 Installing unicode-display_width 1.7.0 Fetching rubocop 0.49.1 Installing rubocop 0.49.1 Fetching webmock 2.3.2 Installing webmock 2.3.2 Bundle complete! 31 Gemfile dependencies, 78 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. Post-install message from i18n: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. But that may break your application. If you are upgrading your Rails application from an older version of Rails: Please check your Rails app for 'config.i18n.fallbacks = true'. If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be 'config.i18n.fallbacks = [I18n.default_locale]'. If not, fallbacks will be broken in your app by I18n 1.1.x. If you are starting a NEW Rails application, you can ignore this notice. For more info see: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 Post-install message from httparty: When you HTTParty, you must party hard! echo a | bundle exec bin/generate-api gen generated --api=androidenterprise.v1 --names-out=/workspace/api_names_out.yaml Loading androidenterprise, version v1 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/androidenterprise.v1.json conflict google/apis/androidenterprise_v1.rb <identerprise_v1.rb? (enter "h" for help) [Ynaqdhm] a force google/apis/androidenterprise_v1.rb conflict google/apis/androidenterprise_v1/service.rb force google/apis/androidenterprise_v1/service.rb identical google/apis/androidenterprise_v1/classes.rb identical google/apis/androidenterprise_v1/representations.rb identical /workspace/api_names_out.yaml 2020-11-27 01:35:09,557 synthtool [DEBUG] > Wrote metadata to generated/google/apis/androidenterprise_v1/synth.metadata. DEBUG:synthtool:Wrote metadata to generated/google/apis/androidenterprise_v1/synth.metadata. ``` </details> Full log will be available here: https://source.cloud.google.com/results/invocations/cc872475-4277-4f41-a028-11509d78a5a3/targets - [ ] To automatically regenerate this PR, check this box.
2020-11-27 09:50:01 +00:00
# Updates the device policy. To ensure the policy is properly enforced, you need
# to prevent unmanaged accounts from accessing Google Play by setting the
# allowed_accounts in the managed configuration for the Google Play package. See
# restrict accounts in Google Play.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] device_id
# The ID of the device.
# @param [Google::Apis::AndroidenterpriseV1::Device] device_object
# @param [String] update_mask
# Mask that identifies which fields to update. If not set, all modifiable fields
# will be modified. When set in a query parameter, this field should be
# specified as updateMask=<field1>,<field2>,...
# @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::AndroidenterpriseV1::Device] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::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 update_device(enterprise_id, user_id, device_id, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}', options)
command.request_representation = Google::Apis::AndroidenterpriseV1::Device::Representation
command.request_object = device_object
command.response_representation = Google::Apis::AndroidenterpriseV1::Device::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::Device
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_id.nil?
command.params['deviceId'] = device_id unless device_id.nil?
command.query['updateMask'] = update_mask unless update_mask.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Acknowledges notifications that were received from Enterprises.
# PullNotificationSet to prevent subsequent calls from returning the same
# notifications.
2016-06-30 21:17:37 +00:00
# @param [String] notification_set_id
# The notification set ID as returned by Enterprises.PullNotificationSet. This
# must be provided.
2016-06-30 21:17:37 +00:00
# @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.
2016-06-30 21:17:37 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @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 acknowledge_enterprise_notification_set(notification_set_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/acknowledgeNotificationSet', options)
2016-06-30 21:17:37 +00:00
command.query['notificationSetId'] = notification_set_id unless notification_set_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
# Completes the signup flow, by specifying the Completion token and Enterprise
# token. This request must not be called multiple times for a given Enterprise
2016-06-30 21:17:37 +00:00
# Token.
# @param [String] completion_token
2016-07-06 21:13:29 +00:00
# The Completion token initially returned by GenerateSignupUrl.
2016-06-30 21:17:37 +00:00
# @param [String] enterprise_token
2016-07-06 21:13:29 +00:00
# The Enterprise token appended to the Callback URL.
2016-06-30 21:17:37 +00:00
# @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.
2016-06-30 21:17:37 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::Enterprise] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::Enterprise]
#
# @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 complete_enterprise_signup(completion_token: nil, enterprise_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/completeSignup', options)
2016-06-30 21:17:37 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::Enterprise
command.query['completionToken'] = completion_token unless completion_token.nil?
command.query['enterpriseToken'] = enterprise_token unless enterprise_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Returns a unique token to access an embeddable UI. To generate a web UI, pass
# the generated token into the managed Google Play javascript API. Each token
# may only be used to start one UI session. See the javascript API documentation
# for further information.
2016-10-12 22:52:51 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [Google::Apis::AndroidenterpriseV1::AdministratorWebTokenSpec] administrator_web_token_spec_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.
2016-10-12 22:52:51 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::AdministratorWebToken] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::AdministratorWebToken]
#
# @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 create_enterprise_web_token(enterprise_id, administrator_web_token_spec_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/createWebToken', options)
2016-10-12 22:52:51 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::AdministratorWebTokenSpec::Representation
command.request_object = administrator_web_token_spec_object
command.response_representation = Google::Apis::AndroidenterpriseV1::AdministratorWebToken::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::AdministratorWebToken
command.params['enterpriseId'] = enterprise_id unless enterprise_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
2016-02-10 21:57:13 +00:00
# Enrolls an enterprise with the calling EMM.
2015-06-23 23:05:46 +00:00
# @param [String] token
# Required. The token provided by the enterprise to register the EMM.
2015-07-31 00:05:47 +00:00
# @param [Google::Apis::AndroidenterpriseV1::Enterprise] enterprise_object
2015-06-23 23:05:46 +00:00
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::Enterprise] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::Enterprise]
#
# @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 enroll_enterprise(token, enterprise_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/enroll', options)
2015-06-23 23:05:46 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation
command.request_object = enterprise_object
command.response_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::Enterprise
command.query['token'] = token unless token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
2016-06-30 21:17:37 +00:00
# Generates a sign-up URL.
# @param [String] callback_url
# The callback URL to which the Admin will be redirected after successfully
# creating an enterprise. Before redirecting there the system will add a single
# query parameter to this URL named "enterpriseToken" which will contain an
# opaque token to be used for the CompleteSignup request. Beware that this means
# that the URL will be parsed, the parameter added and then a new URL formatted,
# i.e. there may be some minor formatting changes and, more importantly, the URL
# must be well-formed so that it can be parsed.
2016-06-30 21:17:37 +00:00
# @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.
2016-06-30 21:17:37 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::SignupInfo] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::SignupInfo]
#
# @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 generate_enterprise_signup_url(callback_url: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/signupUrl', options)
2016-06-30 21:17:37 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::SignupInfo::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::SignupInfo
command.query['callbackUrl'] = callback_url unless callback_url.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
2015-06-23 23:05:46 +00:00
# Retrieves the name and domain of an enterprise.
# @param [String] enterprise_id
# The ID of the enterprise.
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::Enterprise] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::Enterprise]
#
# @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_enterprise(enterprise_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::Enterprise
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
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
2017-08-25 19:54:22 +00:00
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Returns a service account and credentials. The service account can be bound to
# the enterprise by calling setAccount. The service account is unique to this
# enterprise and EMM, and will be deleted if the enterprise is unbound. The
# credentials contain private key data and are not stored server-side. This
# method can only be called after calling Enterprises.Enroll or Enterprises.
# CompleteSignup, and before Enterprises.SetAccount; at other times it will
# return an error. Subsequent calls after the first will generate a new, unique
# set of credentials, and invalidate the previously generated credentials. Once
# the service account is bound to the enterprise, it can be managed using the
# serviceAccountKeys resource.
2016-06-30 21:17:37 +00:00
# @param [String] enterprise_id
2016-08-08 20:25:38 +00:00
# The ID of the enterprise.
2016-06-30 21:17:37 +00:00
# @param [String] key_type
# The type of credential to return with the service account. Required.
# @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.
2016-06-30 21:17:37 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ServiceAccount] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ServiceAccount]
#
# @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_enterprise_service_account(enterprise_id, key_type: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/serviceAccount', options)
2016-06-30 21:17:37 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::ServiceAccount::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ServiceAccount
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.query['keyType'] = key_type unless key_type.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Returns the store layout for the enterprise. If the store layout has not been
# set, returns "basic" as the store layout type and no homepage.
2015-12-16 19:33:13 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @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.
2015-12-16 19:33:13 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::StoreLayout] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::StoreLayout]
#
# @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_enterprise_store_layout(enterprise_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout', options)
2015-12-16 19:33:13 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::StoreLayout::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::StoreLayout
command.params['enterpriseId'] = enterprise_id unless enterprise_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
# Looks up an enterprise by domain name. This is only supported for enterprises
# created via the Google-initiated creation flow. Lookup of the id is not needed
# for enterprises created via the EMM-initiated flow since the EMM learns the
# enterprise ID in the callback specified in the Enterprises.generateSignupUrl
# call.
2015-06-23 23:05:46 +00:00
# @param [String] domain
# Required. The exact primary domain name of the enterprise to look up.
2015-06-23 23:05:46 +00:00
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ListEnterprisesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ListEnterprisesResponse]
#
# @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_enterprises(domain, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::ListEnterprisesResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ListEnterprisesResponse
command.query['domain'] = domain unless domain.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Pulls and returns a notification set for the enterprises associated with the
# service account authenticated for the request. The notification set may be
# empty if no notification are pending. A notification set returned needs to be
# acknowledged within 20 seconds by calling Enterprises.
# AcknowledgeNotificationSet, unless the notification set is empty.
# Notifications that are not acknowledged within the 20 seconds will eventually
# be included again in the response to another PullNotificationSet request, and
# those that are never acknowledged will ultimately be deleted according to the
# Google Cloud Platform Pub/Sub system policy. Multiple requests might be
# performed concurrently to retrieve notifications, in which case the pending
# notifications (if any) will be split among each caller, if any are pending. If
# no notifications are present, an empty notification list is returned.
# Subsequent requests may return more notifications once they become available.
2016-06-30 21:17:37 +00:00
# @param [String] request_mode
# The request mode for pulling notifications. Specifying waitForNotifications
# will cause the request to block and wait until one or more notifications are
# present, or return an empty notification list if no notifications are present
# after some time. Speciying returnImmediately will cause the request to
# immediately return the pending notifications, or an empty list if no
# notifications are present. If omitted, defaults to waitForNotifications.
2016-06-30 21:17:37 +00:00
# @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.
2016-06-30 21:17:37 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::NotificationSet] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::NotificationSet]
#
# @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 pull_enterprise_notification_set(request_mode: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/pullNotificationSet', options)
2016-06-30 21:17:37 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::NotificationSet::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::NotificationSet
command.query['requestMode'] = request_mode unless request_mode.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Sends a test notification to validate the EMM integration with the Google
# Cloud Pub/Sub service for this enterprise.
2015-12-03 01:10:07 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @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.
2015-12-03 01:10:07 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::SendTestPushNotificationResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::SendTestPushNotificationResponse]
#
# @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 send_enterprise_test_push_notification(enterprise_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/sendTestPushNotification', options)
2015-12-03 01:10:07 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::SendTestPushNotificationResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::SendTestPushNotificationResponse
command.params['enterpriseId'] = enterprise_id unless enterprise_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
2017-03-10 21:11:09 +00:00
# Sets the account that will be used to authenticate to the API as the
# enterprise.
2015-06-23 23:05:46 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [Google::Apis::AndroidenterpriseV1::EnterpriseAccount] enterprise_account_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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::EnterpriseAccount] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::EnterpriseAccount]
#
# @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 set_enterprise_account(enterprise_id, enterprise_account_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/account', options)
2015-06-23 23:05:46 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::EnterpriseAccount::Representation
command.request_object = enterprise_account_object
command.response_representation = Google::Apis::AndroidenterpriseV1::EnterpriseAccount::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::EnterpriseAccount
command.params['enterpriseId'] = enterprise_id unless enterprise_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
# Sets the store layout for the enterprise. By default, storeLayoutType is set
# to "basic" and the basic store layout is enabled. The basic layout only
# contains apps approved by the admin, and that have been added to the available
# product set for a user (using the setAvailableProductSet call). Apps on the
# page are sorted in order of their product ID value. If you create a custom
# store layout (by setting storeLayoutType = "custom" and setting a homepage),
# the basic store layout is disabled.
2015-12-16 19:33:13 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [Google::Apis::AndroidenterpriseV1::StoreLayout] store_layout_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.
2015-12-16 19:33:13 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::StoreLayout] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::StoreLayout]
#
# @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 set_enterprise_store_layout(enterprise_id, store_layout_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout', options)
2015-12-16 19:33:13 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::StoreLayout::Representation
command.request_object = store_layout_object
command.response_representation = Google::Apis::AndroidenterpriseV1::StoreLayout::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::StoreLayout
command.params['enterpriseId'] = enterprise_id unless enterprise_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
2016-02-10 21:57:13 +00:00
# Unenrolls an enterprise from the calling EMM.
2015-06-23 23:05:46 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @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 unenroll_enterprise(enterprise_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/unenroll', options)
2015-06-23 23:05:46 +00:00
command.params['enterpriseId'] = enterprise_id unless enterprise_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
2017-03-10 21:11:09 +00:00
# Removes an entitlement to an app for a user.
2015-06-23 23:05:46 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] entitlement_id
# The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm".
2015-06-23 23:05:46 +00:00
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @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 delete_entitlement(enterprise_id, user_id, entitlement_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}', options)
2015-06-23 23:05:46 +00:00
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_id.nil?
command.params['entitlementId'] = entitlement_id unless entitlement_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
# Retrieves details of an entitlement.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] entitlement_id
# The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm".
2015-06-23 23:05:46 +00:00
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::Entitlement] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::Entitlement]
#
# @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_entitlement(enterprise_id, user_id, entitlement_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::Entitlement::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::Entitlement
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_id.nil?
command.params['entitlementId'] = entitlement_id unless entitlement_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
2017-03-10 21:11:09 +00:00
# Lists all entitlements for the specified user. Only the ID is set.
2015-06-23 23:05:46 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ListEntitlementsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ListEntitlementsResponse]
#
# @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_entitlements(enterprise_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::ListEntitlementsResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ListEntitlementsResponse
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_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
# Adds or updates an entitlement to an app for a user.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] entitlement_id
# The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm".
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::AndroidenterpriseV1::Entitlement] entitlement_object
# @param [Boolean] install
# Set to true to also install the product on all the user's devices where
# possible. Failure to install on one or more devices will not prevent this
# operation from returning successfully, as long as the entitlement was
# successfully assigned to the user.
2015-06-23 23:05:46 +00:00
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::Entitlement] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::Entitlement]
#
# @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_entitlement(enterprise_id, user_id, entitlement_id, entitlement_object = nil, install: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}', options)
2015-06-23 23:05:46 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::Entitlement::Representation
command.request_object = entitlement_object
command.response_representation = Google::Apis::AndroidenterpriseV1::Entitlement::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::Entitlement
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_id.nil?
command.params['entitlementId'] = entitlement_id unless entitlement_id.nil?
command.query['install'] = install unless install.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves details of an enterprise's group license for a product.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] group_license_id
# The ID of the product the group license is for, e.g. "app:com.google.android.
# gm".
2015-06-23 23:05:46 +00:00
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::GroupLicense] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::GroupLicense]
#
# @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_group_license(enterprise_id, group_license_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/groupLicenses/{groupLicenseId}', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::GroupLicense::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::GroupLicense
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['groupLicenseId'] = group_license_id unless group_license_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
# Retrieves IDs of all products for which the enterprise has a group license.
# @param [String] enterprise_id
# The ID of the enterprise.
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ListGroupLicensesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ListGroupLicensesResponse]
#
# @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_group_licenses(enterprise_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/groupLicenses', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::ListGroupLicensesResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ListGroupLicensesResponse
command.params['enterpriseId'] = enterprise_id unless enterprise_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
# Retrieves the IDs of the users who have been granted entitlements under the
# license.
2015-06-23 23:05:46 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] group_license_id
# The ID of the product the group license is for, e.g. "app:com.google.android.
# gm".
2015-06-23 23:05:46 +00:00
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ListGroupLicenseUsersResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ListGroupLicenseUsersResponse]
#
# @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_group_license_users(enterprise_id, group_license_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/groupLicenses/{groupLicenseId}/users', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::ListGroupLicenseUsersResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ListGroupLicenseUsersResponse
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['groupLicenseId'] = group_license_id unless group_license_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
# Requests to remove an app from a device. A call to get or list will still show
# the app as installed on the device until it is actually removed.
2015-06-23 23:05:46 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] device_id
# The Android ID of the device.
# @param [String] install_id
# The ID of the product represented by the install, e.g. "app:com.google.android.
# gm".
2015-06-23 23:05:46 +00:00
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @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 delete_install(enterprise_id, user_id, device_id, install_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}', options)
2015-06-23 23:05:46 +00:00
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_id.nil?
command.params['deviceId'] = device_id unless device_id.nil?
command.params['installId'] = install_id unless install_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
# Retrieves details of an installation of an app on a device.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] device_id
# The Android ID of the device.
# @param [String] install_id
# The ID of the product represented by the install, e.g. "app:com.google.android.
# gm".
2015-06-23 23:05:46 +00:00
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::Install] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::Install]
#
# @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_install(enterprise_id, user_id, device_id, install_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::Install::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::Install
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_id.nil?
command.params['deviceId'] = device_id unless device_id.nil?
command.params['installId'] = install_id unless install_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
# Retrieves the details of all apps installed on the specified device.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] device_id
# The Android ID of the device.
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ListInstallsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ListInstallsResponse]
#
# @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_installs(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::ListInstallsResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ListInstallsResponse
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_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
# Requests to install the latest version of an app to a device. If the app is
# already installed, then it is updated to the latest version if necessary.
2015-06-23 23:05:46 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] device_id
# The Android ID of the device.
# @param [String] install_id
# The ID of the product represented by the install, e.g. "app:com.google.android.
# gm".
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::AndroidenterpriseV1::Install] install_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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::Install] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::Install]
#
# @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_install(enterprise_id, user_id, device_id, install_id, install_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}', options)
2015-06-23 23:05:46 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::Install::Representation
command.request_object = install_object
command.response_representation = Google::Apis::AndroidenterpriseV1::Install::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::Install
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_id.nil?
command.params['deviceId'] = device_id unless device_id.nil?
command.params['installId'] = install_id unless install_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
# Removes a per-device managed configuration for an app for the specified device.
2016-08-08 20:25:38 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] device_id
# The Android ID of the device.
# @param [String] managed_configuration_for_device_id
# The ID of the managed configuration (a product ID), e.g. "app:com.google.
# android.gm".
2016-08-08 20:25:38 +00:00
# @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.
2016-08-08 20:25:38 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @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 delete_managedconfigurationsfordevice(enterprise_id, user_id, device_id, managed_configuration_for_device_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}', options)
2016-08-08 20:25:38 +00:00
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_id.nil?
command.params['deviceId'] = device_id unless device_id.nil?
command.params['managedConfigurationForDeviceId'] = managed_configuration_for_device_id unless managed_configuration_for_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
# Retrieves details of a per-device managed configuration.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] device_id
# The Android ID of the device.
# @param [String] managed_configuration_for_device_id
# The ID of the managed configuration (a product ID), e.g. "app:com.google.
# android.gm".
2016-08-08 20:25:38 +00:00
# @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.
2016-08-08 20:25:38 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ManagedConfiguration]
#
# @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_managedconfigurationsfordevice(enterprise_id, user_id, device_id, managed_configuration_for_device_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}', options)
2016-08-08 20:25:38 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfiguration
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_id.nil?
command.params['deviceId'] = device_id unless device_id.nil?
command.params['managedConfigurationForDeviceId'] = managed_configuration_for_device_id unless managed_configuration_for_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
# Lists all the per-device managed configurations for the specified device. Only
# the ID is set.
2016-08-08 20:25:38 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] device_id
# The Android ID of the device.
# @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.
2016-08-08 20:25:38 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForDeviceListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForDeviceListResponse]
#
# @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_managedconfigurationsfordevices(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice', options)
2016-08-08 20:25:38 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForDeviceListResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForDeviceListResponse
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_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
# Adds or updates a per-device managed configuration for an app for the
# specified device.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] device_id
# The Android ID of the device.
# @param [String] managed_configuration_for_device_id
# The ID of the managed configuration (a product ID), e.g. "app:com.google.
# android.gm".
2016-08-08 20:25:38 +00:00
# @param [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] managed_configuration_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.
2016-08-08 20:25:38 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ManagedConfiguration]
#
# @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_managedconfigurationsfordevice(enterprise_id, user_id, device_id, managed_configuration_for_device_id, managed_configuration_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}', options)
2016-08-08 20:25:38 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
command.request_object = managed_configuration_object
command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfiguration
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_id.nil?
command.params['deviceId'] = device_id unless device_id.nil?
command.params['managedConfigurationForDeviceId'] = managed_configuration_for_device_id unless managed_configuration_for_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
# Removes a per-user managed configuration for an app for the specified user.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] managed_configuration_for_user_id
# The ID of the managed configuration (a product ID), e.g. "app:com.google.
# android.gm".
2016-08-08 20:25:38 +00:00
# @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.
2016-08-08 20:25:38 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @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 delete_managedconfigurationsforuser(enterprise_id, user_id, managed_configuration_for_user_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}', options)
2016-08-08 20:25:38 +00:00
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_id.nil?
command.params['managedConfigurationForUserId'] = managed_configuration_for_user_id unless managed_configuration_for_user_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
# Retrieves details of a per-user managed configuration for an app for the
# specified user.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] managed_configuration_for_user_id
# The ID of the managed configuration (a product ID), e.g. "app:com.google.
# android.gm".
2016-08-08 20:25:38 +00:00
# @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.
2016-08-08 20:25:38 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ManagedConfiguration]
#
# @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_managedconfigurationsforuser(enterprise_id, user_id, managed_configuration_for_user_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}', options)
2016-08-08 20:25:38 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfiguration
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_id.nil?
command.params['managedConfigurationForUserId'] = managed_configuration_for_user_id unless managed_configuration_for_user_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
# Lists all the per-user managed configurations for the specified user. Only the
# ID is set.
2016-08-08 20:25:38 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @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.
2016-08-08 20:25:38 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForUserListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForUserListResponse]
#
# @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_managedconfigurationsforusers(enterprise_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser', options)
2016-08-08 20:25:38 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForUserListResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForUserListResponse
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_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
# Adds or updates the managed configuration settings for an app for the
# specified user. If you support the Managed configurations iframe, you can
# apply managed configurations to a user by specifying an mcmId and its
# associated configuration variables (if any) in the request. Alternatively, all
# EMMs can apply managed configurations by passing a list of managed properties.
2016-08-08 20:25:38 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [String] managed_configuration_for_user_id
# The ID of the managed configuration (a product ID), e.g. "app:com.google.
# android.gm".
2016-08-08 20:25:38 +00:00
# @param [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] managed_configuration_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.
2016-08-08 20:25:38 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ManagedConfiguration]
#
# @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_managedconfigurationsforuser(enterprise_id, user_id, managed_configuration_for_user_id, managed_configuration_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}', options)
2016-08-08 20:25:38 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
command.request_object = managed_configuration_object
command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfiguration
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_id.nil?
command.params['managedConfigurationForUserId'] = managed_configuration_for_user_id unless managed_configuration_for_user_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
# Lists all the managed configurations settings for the specified app.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] product_id
# The ID of the product for which the managed configurations settings applies to.
# @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::AndroidenterpriseV1::ManagedConfigurationsSettingsListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ManagedConfigurationsSettingsListResponse]
#
# @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_managedconfigurationssettings(enterprise_id, product_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/managedConfigurationsSettings', options)
command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfigurationsSettingsListResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfigurationsSettingsListResponse
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['productId'] = product_id unless product_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
2015-06-23 23:05:46 +00:00
# Retrieves details of an Android app permission for display to an enterprise
# admin.
# @param [String] permission_id
# The ID of the permission.
# @param [String] language
# The BCP47 tag for the user's preferred language (e.g. "en-US", "de")
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::Permission] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::Permission]
#
# @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_permission(permission_id, language: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/permissions/{permissionId}', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::Permission::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::Permission
command.params['permissionId'] = permission_id unless permission_id.nil?
command.query['language'] = language unless language.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Approves the specified product and the relevant app permissions, if any. The
# maximum number of products that you can approve per enterprise customer is 1,
# 000. To learn how to use managed Google Play to design and create a store
# layout to display approved products to your users, see Store Layout Design.
2015-06-23 23:05:46 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] product_id
# The ID of the product.
# @param [Google::Apis::AndroidenterpriseV1::ApproveProductRequest] approve_product_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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @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 approve_product(enterprise_id, product_id, approve_product_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/approve', options)
2015-06-23 23:05:46 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::ApproveProductRequest::Representation
command.request_object = approve_product_request_object
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['productId'] = product_id unless product_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
# Generates a URL that can be rendered in an iframe to display the permissions (
# if any) of a product. An enterprise admin must view these permissions and
# accept them on behalf of their organization in order to approve that product.
# Admins should accept the displayed permissions by interacting with a separate
# UI element in the EMM console, which in turn should trigger the use of this
# URL as the approvalUrlInfo.approvalUrl property in a Products.approve call to
# approve the product. This URL can only be used to display permissions for up
# to 1 day.
2015-06-23 23:05:46 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] product_id
# The ID of the product.
# @param [String] language_code
# The BCP 47 language code used for permission names and descriptions in the
# returned iframe, for instance "en-US".
2015-06-23 23:05:46 +00:00
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse]
#
# @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 generate_product_approval_url(enterprise_id, product_id, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/generateApprovalUrl', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['productId'] = product_id unless product_id.nil?
command.query['languageCode'] = language_code unless language_code.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves details of a product for display to an enterprise admin.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] product_id
# The ID of the product, e.g. "app:com.google.android.gm".
# @param [String] language
# The BCP47 tag for the user's preferred language (e.g. "en-US", "de").
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::Product] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::Product]
#
# @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_product(enterprise_id, product_id, language: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::Product::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::Product
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['productId'] = product_id unless product_id.nil?
command.query['language'] = language unless language.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves the schema that defines the configurable properties for this product.
# All products have a schema, but this schema may be empty if no managed
# configurations have been defined. This schema can be used to populate a UI
# that allows an admin to configure the product. To apply a managed
# configuration based on the schema obtained using this API, see Managed
# Configurations through Play.
2015-06-23 23:05:46 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] product_id
# The ID of the product.
# @param [String] language
# The BCP47 tag for the user's preferred language (e.g. "en-US", "de").
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema]
#
# @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_product_app_restrictions_schema(enterprise_id, product_id, language: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/appRestrictionsSchema', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['productId'] = product_id unless product_id.nil?
command.query['language'] = language unless language.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves the Android app permissions required by this app.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] product_id
# The ID of the product.
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ProductPermissions] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ProductPermissions]
#
# @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_product_permissions(enterprise_id, product_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/permissions', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::ProductPermissions::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ProductPermissions
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['productId'] = product_id unless product_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
# Finds approved products that match a query, or all approved products if there
# is no query.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [Boolean] approved
# Specifies whether to search among all products (false) or among only products
# that have been approved (true). Only "true" is supported, and should be
# specified.
# @param [String] language
# The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). Results
# are returned in the language best matching the preferred language.
# @param [Fixnum] max_results
# Defines how many results the list operation should return. The default number
# depends on the resource collection.
# @param [String] query
# The search query as typed in the Google Play store search box. If omitted, all
# approved apps will be returned (using the pagination parameters), including
# apps that are not available in the store (e.g. unpublished apps).
# @param [String] token
# Defines the token of the page to return, usually taken from TokenPagination.
# This can only be used if token paging is enabled.
# @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::AndroidenterpriseV1::ProductsListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ProductsListResponse]
#
# @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_products(enterprise_id, approved: nil, language: nil, max_results: nil, query: nil, token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/products', options)
command.response_representation = Google::Apis::AndroidenterpriseV1::ProductsListResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ProductsListResponse
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.query['approved'] = approved unless approved.nil?
command.query['language'] = language unless language.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['query'] = query unless query.nil?
command.query['token'] = token unless token.nil?
2016-07-06 21:13:29 +00:00
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Unapproves the specified product (and the relevant app permissions, if any)
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] product_id
# The ID of the product.
# @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.
2016-07-06 21:13:29 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @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 unapprove_product(enterprise_id, product_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/unapprove', options)
2016-07-06 21:13:29 +00:00
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['productId'] = product_id unless product_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
2015-06-23 23:05:46 +00:00
end
2016-06-30 21:17:37 +00:00
# Removes and invalidates the specified credentials for the service account
# associated with this enterprise. The calling service account must have been
# retrieved by calling Enterprises.GetServiceAccount and must have been set as
# the enterprise service account by calling Enterprises.SetAccount.
2016-06-30 21:17:37 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] key_id
# The ID of the key.
# @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.
2016-06-30 21:17:37 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @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 delete_serviceaccountkey(enterprise_id, key_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/serviceAccountKeys/{keyId}', options)
2016-06-30 21:17:37 +00:00
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['keyId'] = key_id unless key_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
# Generates new credentials for the service account associated with this
# enterprise. The calling service account must have been retrieved by calling
# Enterprises.GetServiceAccount and must have been set as the enterprise service
# account by calling Enterprises.SetAccount. Only the type of the key should be
# populated in the resource to be inserted.
2016-06-30 21:17:37 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [Google::Apis::AndroidenterpriseV1::ServiceAccountKey] service_account_key_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.
2016-06-30 21:17:37 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ServiceAccountKey] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ServiceAccountKey]
#
# @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 insert_serviceaccountkey(enterprise_id, service_account_key_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/serviceAccountKeys', options)
2016-06-30 21:17:37 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::ServiceAccountKey::Representation
command.request_object = service_account_key_object
command.response_representation = Google::Apis::AndroidenterpriseV1::ServiceAccountKey::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ServiceAccountKey
command.params['enterpriseId'] = enterprise_id unless enterprise_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
# Lists all active credentials for the service account associated with this
# enterprise. Only the ID and key type are returned. The calling service account
# must have been retrieved by calling Enterprises.GetServiceAccount and must
# have been set as the enterprise service account by calling Enterprises.
# SetAccount.
2016-06-30 21:17:37 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @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.
2016-06-30 21:17:37 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ServiceAccountKeysListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ServiceAccountKeysListResponse]
#
# @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_serviceaccountkeys(enterprise_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/serviceAccountKeys', options)
2016-06-30 21:17:37 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::ServiceAccountKeysListResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ServiceAccountKeysListResponse
command.params['enterpriseId'] = enterprise_id unless enterprise_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
2015-12-16 19:33:13 +00:00
# Deletes a cluster.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] page_id
# The ID of the page.
# @param [String] cluster_id
# The ID of the cluster.
# @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.
2015-12-16 19:33:13 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @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 delete_storelayoutcluster(enterprise_id, page_id, cluster_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters/{clusterId}', options)
2015-12-16 19:33:13 +00:00
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['pageId'] = page_id unless page_id.nil?
command.params['clusterId'] = cluster_id unless cluster_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
# Retrieves details of a cluster.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] page_id
# The ID of the page.
# @param [String] cluster_id
# The ID of the cluster.
# @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.
2015-12-16 19:33:13 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::StoreCluster] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::StoreCluster]
#
# @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_storelayoutcluster(enterprise_id, page_id, cluster_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters/{clusterId}', options)
2015-12-16 19:33:13 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::StoreCluster::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::StoreCluster
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['pageId'] = page_id unless page_id.nil?
command.params['clusterId'] = cluster_id unless cluster_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
# Inserts a new cluster in a page.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] page_id
# The ID of the page.
# @param [Google::Apis::AndroidenterpriseV1::StoreCluster] store_cluster_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.
2015-12-16 19:33:13 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::StoreCluster] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::StoreCluster]
#
# @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 insert_storelayoutcluster(enterprise_id, page_id, store_cluster_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters', options)
2015-12-16 19:33:13 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::StoreCluster::Representation
command.request_object = store_cluster_object
command.response_representation = Google::Apis::AndroidenterpriseV1::StoreCluster::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::StoreCluster
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['pageId'] = page_id unless page_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
# Retrieves the details of all clusters on the specified page.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] page_id
# The ID of the page.
# @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.
2015-12-16 19:33:13 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::StoreLayoutClustersListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::StoreLayoutClustersListResponse]
#
# @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_storelayoutclusters(enterprise_id, page_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters', options)
2015-12-16 19:33:13 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::StoreLayoutClustersListResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::StoreLayoutClustersListResponse
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['pageId'] = page_id unless page_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
# Updates a cluster.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] page_id
# The ID of the page.
# @param [String] cluster_id
# The ID of the cluster.
# @param [Google::Apis::AndroidenterpriseV1::StoreCluster] store_cluster_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.
2015-12-16 19:33:13 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::StoreCluster] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::StoreCluster]
#
# @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_storelayoutcluster(enterprise_id, page_id, cluster_id, store_cluster_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters/{clusterId}', options)
2015-12-16 19:33:13 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::StoreCluster::Representation
command.request_object = store_cluster_object
command.response_representation = Google::Apis::AndroidenterpriseV1::StoreCluster::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::StoreCluster
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['pageId'] = page_id unless page_id.nil?
command.params['clusterId'] = cluster_id unless cluster_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
# Deletes a store page.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] page_id
# The ID of the page.
# @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.
2015-12-16 19:33:13 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @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 delete_storelayoutpage(enterprise_id, page_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}', options)
2015-12-16 19:33:13 +00:00
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['pageId'] = page_id unless page_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
# Retrieves details of a store page.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] page_id
# The ID of the page.
# @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.
2015-12-16 19:33:13 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::StorePage] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::StorePage]
#
# @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_storelayoutpage(enterprise_id, page_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}', options)
2015-12-16 19:33:13 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::StorePage::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::StorePage
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['pageId'] = page_id unless page_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
# Inserts a new store page.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [Google::Apis::AndroidenterpriseV1::StorePage] store_page_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.
2015-12-16 19:33:13 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::StorePage] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::StorePage]
#
# @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 insert_storelayoutpage(enterprise_id, store_page_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages', options)
2015-12-16 19:33:13 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::StorePage::Representation
command.request_object = store_page_object
command.response_representation = Google::Apis::AndroidenterpriseV1::StorePage::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::StorePage
command.params['enterpriseId'] = enterprise_id unless enterprise_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
# Retrieves the details of all pages in the store.
# @param [String] enterprise_id
# The ID of the enterprise.
# @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.
2015-12-16 19:33:13 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::StoreLayoutPagesListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::StoreLayoutPagesListResponse]
#
# @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_storelayoutpages(enterprise_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages', options)
2015-12-16 19:33:13 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::StoreLayoutPagesListResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::StoreLayoutPagesListResponse
command.params['enterpriseId'] = enterprise_id unless enterprise_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
# Updates the content of a store page.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] page_id
# The ID of the page.
# @param [Google::Apis::AndroidenterpriseV1::StorePage] store_page_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.
2015-12-16 19:33:13 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::StorePage] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::StorePage]
#
# @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_storelayoutpage(enterprise_id, page_id, store_page_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}', options)
2015-12-16 19:33:13 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::StorePage::Representation
command.request_object = store_page_object
command.response_representation = Google::Apis::AndroidenterpriseV1::StorePage::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::StorePage
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['pageId'] = page_id unless page_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
2016-06-30 21:17:37 +00:00
# Deleted an EMM-managed user.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @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.
2016-06-30 21:17:37 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @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 delete_user(enterprise_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}', options)
2016-06-30 21:17:37 +00:00
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_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
# Generates an authentication token which the device policy client can use to
# provision the given EMM-managed user account on a device. The generated token
# is single-use and expires after a few minutes. You can provision a maximum of
# 10 devices per user. This call only works with EMM-managed accounts.
2016-06-30 21:17:37 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @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.
2016-06-30 21:17:37 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::AuthenticationToken] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::AuthenticationToken]
#
# @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 generate_user_authentication_token(enterprise_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/authenticationToken', options)
2016-06-30 21:17:37 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::AuthenticationToken::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::AuthenticationToken
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
2015-06-23 23:05:46 +00:00
execute_or_queue_command(command, &block)
end
# Retrieves a user's details.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::User]
#
# @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_user(enterprise_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::User
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_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
2015-12-03 01:10:07 +00:00
# Retrieves the set of products a user is entitled to access.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @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.
2015-12-03 01:10:07 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ProductSet] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ProductSet]
#
# @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_user_available_product_set(enterprise_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/availableProductSet', options)
2015-12-03 01:10:07 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::ProductSet::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ProductSet
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_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
# Creates a new EMM-managed user. The Users resource passed in the body of the
# request should include an accountIdentifier and an accountType. If a
# corresponding user already exists with the same account identifier, the user
# will be updated with the resource. In this case only the displayName field can
# be changed.
2016-06-30 21:17:37 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [Google::Apis::AndroidenterpriseV1::User] user_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.
2016-06-30 21:17:37 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::User]
#
# @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 insert_user(enterprise_id, user_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/users', options)
2016-06-30 21:17:37 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::User::Representation
command.request_object = user_object
command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::User
command.params['enterpriseId'] = enterprise_id unless enterprise_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
# Looks up a user by primary email address. This is only supported for Google-
# managed users. Lookup of the id is not needed for EMM-managed users because
# the id is already returned in the result of the Users.insert call.
2015-06-23 23:05:46 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] email
# Required. The exact primary email address of the user to look up.
2015-06-23 23:05:46 +00:00
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ListUsersResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ListUsersResponse]
#
# @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_users(enterprise_id, email, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::AndroidenterpriseV1::ListUsersResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ListUsersResponse
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.query['email'] = email unless email.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Revokes access to all devices currently provisioned to the user. The user will
# no longer be able to use the managed Play store on any of their managed
# devices. This call only works with EMM-managed accounts.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @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.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @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 revoke_user_device_access(enterprise_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/deviceAccess', options)
2015-12-03 01:10:07 +00:00
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_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
# Modifies the set of products that a user is entitled to access (referred to as
# *whitelisted* products). Only products that are approved or products that were
# previously approved (products with revoked approval) can be whitelisted.
2015-12-03 01:10:07 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [Google::Apis::AndroidenterpriseV1::ProductSet] product_set_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.
2015-12-03 01:10:07 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::ProductSet] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::ProductSet]
#
# @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 set_user_available_product_set(enterprise_id, user_id, product_set_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/availableProductSet', options)
2015-12-03 01:10:07 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::ProductSet::Representation
command.request_object = product_set_object
command.response_representation = Google::Apis::AndroidenterpriseV1::ProductSet::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::ProductSet
2015-06-23 23:05:46 +00:00
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_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
2016-06-30 21:17:37 +00:00
# Updates the details of an EMM-managed user. Can be used with EMM-managed users
# only (not Google managed users). Pass the new details in the Users resource in
# the request body. Only the displayName field can be changed. Other fields must
# either be unset or have the currently active value.
2016-06-30 21:17:37 +00:00
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] user_id
# The ID of the user.
# @param [Google::Apis::AndroidenterpriseV1::User] user_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.
2016-06-30 21:17:37 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::User]
#
# @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_user(enterprise_id, user_id, user_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}', options)
2016-06-30 21:17:37 +00:00
command.request_representation = Google::Apis::AndroidenterpriseV1::User::Representation
command.request_object = user_object
command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::User
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['userId'] = user_id unless user_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
# Deletes an existing web app.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] web_app_id
# The ID of the web app.
# @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 [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @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 delete_webapp(enterprise_id, web_app_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/webApps/{webAppId}', options)
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['webAppId'] = web_app_id unless web_app_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
# Gets an existing web app.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] web_app_id
# The ID of the web app.
# @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::AndroidenterpriseV1::WebApp] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::WebApp]
#
# @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_webapp(enterprise_id, web_app_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/webApps/{webAppId}', options)
command.response_representation = Google::Apis::AndroidenterpriseV1::WebApp::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::WebApp
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['webAppId'] = web_app_id unless web_app_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
# Creates a new web app for the enterprise.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [Google::Apis::AndroidenterpriseV1::WebApp] web_app_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::AndroidenterpriseV1::WebApp] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::WebApp]
#
# @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 insert_webapp(enterprise_id, web_app_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/webApps', options)
command.request_representation = Google::Apis::AndroidenterpriseV1::WebApp::Representation
command.request_object = web_app_object
command.response_representation = Google::Apis::AndroidenterpriseV1::WebApp::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::WebApp
command.params['enterpriseId'] = enterprise_id unless enterprise_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
# Retrieves the details of all web apps for a given enterprise.
# @param [String] enterprise_id
# The ID of the enterprise.
# @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::AndroidenterpriseV1::WebAppsListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::WebAppsListResponse]
#
# @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_webapps(enterprise_id, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/webApps', options)
command.response_representation = Google::Apis::AndroidenterpriseV1::WebAppsListResponse::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::WebAppsListResponse
command.params['enterpriseId'] = enterprise_id unless enterprise_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
# Updates an existing web app.
# @param [String] enterprise_id
# The ID of the enterprise.
# @param [String] web_app_id
# The ID of the web app.
# @param [Google::Apis::AndroidenterpriseV1::WebApp] web_app_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::AndroidenterpriseV1::WebApp] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AndroidenterpriseV1::WebApp]
#
# @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_webapp(enterprise_id, web_app_id, web_app_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/webApps/{webAppId}', options)
command.request_representation = Google::Apis::AndroidenterpriseV1::WebApp::Representation
command.request_object = web_app_object
command.response_representation = Google::Apis::AndroidenterpriseV1::WebApp::Representation
command.response_class = Google::Apis::AndroidenterpriseV1::WebApp
command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
command.params['webAppId'] = web_app_id unless web_app_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
2015-06-23 23:05:46 +00:00
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