# Copyright 2020 Google LLC
#
# 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.
      #
      # @example
      #    require 'google/apis/androidenterprise_v1'
      #
      #    Androidenterprise = Google::Apis::AndroidenterpriseV1 # Alias the module
      #    service = Androidenterprise::AndroidEnterpriseService.new
      #
      # @see https://developers.google.com/android/work/play/emm-api
      class AndroidEnterpriseService < Google::Apis::Core::BaseService
        DEFAULT_ENDPOINT_TEMPLATE = "https://androidenterprise.$UNIVERSE_DOMAIN$/"

        # @return [String]
        #  API key. Your API key identifies your project and provides you with API access,
        #  quota, and reports. Required unless you provide an OAuth 2.0 token.
        attr_accessor :key

        # @return [String]
        #  Available to use for quota purposes for server-side applications. Can be any
        #  arbitrary string assigned to a user, but should not exceed 40 characters.
        attr_accessor :quota_user

        def initialize
          super(DEFAULT_ENDPOINT_TEMPLATE, '',
                client_name: 'google-apis-androidenterprise_v1',
                client_version: Google::Apis::AndroidenterpriseV1::GEM_VERSION)
          @batch_path = 'batch'
        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
        
        # 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.
        # @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)
          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.
        # 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.
        # @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 [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)
          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.
        # @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)
          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.
        # @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.
        # @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)
          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
        
        # 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. When provisioning a new device, you should
        # set the device policy using this method before adding the managed Google Play
        # Account to the device, otherwise the policy will not be applied for a short
        # period of time after adding the account to the 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 [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
        
        # Returns a token for device enrollment. The DPC can encode this token within
        # the QR/NFC/zero-touch enrollment payload or fetch it before calling the on-
        # device API to authenticate the user. The token can be generated for each
        # device or reused across multiple devices.
        # @param [String] enterprise_id
        #   Required. The ID of the enterprise.
        # @param [Google::Apis::AndroidenterpriseV1::EnrollmentToken] enrollment_token_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::EnrollmentToken] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AndroidenterpriseV1::EnrollmentToken]
        #
        # @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_enrollment_token(enterprise_id, enrollment_token_object = nil, fields: nil, quota_user: nil, options: nil, &block)
          command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/enrollmentTokens', options)
          command.request_representation = Google::Apis::AndroidenterpriseV1::EnrollmentToken::Representation
          command.request_object = enrollment_token_object
          command.response_representation = Google::Apis::AndroidenterpriseV1::EnrollmentToken::Representation
          command.response_class = Google::Apis::AndroidenterpriseV1::EnrollmentToken
          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
        
        # Acknowledges notifications that were received from Enterprises.
        # PullNotificationSet to prevent subsequent calls from returning the same
        # notifications.
        # @param [String] notification_set_id
        #   The notification set ID as returned by Enterprises.PullNotificationSet. This
        #   must be provided.
        # @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 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)
          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
        # Token.
        # @param [String] completion_token
        #   The Completion token initially returned by GenerateSignupUrl.
        # @param [String] enterprise_token
        #   The Enterprise token appended to the Callback URL.
        # @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::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)
          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.
        # @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.
        # @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)
          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
        
        # Enrolls an enterprise with the calling EMM.
        # @param [String] token
        #   Required. The token provided by the enterprise to register the EMM.
        # @param [Google::Apis::AndroidenterpriseV1::Enterprise] enterprise_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::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)
          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
        
        # Generates an enterprise upgrade URL to upgrade an existing managed Google Play
        # Accounts enterprise to a managed Google domain. See the guide to upgrading an
        # enterprise for more details.
        # @param [String] enterprise_id
        #   Required. The ID of the enterprise.
        # @param [String] admin_email
        #   Optional. Email address used to prefill the admin field of the enterprise
        #   signup form as part of the upgrade process. This value is a hint only and can
        #   be altered by the user. Personal email addresses are not allowed. If `
        #   allowedDomains` is non-empty then this must belong to one of the `
        #   allowedDomains`.
        # @param [Array<String>, String] allowed_domains
        #   Optional. A list of domains that are permitted for the admin email. The IT
        #   admin cannot enter an email address with a domain name that is not in this
        #   list. Subdomains of domains in this list are not allowed but can be allowed by
        #   adding a second entry which has `*.` prefixed to the domain name (e.g. *.
        #   example.com). If the field is not present or is an empty list then the IT
        #   admin is free to use any valid domain name. Personal email domains are not
        #   allowed.
        # @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::GenerateEnterpriseUpgradeUrlResponse] parsed result object
        # @yieldparam err [StandardError] error object if request failed
        #
        # @return [Google::Apis::AndroidenterpriseV1::GenerateEnterpriseUpgradeUrlResponse]
        #
        # @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_enterprise_upgrade_url(enterprise_id, admin_email: nil, allowed_domains: nil, fields: nil, quota_user: nil, options: nil, &block)
          command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/generateEnterpriseUpgradeUrl', options)
          command.response_representation = Google::Apis::AndroidenterpriseV1::GenerateEnterpriseUpgradeUrlResponse::Representation
          command.response_class = Google::Apis::AndroidenterpriseV1::GenerateEnterpriseUpgradeUrlResponse
          command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
          command.query['adminEmail'] = admin_email unless admin_email.nil?
          command.query['allowedDomains'] = allowed_domains unless allowed_domains.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 sign-up URL.
        # @param [String] admin_email
        #   Optional. Email address used to prefill the admin field of the enterprise
        #   signup form. This value is a hint only and can be altered by the user. If `
        #   allowedDomains` is non-empty then this must belong to one of the `
        #   allowedDomains`.
        # @param [Array<String>, String] allowed_domains
        #   Optional. A list of domains that are permitted for the admin email. The IT
        #   admin cannot enter an email address with a domain name that is not in this
        #   list. Subdomains of domains in this list are not allowed but can be allowed by
        #   adding a second entry which has `*.` prefixed to the domain name (e.g. *.
        #   example.com). If the field is not present or is an empty list then the IT
        #   admin is free to use any valid domain name. Personal email domains are always
        #   allowed, but will result in the creation of a managed Google Play Accounts
        #   enterprise.
        # @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.
        # @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::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(admin_email: nil, allowed_domains: nil, callback_url: nil, fields: nil, quota_user: nil, options: nil, &block)
          command = make_simple_command(:post, 'androidenterprise/v1/enterprises/signupUrl', options)
          command.response_representation = Google::Apis::AndroidenterpriseV1::SignupInfo::Representation
          command.response_class = Google::Apis::AndroidenterpriseV1::SignupInfo
          command.query['adminEmail'] = admin_email unless admin_email.nil?
          command.query['allowedDomains'] = allowed_domains unless allowed_domains.nil?
          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
        
        # 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.
        # @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)
          command.response_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation
          command.response_class = Google::Apis::AndroidenterpriseV1::Enterprise
          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
        
        # 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. *Note:* After you create a key, you might need to
        # wait for 60 seconds or more before you perform another operation with the key.
        # If you try to perform an operation with the key immediately after you create
        # the key, and you receive an error, you can retry the request with exponential
        # backoff .
        # @param [String] enterprise_id
        #   The ID of the enterprise.
        # @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.
        # @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)
          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.
        # @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::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)
          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.
        # @param [String] domain
        #   Required. The exact primary domain name of the enterprise to look up.
        # @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::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)
          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.
        # @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. Specifying 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.
        # @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::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)
          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.
        # @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::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)
          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
        
        # Sets the account that will be used to authenticate to the API as the
        # enterprise.
        # @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.
        # @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)
          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.
        # @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.
        # @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)
          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
        
        # Unenrolls an enterprise from the calling EMM.
        # @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 [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)
          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
        
        # Removes an entitlement to an app for a user. **Note:** This item has been
        # deprecated. New integrations cannot use this method and can refer to our new
        # recommendations.
        # @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".
        # @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_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)
          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. **Note:** This item has been deprecated.
        # New integrations cannot use this method and can refer to our new
        # recommendations.
        # @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".
        # @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::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)
          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
        
        # Lists all entitlements for the specified user. Only the ID is set. **Note:**
        # This item has been deprecated. New integrations cannot use this method and can
        # refer to our new recommendations.
        # @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.
        # @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)
          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. **Note:** This item has
        # been deprecated. New integrations cannot use this method and can refer to our
        # new recommendations.
        # @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".
        # @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.
        # @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::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)
          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. **Note:**
        # This item has been deprecated. New integrations cannot use this method and can
        # refer to our new recommendations.
        # @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".
        # @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::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)
          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. **
        # Note:** This item has been deprecated. New integrations cannot use this method
        # and can refer to our new recommendations.
        # @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::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)
          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. **Note:** This item has been deprecated. New integrations cannot use
        # this method and can refer to our new recommendations.
        # @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".
        # @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::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)
          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. A successful
        # response indicates that a removal request has been sent to the device. The
        # call will be considered successful even if the app is not present on the
        # device (e.g. it was never installed, or was removed by the user).
        # @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".
        # @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_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)
          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".
        # @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::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)
          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.
        # @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)
          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.
        # @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".
        # @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.
        # @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)
          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.
        # @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".
        # @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_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)
          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".
        # @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::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)
          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.
        # @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.
        # @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)
          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".
        # @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.
        # @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)
          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".
        # @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_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)
          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".
        # @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::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)
          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.
        # @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.
        # @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)
          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.
        # @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".
        # @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.
        # @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)
          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
        
        # 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.
        # @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)
          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. **
        # Note:** This item has been deprecated. New integrations cannot use this method
        # and can refer to our new recommendations.
        # @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.
        # @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)
          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. **Note:** This item has been deprecated. New integrations cannot use
        # this method and can refer to our new recommendations.
        # @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".
        # @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::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)
          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.
        # @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)
          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.
        # @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.
        # @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)
          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.
        # @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)
          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. **Note:** This item has been deprecated. New integrations cannot
        # use this method and can refer to our new recommendations.
        # @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?
          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) **
        # Note:** This item has been deprecated. New integrations cannot use this method
        # and can refer to our new recommendations.
        # @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.
        # @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)
          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
        
        # 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.
        # @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.
        # @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)
          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.
        # @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.
        # @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)
          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.
        # @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::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)
          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
        
        # 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.
        # @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)
          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.
        # @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)
          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.
        # @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)
          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.
        # @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)
          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.
        # @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)
          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.
        # @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)
          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.
        # @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)
          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.
        # @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)
          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.
        # @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)
          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.
        # @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)
          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
        
        # 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.
        # @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)
          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.
        # @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.
        # @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)
          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?
          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.
        # @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)
          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
        
        # Retrieves the set of products a user is entitled to access. **Note:** This
        # item has been deprecated. New integrations cannot use this method and can
        # refer to our new recommendations.
        # @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.
        # @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)
          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.
        # @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.
        # @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)
          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.
        # @param [String] enterprise_id
        #   The ID of the enterprise.
        # @param [String] email
        #   Required. The exact primary email address of the user to look up.
        # @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::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)
          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.
        # @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)
          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. **
        # Note:** This item has been deprecated. New integrations cannot use this method
        # and can refer to our new recommendations.
        # @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.
        # @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)
          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
          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
        
        # 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.
        # @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.
        # @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)
          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

        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
