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\AndroidManagement\Resource; 19 20use Google\Service\AndroidManagement\AndroidmanagementEmpty; 21use Google\Service\AndroidManagement\ListWebAppsResponse; 22use Google\Service\AndroidManagement\WebApp; 23 24/** 25 * The "webApps" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $androidmanagementService = new Google\Service\AndroidManagement(...); 29 * $webApps = $androidmanagementService->webApps; 30 * </code> 31 */ 32class EnterprisesWebApps extends \Google\Service\Resource 33{ 34 /** 35 * Creates a web app. (webApps.create) 36 * 37 * @param string $parent The name of the enterprise in the form 38 * enterprises/{enterpriseId}. 39 * @param WebApp $postBody 40 * @param array $optParams Optional parameters. 41 * @return WebApp 42 */ 43 public function create($parent, WebApp $postBody, $optParams = []) 44 { 45 $params = ['parent' => $parent, 'postBody' => $postBody]; 46 $params = array_merge($params, $optParams); 47 return $this->call('create', [$params], WebApp::class); 48 } 49 /** 50 * Deletes a web app. (webApps.delete) 51 * 52 * @param string $name The name of the web app in the form 53 * enterprises/{enterpriseId}/webApps/{packageName}. 54 * @param array $optParams Optional parameters. 55 * @return AndroidmanagementEmpty 56 */ 57 public function delete($name, $optParams = []) 58 { 59 $params = ['name' => $name]; 60 $params = array_merge($params, $optParams); 61 return $this->call('delete', [$params], AndroidmanagementEmpty::class); 62 } 63 /** 64 * Gets a web app. (webApps.get) 65 * 66 * @param string $name The name of the web app in the form 67 * enterprises/{enterpriseId}/webApp/{packageName}. 68 * @param array $optParams Optional parameters. 69 * @return WebApp 70 */ 71 public function get($name, $optParams = []) 72 { 73 $params = ['name' => $name]; 74 $params = array_merge($params, $optParams); 75 return $this->call('get', [$params], WebApp::class); 76 } 77 /** 78 * Lists web apps for a given enterprise. (webApps.listEnterprisesWebApps) 79 * 80 * @param string $parent The name of the enterprise in the form 81 * enterprises/{enterpriseId}. 82 * @param array $optParams Optional parameters. 83 * 84 * @opt_param int pageSize The requested page size. This is a hint and the 85 * actual page size in the response may be different. 86 * @opt_param string pageToken A token identifying a page of results returned by 87 * the server. 88 * @return ListWebAppsResponse 89 */ 90 public function listEnterprisesWebApps($parent, $optParams = []) 91 { 92 $params = ['parent' => $parent]; 93 $params = array_merge($params, $optParams); 94 return $this->call('list', [$params], ListWebAppsResponse::class); 95 } 96 /** 97 * Updates a web app. (webApps.patch) 98 * 99 * @param string $name The name of the web app in the form 100 * enterprises/{enterpriseId}/webApps/{packageName}. 101 * @param WebApp $postBody 102 * @param array $optParams Optional parameters. 103 * 104 * @opt_param string updateMask The field mask indicating the fields to update. 105 * If not set, all modifiable fields will be modified. 106 * @return WebApp 107 */ 108 public function patch($name, WebApp $postBody, $optParams = []) 109 { 110 $params = ['name' => $name, 'postBody' => $postBody]; 111 $params = array_merge($params, $optParams); 112 return $this->call('patch', [$params], WebApp::class); 113 } 114} 115 116// Adding a class alias for backwards compatibility with the previous class name. 117class_alias(EnterprisesWebApps::class, 'Google_Service_AndroidManagement_Resource_EnterprisesWebApps'); 118