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\WebApp;
|
---|
21 | use Google\Service\AndroidEnterprise\WebAppsListResponse;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "webapps" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $androidenterpriseService = new Google\Service\AndroidEnterprise(...);
|
---|
28 | * $webapps = $androidenterpriseService->webapps;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class Webapps extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Deletes an existing web app. (webapps.delete)
|
---|
35 | *
|
---|
36 | * @param string $enterpriseId The ID of the enterprise.
|
---|
37 | * @param string $webAppId The ID of the web app.
|
---|
38 | * @param array $optParams Optional parameters.
|
---|
39 | * @throws \Google\Service\Exception
|
---|
40 | */
|
---|
41 | public function delete($enterpriseId, $webAppId, $optParams = [])
|
---|
42 | {
|
---|
43 | $params = ['enterpriseId' => $enterpriseId, 'webAppId' => $webAppId];
|
---|
44 | $params = array_merge($params, $optParams);
|
---|
45 | return $this->call('delete', [$params]);
|
---|
46 | }
|
---|
47 | /**
|
---|
48 | * Gets an existing web app. (webapps.get)
|
---|
49 | *
|
---|
50 | * @param string $enterpriseId The ID of the enterprise.
|
---|
51 | * @param string $webAppId The ID of the web app.
|
---|
52 | * @param array $optParams Optional parameters.
|
---|
53 | * @return WebApp
|
---|
54 | * @throws \Google\Service\Exception
|
---|
55 | */
|
---|
56 | public function get($enterpriseId, $webAppId, $optParams = [])
|
---|
57 | {
|
---|
58 | $params = ['enterpriseId' => $enterpriseId, 'webAppId' => $webAppId];
|
---|
59 | $params = array_merge($params, $optParams);
|
---|
60 | return $this->call('get', [$params], WebApp::class);
|
---|
61 | }
|
---|
62 | /**
|
---|
63 | * Creates a new web app for the enterprise. (webapps.insert)
|
---|
64 | *
|
---|
65 | * @param string $enterpriseId The ID of the enterprise.
|
---|
66 | * @param WebApp $postBody
|
---|
67 | * @param array $optParams Optional parameters.
|
---|
68 | * @return WebApp
|
---|
69 | * @throws \Google\Service\Exception
|
---|
70 | */
|
---|
71 | public function insert($enterpriseId, WebApp $postBody, $optParams = [])
|
---|
72 | {
|
---|
73 | $params = ['enterpriseId' => $enterpriseId, 'postBody' => $postBody];
|
---|
74 | $params = array_merge($params, $optParams);
|
---|
75 | return $this->call('insert', [$params], WebApp::class);
|
---|
76 | }
|
---|
77 | /**
|
---|
78 | * Retrieves the details of all web apps for a given enterprise.
|
---|
79 | * (webapps.listWebapps)
|
---|
80 | *
|
---|
81 | * @param string $enterpriseId The ID of the enterprise.
|
---|
82 | * @param array $optParams Optional parameters.
|
---|
83 | * @return WebAppsListResponse
|
---|
84 | * @throws \Google\Service\Exception
|
---|
85 | */
|
---|
86 | public function listWebapps($enterpriseId, $optParams = [])
|
---|
87 | {
|
---|
88 | $params = ['enterpriseId' => $enterpriseId];
|
---|
89 | $params = array_merge($params, $optParams);
|
---|
90 | return $this->call('list', [$params], WebAppsListResponse::class);
|
---|
91 | }
|
---|
92 | /**
|
---|
93 | * Updates an existing web app. (webapps.update)
|
---|
94 | *
|
---|
95 | * @param string $enterpriseId The ID of the enterprise.
|
---|
96 | * @param string $webAppId The ID of the web app.
|
---|
97 | * @param WebApp $postBody
|
---|
98 | * @param array $optParams Optional parameters.
|
---|
99 | * @return WebApp
|
---|
100 | * @throws \Google\Service\Exception
|
---|
101 | */
|
---|
102 | public function update($enterpriseId, $webAppId, WebApp $postBody, $optParams = [])
|
---|
103 | {
|
---|
104 | $params = ['enterpriseId' => $enterpriseId, 'webAppId' => $webAppId, 'postBody' => $postBody];
|
---|
105 | $params = array_merge($params, $optParams);
|
---|
106 | return $this->call('update', [$params], WebApp::class);
|
---|
107 | }
|
---|
108 | }
|
---|
109 |
|
---|
110 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
111 | class_alias(Webapps::class, 'Google_Service_AndroidEnterprise_Resource_Webapps');
|
---|