[e3d4e0a] | 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\FirebaseManagement\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\FirebaseManagement\IosApp;
|
---|
| 21 | use Google\Service\FirebaseManagement\IosAppConfig;
|
---|
| 22 | use Google\Service\FirebaseManagement\ListIosAppsResponse;
|
---|
| 23 | use Google\Service\FirebaseManagement\Operation;
|
---|
| 24 | use Google\Service\FirebaseManagement\RemoveIosAppRequest;
|
---|
| 25 | use Google\Service\FirebaseManagement\UndeleteIosAppRequest;
|
---|
| 26 |
|
---|
| 27 | /**
|
---|
| 28 | * The "iosApps" collection of methods.
|
---|
| 29 | * Typical usage is:
|
---|
| 30 | * <code>
|
---|
| 31 | * $firebaseService = new Google\Service\FirebaseManagement(...);
|
---|
| 32 | * $iosApps = $firebaseService->projects_iosApps;
|
---|
| 33 | * </code>
|
---|
| 34 | */
|
---|
| 35 | class ProjectsIosApps extends \Google\Service\Resource
|
---|
| 36 | {
|
---|
| 37 | /**
|
---|
| 38 | * Requests the creation of a new IosApp in the specified FirebaseProject. The
|
---|
| 39 | * result of this call is an `Operation` which can be used to track the
|
---|
| 40 | * provisioning process. The `Operation` is automatically deleted after
|
---|
| 41 | * completion, so there is no need to call `DeleteOperation`. (iosApps.create)
|
---|
| 42 | *
|
---|
| 43 | * @param string $parent The resource name of the parent FirebaseProject in
|
---|
| 44 | * which to create an IosApp, in the format: projects/PROJECT_IDENTIFIER/iosApps
|
---|
| 45 | * Refer to the `FirebaseProject`
|
---|
| 46 | * [`name`](../projects#FirebaseProject.FIELDS.name) field for details about
|
---|
| 47 | * PROJECT_IDENTIFIER values.
|
---|
| 48 | * @param IosApp $postBody
|
---|
| 49 | * @param array $optParams Optional parameters.
|
---|
| 50 | * @return Operation
|
---|
| 51 | * @throws \Google\Service\Exception
|
---|
| 52 | */
|
---|
| 53 | public function create($parent, IosApp $postBody, $optParams = [])
|
---|
| 54 | {
|
---|
| 55 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 56 | $params = array_merge($params, $optParams);
|
---|
| 57 | return $this->call('create', [$params], Operation::class);
|
---|
| 58 | }
|
---|
| 59 | /**
|
---|
| 60 | * Gets the specified IosApp. (iosApps.get)
|
---|
| 61 | *
|
---|
| 62 | * @param string $name The resource name of the IosApp, in the format:
|
---|
| 63 | * projects/PROJECT_IDENTIFIER /iosApps/APP_ID Since an APP_ID is a unique
|
---|
| 64 | * identifier, the Unique Resource from Sub-Collection access pattern may be
|
---|
| 65 | * used here, in the format: projects/-/iosApps/APP_ID Refer to the `IosApp`
|
---|
| 66 | * [`name`](../projects.iosApps#IosApp.FIELDS.name) field for details about
|
---|
| 67 | * PROJECT_IDENTIFIER and APP_ID values.
|
---|
| 68 | * @param array $optParams Optional parameters.
|
---|
| 69 | * @return IosApp
|
---|
| 70 | * @throws \Google\Service\Exception
|
---|
| 71 | */
|
---|
| 72 | public function get($name, $optParams = [])
|
---|
| 73 | {
|
---|
| 74 | $params = ['name' => $name];
|
---|
| 75 | $params = array_merge($params, $optParams);
|
---|
| 76 | return $this->call('get', [$params], IosApp::class);
|
---|
| 77 | }
|
---|
| 78 | /**
|
---|
| 79 | * Gets the configuration artifact associated with the specified IosApp.
|
---|
| 80 | * (iosApps.getConfig)
|
---|
| 81 | *
|
---|
| 82 | * @param string $name The resource name of the App configuration to download,
|
---|
| 83 | * in the format: projects/PROJECT_IDENTIFIER/iosApps/APP_ID/config Since an
|
---|
| 84 | * APP_ID is a unique identifier, the Unique Resource from Sub-Collection access
|
---|
| 85 | * pattern may be used here, in the format: projects/-/iosApps/APP_ID Refer to
|
---|
| 86 | * the `IosApp` [`name`](../projects.iosApps#IosApp.FIELDS.name) field for
|
---|
| 87 | * details about PROJECT_IDENTIFIER and APP_ID values.
|
---|
| 88 | * @param array $optParams Optional parameters.
|
---|
| 89 | * @return IosAppConfig
|
---|
| 90 | * @throws \Google\Service\Exception
|
---|
| 91 | */
|
---|
| 92 | public function getConfig($name, $optParams = [])
|
---|
| 93 | {
|
---|
| 94 | $params = ['name' => $name];
|
---|
| 95 | $params = array_merge($params, $optParams);
|
---|
| 96 | return $this->call('getConfig', [$params], IosAppConfig::class);
|
---|
| 97 | }
|
---|
| 98 | /**
|
---|
| 99 | * Lists each IosApp associated with the specified FirebaseProject. The elements
|
---|
| 100 | * are returned in no particular order, but will be a consistent view of the
|
---|
| 101 | * Apps when additional requests are made with a `pageToken`.
|
---|
| 102 | * (iosApps.listProjectsIosApps)
|
---|
| 103 | *
|
---|
| 104 | * @param string $parent The resource name of the parent FirebaseProject for
|
---|
| 105 | * which to list each associated IosApp, in the format:
|
---|
| 106 | * projects/PROJECT_IDENTIFIER/iosApps Refer to the `FirebaseProject`
|
---|
| 107 | * [`name`](../projects#FirebaseProject.FIELDS.name) field for details about
|
---|
| 108 | * PROJECT_IDENTIFIER values.
|
---|
| 109 | * @param array $optParams Optional parameters.
|
---|
| 110 | *
|
---|
| 111 | * @opt_param int pageSize The maximum number of Apps to return in the response.
|
---|
| 112 | * The server may return fewer than this at its discretion. If no value is
|
---|
| 113 | * specified (or too large a value is specified), the server will impose its own
|
---|
| 114 | * limit.
|
---|
| 115 | * @opt_param string pageToken Token returned from a previous call to
|
---|
| 116 | * `ListIosApps` indicating where in the set of Apps to resume listing.
|
---|
| 117 | * @opt_param bool showDeleted Controls whether Apps in the DELETED state should
|
---|
| 118 | * be returned in the response. If not specified, only `ACTIVE` Apps will be
|
---|
| 119 | * returned.
|
---|
| 120 | * @return ListIosAppsResponse
|
---|
| 121 | * @throws \Google\Service\Exception
|
---|
| 122 | */
|
---|
| 123 | public function listProjectsIosApps($parent, $optParams = [])
|
---|
| 124 | {
|
---|
| 125 | $params = ['parent' => $parent];
|
---|
| 126 | $params = array_merge($params, $optParams);
|
---|
| 127 | return $this->call('list', [$params], ListIosAppsResponse::class);
|
---|
| 128 | }
|
---|
| 129 | /**
|
---|
| 130 | * Updates the attributes of the specified IosApp. (iosApps.patch)
|
---|
| 131 | *
|
---|
| 132 | * @param string $name The resource name of the IosApp, in the format:
|
---|
| 133 | * projects/PROJECT_IDENTIFIER /iosApps/APP_ID * PROJECT_IDENTIFIER: the parent
|
---|
| 134 | * Project's
|
---|
| 135 | * [`ProjectNumber`](../projects#FirebaseProject.FIELDS.project_number)
|
---|
| 136 | * ***(recommended)*** or its
|
---|
| 137 | * [`ProjectId`](../projects#FirebaseProject.FIELDS.project_id). Learn more
|
---|
| 138 | * about using project identifiers in Google's [AIP 2510
|
---|
| 139 | * standard](https://google.aip.dev/cloud/2510). Note that the value for
|
---|
| 140 | * PROJECT_IDENTIFIER in any response body will be the `ProjectId`. * APP_ID:
|
---|
| 141 | * the globally unique, Firebase-assigned identifier for the App (see
|
---|
| 142 | * [`appId`](../projects.iosApps#IosApp.FIELDS.app_id)).
|
---|
| 143 | * @param IosApp $postBody
|
---|
| 144 | * @param array $optParams Optional parameters.
|
---|
| 145 | *
|
---|
| 146 | * @opt_param string updateMask Specifies which fields of the IosApp to update.
|
---|
| 147 | * Note that the following fields are immutable: `name`, `app_id`, `project_id`,
|
---|
| 148 | * and `bundle_id`. To update `state`, use any of the following endpoints:
|
---|
| 149 | * RemoveIosApp or UndeleteIosApp.
|
---|
| 150 | * @return IosApp
|
---|
| 151 | * @throws \Google\Service\Exception
|
---|
| 152 | */
|
---|
| 153 | public function patch($name, IosApp $postBody, $optParams = [])
|
---|
| 154 | {
|
---|
| 155 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 156 | $params = array_merge($params, $optParams);
|
---|
| 157 | return $this->call('patch', [$params], IosApp::class);
|
---|
| 158 | }
|
---|
| 159 | /**
|
---|
| 160 | * Removes the specified IosApp from the FirebaseProject. (iosApps.remove)
|
---|
| 161 | *
|
---|
| 162 | * @param string $name Required. The resource name of the IosApp, in the format:
|
---|
| 163 | * projects/ PROJECT_IDENTIFIER/iosApps/APP_ID Since an APP_ID is a unique
|
---|
| 164 | * identifier, the Unique Resource from Sub-Collection access pattern may be
|
---|
| 165 | * used here, in the format: projects/-/iosApps/APP_ID Refer to the IosApp
|
---|
| 166 | * [name](../projects.iosApps#IosApp.FIELDS.name) field for details about
|
---|
| 167 | * PROJECT_IDENTIFIER and APP_ID values.
|
---|
| 168 | * @param RemoveIosAppRequest $postBody
|
---|
| 169 | * @param array $optParams Optional parameters.
|
---|
| 170 | * @return Operation
|
---|
| 171 | * @throws \Google\Service\Exception
|
---|
| 172 | */
|
---|
| 173 | public function remove($name, RemoveIosAppRequest $postBody, $optParams = [])
|
---|
| 174 | {
|
---|
| 175 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 176 | $params = array_merge($params, $optParams);
|
---|
| 177 | return $this->call('remove', [$params], Operation::class);
|
---|
| 178 | }
|
---|
| 179 | /**
|
---|
| 180 | * Restores the specified IosApp to the FirebaseProject. (iosApps.undelete)
|
---|
| 181 | *
|
---|
| 182 | * @param string $name Required. The resource name of the IosApp, in the format:
|
---|
| 183 | * projects/ PROJECT_IDENTIFIER/iosApps/APP_ID Since an APP_ID is a unique
|
---|
| 184 | * identifier, the Unique Resource from Sub-Collection access pattern may be
|
---|
| 185 | * used here, in the format: projects/-/iosApps/APP_ID Refer to the IosApp
|
---|
| 186 | * [name](../projects.iosApps#IosApp.FIELDS.name) field for details about
|
---|
| 187 | * PROJECT_IDENTIFIER and APP_ID values.
|
---|
| 188 | * @param UndeleteIosAppRequest $postBody
|
---|
| 189 | * @param array $optParams Optional parameters.
|
---|
| 190 | * @return Operation
|
---|
| 191 | * @throws \Google\Service\Exception
|
---|
| 192 | */
|
---|
| 193 | public function undelete($name, UndeleteIosAppRequest $postBody, $optParams = [])
|
---|
| 194 | {
|
---|
| 195 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 196 | $params = array_merge($params, $optParams);
|
---|
| 197 | return $this->call('undelete', [$params], Operation::class);
|
---|
| 198 | }
|
---|
| 199 | }
|
---|
| 200 |
|
---|
| 201 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 202 | class_alias(ProjectsIosApps::class, 'Google_Service_FirebaseManagement_Resource_ProjectsIosApps');
|
---|