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\Appengine\Resource; 19 20use Google\Service\Appengine\Application; 21use Google\Service\Appengine\Operation; 22use Google\Service\Appengine\RepairApplicationRequest; 23 24/** 25 * The "apps" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $appengineService = new Google\Service\Appengine(...); 29 * $apps = $appengineService->apps; 30 * </code> 31 */ 32class Apps extends \Google\Service\Resource 33{ 34 /** 35 * Creates an App Engine application for a Google Cloud Platform project. 36 * Required fields: id - The ID of the target Cloud Platform project. location - 37 * The region (https://cloud.google.com/appengine/docs/locations) where you want 38 * the App Engine application located.For more information about App Engine 39 * applications, see Managing Projects, Applications, and Billing 40 * (https://cloud.google.com/appengine/docs/standard/python/console/). 41 * (apps.create) 42 * 43 * @param Application $postBody 44 * @param array $optParams Optional parameters. 45 * @return Operation 46 */ 47 public function create(Application $postBody, $optParams = []) 48 { 49 $params = ['postBody' => $postBody]; 50 $params = array_merge($params, $optParams); 51 return $this->call('create', [$params], Operation::class); 52 } 53 /** 54 * Gets information about an application. (apps.get) 55 * 56 * @param string $appsId Part of `name`. Name of the Application resource to 57 * get. Example: apps/myapp. 58 * @param array $optParams Optional parameters. 59 * @return Application 60 */ 61 public function get($appsId, $optParams = []) 62 { 63 $params = ['appsId' => $appsId]; 64 $params = array_merge($params, $optParams); 65 return $this->call('get', [$params], Application::class); 66 } 67 /** 68 * Updates the specified Application resource. You can update the following 69 * fields: auth_domain - Google authentication domain for controlling user 70 * access to the application. default_cookie_expiration - Cookie expiration 71 * policy for the application. iap - Identity-Aware Proxy properties for the 72 * application. (apps.patch) 73 * 74 * @param string $appsId Part of `name`. Name of the Application resource to 75 * update. Example: apps/myapp. 76 * @param Application $postBody 77 * @param array $optParams Optional parameters. 78 * 79 * @opt_param string updateMask Required. Standard field mask for the set of 80 * fields to be updated. 81 * @return Operation 82 */ 83 public function patch($appsId, Application $postBody, $optParams = []) 84 { 85 $params = ['appsId' => $appsId, 'postBody' => $postBody]; 86 $params = array_merge($params, $optParams); 87 return $this->call('patch', [$params], Operation::class); 88 } 89 /** 90 * Recreates the required App Engine features for the specified App Engine 91 * application, for example a Cloud Storage bucket or App Engine service 92 * account. Use this method if you receive an error message about a missing 93 * feature, for example, Error retrieving the App Engine service account. If you 94 * have deleted your App Engine service account, this will not be able to 95 * recreate it. Instead, you should attempt to use the IAM undelete API if 96 * possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAc 97 * counts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funi 98 * que_id"%2C"resource"%3A%7B%7D%7D . If the deletion was recent, the numeric ID 99 * can be found in the Cloud Console Activity Log. (apps.repair) 100 * 101 * @param string $appsId Part of `name`. Name of the application to repair. 102 * Example: apps/myapp 103 * @param RepairApplicationRequest $postBody 104 * @param array $optParams Optional parameters. 105 * @return Operation 106 */ 107 public function repair($appsId, RepairApplicationRequest $postBody, $optParams = []) 108 { 109 $params = ['appsId' => $appsId, 'postBody' => $postBody]; 110 $params = array_merge($params, $optParams); 111 return $this->call('repair', [$params], Operation::class); 112 } 113} 114 115// Adding a class alias for backwards compatibility with the previous class name. 116class_alias(Apps::class, 'Google_Service_Appengine_Resource_Apps'); 117