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\FirebaseDataConnect\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\FirebaseDataConnect\GraphqlRequest;
|
---|
21 | use Google\Service\FirebaseDataConnect\GraphqlResponse;
|
---|
22 | use Google\Service\FirebaseDataConnect\ListServicesResponse;
|
---|
23 | use Google\Service\FirebaseDataConnect\Operation;
|
---|
24 | use Google\Service\FirebaseDataConnect\Service;
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * The "services" collection of methods.
|
---|
28 | * Typical usage is:
|
---|
29 | * <code>
|
---|
30 | * $firebasedataconnectService = new Google\Service\FirebaseDataConnect(...);
|
---|
31 | * $services = $firebasedataconnectService->projects_locations_services;
|
---|
32 | * </code>
|
---|
33 | */
|
---|
34 | class ProjectsLocationsServices extends \Google\Service\Resource
|
---|
35 | {
|
---|
36 | /**
|
---|
37 | * Creates a new Service in a given project and location. (services.create)
|
---|
38 | *
|
---|
39 | * @param string $parent Required. Value of parent.
|
---|
40 | * @param Service $postBody
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | *
|
---|
43 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
44 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
45 | * the server will know to ignore the request if it has already been completed.
|
---|
46 | * The server will guarantee that for at least 60 minutes since the first
|
---|
47 | * request. For example, consider a situation where you make an initial request
|
---|
48 | * and the request times out. If you make the request again with the same
|
---|
49 | * request ID, the server can check if original operation with the same request
|
---|
50 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
51 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
52 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
53 | * (00000000-0000-0000-0000-000000000000).
|
---|
54 | * @opt_param string serviceId Required. The ID to use for the service, which
|
---|
55 | * will become the final component of the service's resource name.
|
---|
56 | * @opt_param bool validateOnly Optional. If set, validate the request and
|
---|
57 | * preview the Service, but do not actually create it.
|
---|
58 | * @return Operation
|
---|
59 | * @throws \Google\Service\Exception
|
---|
60 | */
|
---|
61 | public function create($parent, Service $postBody, $optParams = [])
|
---|
62 | {
|
---|
63 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
64 | $params = array_merge($params, $optParams);
|
---|
65 | return $this->call('create', [$params], Operation::class);
|
---|
66 | }
|
---|
67 | /**
|
---|
68 | * Deletes a single Service. (services.delete)
|
---|
69 | *
|
---|
70 | * @param string $name Required. The name of the service to delete, in the
|
---|
71 | * format: ``` projects/{project}/locations/{location}/services/{service} ```
|
---|
72 | * @param array $optParams Optional parameters.
|
---|
73 | *
|
---|
74 | * @opt_param bool allowMissing Optional. If true and the Service is not found,
|
---|
75 | * the request will succeed but no action will be taken on the server.
|
---|
76 | * @opt_param string etag Optional. The etag of the Service. If this is
|
---|
77 | * provided, it must match the server's etag.
|
---|
78 | * @opt_param bool force Optional. If set to true, any child resources (i.e.
|
---|
79 | * Schema, SchemaRevisions, Connectors, and ConnectorRevisions) will also be
|
---|
80 | * deleted. Otherwise, the request will only work if the Service has no child
|
---|
81 | * resources.
|
---|
82 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
83 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
84 | * the server will know to ignore the request if it has already been completed.
|
---|
85 | * The server will guarantee that for at least 60 minutes after the first
|
---|
86 | * request. For example, consider a situation where you make an initial request
|
---|
87 | * and the request times out. If you make the request again with the same
|
---|
88 | * request ID, the server can check if original operation with the same request
|
---|
89 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
90 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
91 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
92 | * (00000000-0000-0000-0000-000000000000).
|
---|
93 | * @opt_param bool validateOnly Optional. If set, validate the request and
|
---|
94 | * preview the Service, but do not actually delete it.
|
---|
95 | * @return Operation
|
---|
96 | * @throws \Google\Service\Exception
|
---|
97 | */
|
---|
98 | public function delete($name, $optParams = [])
|
---|
99 | {
|
---|
100 | $params = ['name' => $name];
|
---|
101 | $params = array_merge($params, $optParams);
|
---|
102 | return $this->call('delete', [$params], Operation::class);
|
---|
103 | }
|
---|
104 | /**
|
---|
105 | * Execute any GraphQL query and mutation against the Firebase Data Connect's
|
---|
106 | * generated GraphQL schema. Grants full read and write access to the connected
|
---|
107 | * data sources. Note: Use introspection query to explore the generated GraphQL
|
---|
108 | * schema. (services.executeGraphql)
|
---|
109 | *
|
---|
110 | * @param string $name Required. The relative resource name of Firebase Data
|
---|
111 | * Connect service, in the format: ```
|
---|
112 | * projects/{project}/locations/{location}/services/{service} ```
|
---|
113 | * @param GraphqlRequest $postBody
|
---|
114 | * @param array $optParams Optional parameters.
|
---|
115 | * @return GraphqlResponse
|
---|
116 | * @throws \Google\Service\Exception
|
---|
117 | */
|
---|
118 | public function executeGraphql($name, GraphqlRequest $postBody, $optParams = [])
|
---|
119 | {
|
---|
120 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
121 | $params = array_merge($params, $optParams);
|
---|
122 | return $this->call('executeGraphql', [$params], GraphqlResponse::class);
|
---|
123 | }
|
---|
124 | /**
|
---|
125 | * Execute any GraphQL query against the Firebase Data Connect's generated
|
---|
126 | * GraphQL schema. Grants full read to the connected data sources.
|
---|
127 | * `ExecuteGraphqlRead` is identical to `ExecuteGraphql` except it only accepts
|
---|
128 | * read-only query. (services.executeGraphqlRead)
|
---|
129 | *
|
---|
130 | * @param string $name Required. The relative resource name of Firebase Data
|
---|
131 | * Connect service, in the format: ```
|
---|
132 | * projects/{project}/locations/{location}/services/{service} ```
|
---|
133 | * @param GraphqlRequest $postBody
|
---|
134 | * @param array $optParams Optional parameters.
|
---|
135 | * @return GraphqlResponse
|
---|
136 | * @throws \Google\Service\Exception
|
---|
137 | */
|
---|
138 | public function executeGraphqlRead($name, GraphqlRequest $postBody, $optParams = [])
|
---|
139 | {
|
---|
140 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
141 | $params = array_merge($params, $optParams);
|
---|
142 | return $this->call('executeGraphqlRead', [$params], GraphqlResponse::class);
|
---|
143 | }
|
---|
144 | /**
|
---|
145 | * Gets details of a single Service. (services.get)
|
---|
146 | *
|
---|
147 | * @param string $name Required. The name of the service to retrieve, in the
|
---|
148 | * format: ``` projects/{project}/locations/{location}/services/{service} ```
|
---|
149 | * @param array $optParams Optional parameters.
|
---|
150 | * @return Service
|
---|
151 | * @throws \Google\Service\Exception
|
---|
152 | */
|
---|
153 | public function get($name, $optParams = [])
|
---|
154 | {
|
---|
155 | $params = ['name' => $name];
|
---|
156 | $params = array_merge($params, $optParams);
|
---|
157 | return $this->call('get', [$params], Service::class);
|
---|
158 | }
|
---|
159 | /**
|
---|
160 | * Lists Services in a given project and location.
|
---|
161 | * (services.listProjectsLocationsServices)
|
---|
162 | *
|
---|
163 | * @param string $parent Required. Value of parent.
|
---|
164 | * @param array $optParams Optional parameters.
|
---|
165 | *
|
---|
166 | * @opt_param string filter Optional. Filtering results.
|
---|
167 | * @opt_param string orderBy Optional. Hint for how to order the results.
|
---|
168 | * @opt_param int pageSize Optional. Requested page size. Server may return
|
---|
169 | * fewer items than requested. If unspecified, server will pick an appropriate
|
---|
170 | * default.
|
---|
171 | * @opt_param string pageToken Optional. A page token, received from a previous
|
---|
172 | * `ListServices` call. Provide this to retrieve the subsequent page. When
|
---|
173 | * paginating, all other parameters provided to `ListServices` must match the
|
---|
174 | * call that provided the page token.
|
---|
175 | * @return ListServicesResponse
|
---|
176 | * @throws \Google\Service\Exception
|
---|
177 | */
|
---|
178 | public function listProjectsLocationsServices($parent, $optParams = [])
|
---|
179 | {
|
---|
180 | $params = ['parent' => $parent];
|
---|
181 | $params = array_merge($params, $optParams);
|
---|
182 | return $this->call('list', [$params], ListServicesResponse::class);
|
---|
183 | }
|
---|
184 | /**
|
---|
185 | * Updates the parameters of a single Service. (services.patch)
|
---|
186 | *
|
---|
187 | * @param string $name Identifier. The relative resource name of the Firebase
|
---|
188 | * Data Connect service, in the format: ```
|
---|
189 | * projects/{project}/locations/{location}/services/{service} ``` Note that the
|
---|
190 | * service ID is specific to Firebase Data Connect and does not correspond to
|
---|
191 | * any of the instance IDs of the underlying data source connections.
|
---|
192 | * @param Service $postBody
|
---|
193 | * @param array $optParams Optional parameters.
|
---|
194 | *
|
---|
195 | * @opt_param bool allowMissing Optional. If true and the Service is not found,
|
---|
196 | * a new Service will be created. In this case, `update_mask` is ignored.
|
---|
197 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
198 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
199 | * the server will know to ignore the request if it has already been completed.
|
---|
200 | * The server will guarantee that for at least 60 minutes since the first
|
---|
201 | * request. For example, consider a situation where you make an initial request
|
---|
202 | * and the request times out. If you make the request again with the same
|
---|
203 | * request ID, the server can check if original operation with the same request
|
---|
204 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
205 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
206 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
207 | * (00000000-0000-0000-0000-000000000000).
|
---|
208 | * @opt_param string updateMask Optional. Field mask is used to specify the
|
---|
209 | * fields to be overwritten in the Service resource by the update. The fields
|
---|
210 | * specified in the update_mask are relative to the resource, not the full
|
---|
211 | * request. A field will be overwritten if it is in the mask. If the user does
|
---|
212 | * not provide a mask then all fields will be overwritten.
|
---|
213 | * @opt_param bool validateOnly Optional. If set, validate the request and
|
---|
214 | * preview the Service, but do not actually update it.
|
---|
215 | * @return Operation
|
---|
216 | * @throws \Google\Service\Exception
|
---|
217 | */
|
---|
218 | public function patch($name, Service $postBody, $optParams = [])
|
---|
219 | {
|
---|
220 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
221 | $params = array_merge($params, $optParams);
|
---|
222 | return $this->call('patch', [$params], Operation::class);
|
---|
223 | }
|
---|
224 | }
|
---|
225 |
|
---|
226 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
227 | class_alias(ProjectsLocationsServices::class, 'Google_Service_FirebaseDataConnect_Resource_ProjectsLocationsServices');
|
---|