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\Firebaseappcheck\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1BatchUpdateServicesRequest;
|
---|
21 | use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1BatchUpdateServicesResponse;
|
---|
22 | use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1ListServicesResponse;
|
---|
23 | use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1Service;
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * The "services" collection of methods.
|
---|
27 | * Typical usage is:
|
---|
28 | * <code>
|
---|
29 | * $firebaseappcheckService = new Google\Service\Firebaseappcheck(...);
|
---|
30 | * $services = $firebaseappcheckService->projects_services;
|
---|
31 | * </code>
|
---|
32 | */
|
---|
33 | class ProjectsServices extends \Google\Service\Resource
|
---|
34 | {
|
---|
35 | /**
|
---|
36 | * Atomically updates the specified Service configurations.
|
---|
37 | * (services.batchUpdate)
|
---|
38 | *
|
---|
39 | * @param string $parent Required. The parent project name shared by all Service
|
---|
40 | * configurations being updated, in the format ``` projects/{project_number} ```
|
---|
41 | * The parent collection in the `name` field of any resource being updated must
|
---|
42 | * match this field, or the entire batch fails.
|
---|
43 | * @param GoogleFirebaseAppcheckV1BatchUpdateServicesRequest $postBody
|
---|
44 | * @param array $optParams Optional parameters.
|
---|
45 | * @return GoogleFirebaseAppcheckV1BatchUpdateServicesResponse
|
---|
46 | * @throws \Google\Service\Exception
|
---|
47 | */
|
---|
48 | public function batchUpdate($parent, GoogleFirebaseAppcheckV1BatchUpdateServicesRequest $postBody, $optParams = [])
|
---|
49 | {
|
---|
50 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
51 | $params = array_merge($params, $optParams);
|
---|
52 | return $this->call('batchUpdate', [$params], GoogleFirebaseAppcheckV1BatchUpdateServicesResponse::class);
|
---|
53 | }
|
---|
54 | /**
|
---|
55 | * Gets the Service configuration for the specified service name. (services.get)
|
---|
56 | *
|
---|
57 | * @param string $name Required. The relative resource name of the Service to
|
---|
58 | * retrieve, in the format: ``` projects/{project_number}/services/{service_id}
|
---|
59 | * ``` Note that the `service_id` element must be a supported service ID.
|
---|
60 | * Currently, the following service IDs are supported: *
|
---|
61 | * `firebasestorage.googleapis.com` (Cloud Storage for Firebase) *
|
---|
62 | * `firebasedatabase.googleapis.com` (Firebase Realtime Database) *
|
---|
63 | * `firestore.googleapis.com` (Cloud Firestore) * `oauth2.googleapis.com`
|
---|
64 | * (Google Identity for iOS)
|
---|
65 | * @param array $optParams Optional parameters.
|
---|
66 | * @return GoogleFirebaseAppcheckV1Service
|
---|
67 | * @throws \Google\Service\Exception
|
---|
68 | */
|
---|
69 | public function get($name, $optParams = [])
|
---|
70 | {
|
---|
71 | $params = ['name' => $name];
|
---|
72 | $params = array_merge($params, $optParams);
|
---|
73 | return $this->call('get', [$params], GoogleFirebaseAppcheckV1Service::class);
|
---|
74 | }
|
---|
75 | /**
|
---|
76 | * Lists all Service configurations for the specified project. Only Services
|
---|
77 | * which were explicitly configured using UpdateService or BatchUpdateServices
|
---|
78 | * will be returned. (services.listProjectsServices)
|
---|
79 | *
|
---|
80 | * @param string $parent Required. The relative resource name of the parent
|
---|
81 | * project for which to list each associated Service, in the format: ```
|
---|
82 | * projects/{project_number} ```
|
---|
83 | * @param array $optParams Optional parameters.
|
---|
84 | *
|
---|
85 | * @opt_param int pageSize The maximum number of Services to return in the
|
---|
86 | * response. Only explicitly configured services are returned. The server may
|
---|
87 | * return fewer than this at its own discretion. If no value is specified (or
|
---|
88 | * too large a value is specified), the server will impose its own limit.
|
---|
89 | * @opt_param string pageToken Token returned from a previous call to
|
---|
90 | * ListServices indicating where in the set of Services to resume listing.
|
---|
91 | * Provide this to retrieve the subsequent page. When paginating, all other
|
---|
92 | * parameters provided to ListServices must match the call that provided the
|
---|
93 | * page token; if they do not match, the result is undefined.
|
---|
94 | * @return GoogleFirebaseAppcheckV1ListServicesResponse
|
---|
95 | * @throws \Google\Service\Exception
|
---|
96 | */
|
---|
97 | public function listProjectsServices($parent, $optParams = [])
|
---|
98 | {
|
---|
99 | $params = ['parent' => $parent];
|
---|
100 | $params = array_merge($params, $optParams);
|
---|
101 | return $this->call('list', [$params], GoogleFirebaseAppcheckV1ListServicesResponse::class);
|
---|
102 | }
|
---|
103 | /**
|
---|
104 | * Updates the specified Service configuration. (services.patch)
|
---|
105 | *
|
---|
106 | * @param string $name Required. The relative resource name of the service
|
---|
107 | * configuration object, in the format: ```
|
---|
108 | * projects/{project_number}/services/{service_id} ``` Note that the
|
---|
109 | * `service_id` element must be a supported service ID. Currently, the following
|
---|
110 | * service IDs are supported: * `firebasestorage.googleapis.com` (Cloud Storage
|
---|
111 | * for Firebase) * `firebasedatabase.googleapis.com` (Firebase Realtime
|
---|
112 | * Database) * `firestore.googleapis.com` (Cloud Firestore) *
|
---|
113 | * `oauth2.googleapis.com` (Google Identity for iOS)
|
---|
114 | * @param GoogleFirebaseAppcheckV1Service $postBody
|
---|
115 | * @param array $optParams Optional parameters.
|
---|
116 | *
|
---|
117 | * @opt_param string updateMask Required. A comma-separated list of names of
|
---|
118 | * fields in the Service to update. Example: `enforcement_mode`.
|
---|
119 | * @return GoogleFirebaseAppcheckV1Service
|
---|
120 | * @throws \Google\Service\Exception
|
---|
121 | */
|
---|
122 | public function patch($name, GoogleFirebaseAppcheckV1Service $postBody, $optParams = [])
|
---|
123 | {
|
---|
124 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
125 | $params = array_merge($params, $optParams);
|
---|
126 | return $this->call('patch', [$params], GoogleFirebaseAppcheckV1Service::class);
|
---|
127 | }
|
---|
128 | }
|
---|
129 |
|
---|
130 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
131 | class_alias(ProjectsServices::class, 'Google_Service_Firebaseappcheck_Resource_ProjectsServices');
|
---|