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 |
|
---|
18 | namespace Google\Service\AndroidEnterprise\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\AndroidEnterprise\ManagedConfiguration;
|
---|
21 | use 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 | */
|
---|
31 | class 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 | * @throws \Google\Service\Exception
|
---|
44 | */
|
---|
45 | public function delete($enterpriseId, $userId, $deviceId, $managedConfigurationForDeviceId, $optParams = [])
|
---|
46 | {
|
---|
47 | $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId, 'managedConfigurationForDeviceId' => $managedConfigurationForDeviceId];
|
---|
48 | $params = array_merge($params, $optParams);
|
---|
49 | return $this->call('delete', [$params]);
|
---|
50 | }
|
---|
51 | /**
|
---|
52 | * Retrieves details of a per-device managed configuration.
|
---|
53 | * (managedconfigurationsfordevice.get)
|
---|
54 | *
|
---|
55 | * @param string $enterpriseId The ID of the enterprise.
|
---|
56 | * @param string $userId The ID of the user.
|
---|
57 | * @param string $deviceId The Android ID of the device.
|
---|
58 | * @param string $managedConfigurationForDeviceId The ID of the managed
|
---|
59 | * configuration (a product ID), e.g. "app:com.google.android.gm".
|
---|
60 | * @param array $optParams Optional parameters.
|
---|
61 | * @return ManagedConfiguration
|
---|
62 | * @throws \Google\Service\Exception
|
---|
63 | */
|
---|
64 | public function get($enterpriseId, $userId, $deviceId, $managedConfigurationForDeviceId, $optParams = [])
|
---|
65 | {
|
---|
66 | $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId, 'managedConfigurationForDeviceId' => $managedConfigurationForDeviceId];
|
---|
67 | $params = array_merge($params, $optParams);
|
---|
68 | return $this->call('get', [$params], ManagedConfiguration::class);
|
---|
69 | }
|
---|
70 | /**
|
---|
71 | * Lists all the per-device managed configurations for the specified device.
|
---|
72 | * Only the ID is set.
|
---|
73 | * (managedconfigurationsfordevice.listManagedconfigurationsfordevice)
|
---|
74 | *
|
---|
75 | * @param string $enterpriseId The ID of the enterprise.
|
---|
76 | * @param string $userId The ID of the user.
|
---|
77 | * @param string $deviceId The Android ID of the device.
|
---|
78 | * @param array $optParams Optional parameters.
|
---|
79 | * @return ManagedConfigurationsForDeviceListResponse
|
---|
80 | * @throws \Google\Service\Exception
|
---|
81 | */
|
---|
82 | public function listManagedconfigurationsfordevice($enterpriseId, $userId, $deviceId, $optParams = [])
|
---|
83 | {
|
---|
84 | $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId];
|
---|
85 | $params = array_merge($params, $optParams);
|
---|
86 | return $this->call('list', [$params], ManagedConfigurationsForDeviceListResponse::class);
|
---|
87 | }
|
---|
88 | /**
|
---|
89 | * Adds or updates a per-device managed configuration for an app for the
|
---|
90 | * specified device. (managedconfigurationsfordevice.update)
|
---|
91 | *
|
---|
92 | * @param string $enterpriseId The ID of the enterprise.
|
---|
93 | * @param string $userId The ID of the user.
|
---|
94 | * @param string $deviceId The Android ID of the device.
|
---|
95 | * @param string $managedConfigurationForDeviceId The ID of the managed
|
---|
96 | * configuration (a product ID), e.g. "app:com.google.android.gm".
|
---|
97 | * @param ManagedConfiguration $postBody
|
---|
98 | * @param array $optParams Optional parameters.
|
---|
99 | * @return ManagedConfiguration
|
---|
100 | * @throws \Google\Service\Exception
|
---|
101 | */
|
---|
102 | public function update($enterpriseId, $userId, $deviceId, $managedConfigurationForDeviceId, ManagedConfiguration $postBody, $optParams = [])
|
---|
103 | {
|
---|
104 | $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId, 'deviceId' => $deviceId, 'managedConfigurationForDeviceId' => $managedConfigurationForDeviceId, 'postBody' => $postBody];
|
---|
105 | $params = array_merge($params, $optParams);
|
---|
106 | return $this->call('update', [$params], ManagedConfiguration::class);
|
---|
107 | }
|
---|
108 | }
|
---|
109 |
|
---|
110 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
111 | class_alias(Managedconfigurationsfordevice::class, 'Google_Service_AndroidEnterprise_Resource_Managedconfigurationsfordevice');
|
---|