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