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\ManagedConfigurationsForDeviceListResponse;
22
23/**
24 * The "managedconfigurationsfordevice" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $androidenterpriseService = new Google\Service\AndroidEnterprise(...);
28 *   $managedconfigurationsfordevice = $androidenterpriseService->managedconfigurationsfordevice;
29 *  </code>
30 */
31class Managedconfigurationsfordevice extends \Google\Service\Resource
32{
33  /**
34   * Removes a per-device managed configuration for an app for the specified
35   * device. (managedconfigurationsfordevice.delete)
36   *
37   * @param string $enterpriseId The ID of the enterprise.
38   * @param string $userId The ID of the user.
39   * @param string $deviceId The Android ID of the device.
40   * @param string $managedConfigurationForDeviceId The ID of the managed
41   * configuration (a product ID), e.g. "app:com.google.android.gm".
42   * @param array $optParams Optional parameters.
43   */
44  public function delete($enterpriseId, $userId, $deviceId, $managedConfigurationForDeviceId, $optParams = [])
45  {
46    $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId, 'managedConfigurationForDeviceId' => $managedConfigurationForDeviceId];
47    $params = array_merge($params, $optParams);
48    return $this->call('delete', [$params]);
49  }
50  /**
51   * Retrieves details of a per-device managed configuration.
52   * (managedconfigurationsfordevice.get)
53   *
54   * @param string $enterpriseId The ID of the enterprise.
55   * @param string $userId The ID of the user.
56   * @param string $deviceId The Android ID of the device.
57   * @param string $managedConfigurationForDeviceId The ID of the managed
58   * configuration (a product ID), e.g. "app:com.google.android.gm".
59   * @param array $optParams Optional parameters.
60   * @return ManagedConfiguration
61   */
62  public function get($enterpriseId, $userId, $deviceId, $managedConfigurationForDeviceId, $optParams = [])
63  {
64    $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId, 'managedConfigurationForDeviceId' => $managedConfigurationForDeviceId];
65    $params = array_merge($params, $optParams);
66    return $this->call('get', [$params], ManagedConfiguration::class);
67  }
68  /**
69   * Lists all the per-device managed configurations for the specified device.
70   * Only the ID is set.
71   * (managedconfigurationsfordevice.listManagedconfigurationsfordevice)
72   *
73   * @param string $enterpriseId The ID of the enterprise.
74   * @param string $userId The ID of the user.
75   * @param string $deviceId The Android ID of the device.
76   * @param array $optParams Optional parameters.
77   * @return ManagedConfigurationsForDeviceListResponse
78   */
79  public function listManagedconfigurationsfordevice($enterpriseId, $userId, $deviceId, $optParams = [])
80  {
81    $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId];
82    $params = array_merge($params, $optParams);
83    return $this->call('list', [$params], ManagedConfigurationsForDeviceListResponse::class);
84  }
85  /**
86   * Adds or updates a per-device managed configuration for an app for the
87   * specified device. (managedconfigurationsfordevice.update)
88   *
89   * @param string $enterpriseId The ID of the enterprise.
90   * @param string $userId The ID of the user.
91   * @param string $deviceId The Android ID of the device.
92   * @param string $managedConfigurationForDeviceId 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, $deviceId, $managedConfigurationForDeviceId, ManagedConfiguration $postBody, $optParams = [])
99  {
100    $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId, 'managedConfigurationForDeviceId' => $managedConfigurationForDeviceId, '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(Managedconfigurationsfordevice::class, 'Google_Service_AndroidEnterprise_Resource_Managedconfigurationsfordevice');
108