1<?php 2/* 3 * Copyright 2014 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 * use this file except in compliance with the License. You may obtain a copy of 7 * the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 18namespace Google\Service\AndroidEnterprise\Resource; 19 20use Google\Service\AndroidEnterprise\ManagedConfiguration; 21use Google\Service\AndroidEnterprise\ManagedConfigurationsForUserListResponse; 22 23/** 24 * The "managedconfigurationsforuser" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $androidenterpriseService = new Google\Service\AndroidEnterprise(...); 28 * $managedconfigurationsforuser = $androidenterpriseService->managedconfigurationsforuser; 29 * </code> 30 */ 31class Managedconfigurationsforuser extends \Google\Service\Resource 32{ 33 /** 34 * Removes a per-user managed configuration for an app for the specified user. 35 * (managedconfigurationsforuser.delete) 36 * 37 * @param string $enterpriseId The ID of the enterprise. 38 * @param string $userId The ID of the user. 39 * @param string $managedConfigurationForUserId The ID of the managed 40 * configuration (a product ID), e.g. "app:com.google.android.gm". 41 * @param array $optParams Optional parameters. 42 */ 43 public function delete($enterpriseId, $userId, $managedConfigurationForUserId, $optParams = []) 44 { 45 $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId, 'managedConfigurationForUserId' => $managedConfigurationForUserId]; 46 $params = array_merge($params, $optParams); 47 return $this->call('delete', [$params]); 48 } 49 /** 50 * Retrieves details of a per-user managed configuration for an app for the 51 * specified user. (managedconfigurationsforuser.get) 52 * 53 * @param string $enterpriseId The ID of the enterprise. 54 * @param string $userId The ID of the user. 55 * @param string $managedConfigurationForUserId The ID of the managed 56 * configuration (a product ID), e.g. "app:com.google.android.gm". 57 * @param array $optParams Optional parameters. 58 * @return ManagedConfiguration 59 */ 60 public function get($enterpriseId, $userId, $managedConfigurationForUserId, $optParams = []) 61 { 62 $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId, 'managedConfigurationForUserId' => $managedConfigurationForUserId]; 63 $params = array_merge($params, $optParams); 64 return $this->call('get', [$params], ManagedConfiguration::class); 65 } 66 /** 67 * Lists all the per-user managed configurations for the specified user. Only 68 * the ID is set. 69 * (managedconfigurationsforuser.listManagedconfigurationsforuser) 70 * 71 * @param string $enterpriseId The ID of the enterprise. 72 * @param string $userId The ID of the user. 73 * @param array $optParams Optional parameters. 74 * @return ManagedConfigurationsForUserListResponse 75 */ 76 public function listManagedconfigurationsforuser($enterpriseId, $userId, $optParams = []) 77 { 78 $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId]; 79 $params = array_merge($params, $optParams); 80 return $this->call('list', [$params], ManagedConfigurationsForUserListResponse::class); 81 } 82 /** 83 * Adds or updates the managed configuration settings for an app for the 84 * specified user. If you support the Managed configurations iframe, you can 85 * apply managed configurations to a user by specifying an mcmId and its 86 * associated configuration variables (if any) in the request. Alternatively, 87 * all EMMs can apply managed configurations by passing a list of managed 88 * properties. (managedconfigurationsforuser.update) 89 * 90 * @param string $enterpriseId The ID of the enterprise. 91 * @param string $userId The ID of the user. 92 * @param string $managedConfigurationForUserId The ID of the managed 93 * configuration (a product ID), e.g. "app:com.google.android.gm". 94 * @param ManagedConfiguration $postBody 95 * @param array $optParams Optional parameters. 96 * @return ManagedConfiguration 97 */ 98 public function update($enterpriseId, $userId, $managedConfigurationForUserId, ManagedConfiguration $postBody, $optParams = []) 99 { 100 $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId, 'managedConfigurationForUserId' => $managedConfigurationForUserId, 'postBody' => $postBody]; 101 $params = array_merge($params, $optParams); 102 return $this->call('update', [$params], ManagedConfiguration::class); 103 } 104} 105 106// Adding a class alias for backwards compatibility with the previous class name. 107class_alias(Managedconfigurationsforuser::class, 'Google_Service_AndroidEnterprise_Resource_Managedconfigurationsforuser'); 108