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