source: vendor/google/apiclient-services/src/CloudHealthcare/Resource/ProjectsLocationsDatasetsFhirStores.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 2 weeks ago

Upload project files

  • Property mode set to 100644
File size: 19.5 KB
Line 
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\CloudHealthcare\Resource;
19
20use Google\Service\CloudHealthcare\DeidentifyFhirStoreRequest;
21use Google\Service\CloudHealthcare\ExportResourcesRequest;
22use Google\Service\CloudHealthcare\FhirStore;
23use Google\Service\CloudHealthcare\FhirStoreMetrics;
24use Google\Service\CloudHealthcare\HealthcareEmpty;
25use Google\Service\CloudHealthcare\ImportResourcesRequest;
26use Google\Service\CloudHealthcare\ListFhirStoresResponse;
27use Google\Service\CloudHealthcare\Operation;
28use Google\Service\CloudHealthcare\Policy;
29use Google\Service\CloudHealthcare\RollbackFhirResourcesRequest;
30use Google\Service\CloudHealthcare\SetIamPolicyRequest;
31use Google\Service\CloudHealthcare\TestIamPermissionsRequest;
32use Google\Service\CloudHealthcare\TestIamPermissionsResponse;
33
34/**
35 * The "fhirStores" collection of methods.
36 * Typical usage is:
37 * <code>
38 * $healthcareService = new Google\Service\CloudHealthcare(...);
39 * $fhirStores = $healthcareService->projects_locations_datasets_fhirStores;
40 * </code>
41 */
42class ProjectsLocationsDatasetsFhirStores extends \Google\Service\Resource
43{
44 /**
45 * Creates a new FHIR store within the parent dataset. (fhirStores.create)
46 *
47 * @param string $parent Required. The name of the dataset this FHIR store
48 * belongs to.
49 * @param FhirStore $postBody
50 * @param array $optParams Optional parameters.
51 *
52 * @opt_param string fhirStoreId Required. The ID of the FHIR store that is
53 * being created. The string must match the following regex:
54 * `[\p{L}\p{N}_\-\.]{1,256}`.
55 * @return FhirStore
56 * @throws \Google\Service\Exception
57 */
58 public function create($parent, FhirStore $postBody, $optParams = [])
59 {
60 $params = ['parent' => $parent, 'postBody' => $postBody];
61 $params = array_merge($params, $optParams);
62 return $this->call('create', [$params], FhirStore::class);
63 }
64 /**
65 * De-identifies data from the source store and writes it to the destination
66 * store. The metadata field type is OperationMetadata. If the request is
67 * successful, the response field type is DeidentifyFhirStoreSummary. If errors
68 * occur, error is set. Error details are also logged to Cloud Logging (see
69 * [Viewing error logs in Cloud
70 * Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)).
71 * (fhirStores.deidentify)
72 *
73 * @param string $sourceStore Required. Source FHIR store resource name. For
74 * example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
75 * /fhirStores/{fhir_store_id}`.
76 * @param DeidentifyFhirStoreRequest $postBody
77 * @param array $optParams Optional parameters.
78 * @return Operation
79 * @throws \Google\Service\Exception
80 */
81 public function deidentify($sourceStore, DeidentifyFhirStoreRequest $postBody, $optParams = [])
82 {
83 $params = ['sourceStore' => $sourceStore, 'postBody' => $postBody];
84 $params = array_merge($params, $optParams);
85 return $this->call('deidentify', [$params], Operation::class);
86 }
87 /**
88 * Deletes the specified FHIR store and removes all resources within it.
89 * (fhirStores.delete)
90 *
91 * @param string $name Required. The resource name of the FHIR store to delete.
92 * @param array $optParams Optional parameters.
93 * @return HealthcareEmpty
94 * @throws \Google\Service\Exception
95 */
96 public function delete($name, $optParams = [])
97 {
98 $params = ['name' => $name];
99 $params = array_merge($params, $optParams);
100 return $this->call('delete', [$params], HealthcareEmpty::class);
101 }
102 /**
103 * Export resources from the FHIR store to the specified destination. This
104 * method returns an Operation that can be used to track the status of the
105 * export by calling GetOperation. Immediate fatal errors appear in the error
106 * field, errors are also logged to Cloud Logging (see [Viewing error logs in
107 * Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)).
108 * Otherwise, when the operation finishes, a detailed response of type
109 * ExportResourcesResponse is returned in the response field. The metadata field
110 * type for this operation is OperationMetadata. (fhirStores.export)
111 *
112 * @param string $name Required. The name of the FHIR store to export resource
113 * from, in the format of `projects/{project_id}/locations/{location_id}/dataset
114 * s/{dataset_id}/fhirStores/{fhir_store_id}`.
115 * @param ExportResourcesRequest $postBody
116 * @param array $optParams Optional parameters.
117 * @return Operation
118 * @throws \Google\Service\Exception
119 */
120 public function export($name, ExportResourcesRequest $postBody, $optParams = [])
121 {
122 $params = ['name' => $name, 'postBody' => $postBody];
123 $params = array_merge($params, $optParams);
124 return $this->call('export', [$params], Operation::class);
125 }
126 /**
127 * Gets the configuration of the specified FHIR store. (fhirStores.get)
128 *
129 * @param string $name Required. The resource name of the FHIR store to get.
130 * @param array $optParams Optional parameters.
131 * @return FhirStore
132 * @throws \Google\Service\Exception
133 */
134 public function get($name, $optParams = [])
135 {
136 $params = ['name' => $name];
137 $params = array_merge($params, $optParams);
138 return $this->call('get', [$params], FhirStore::class);
139 }
140 /**
141 * Gets metrics associated with the FHIR store. (fhirStores.getFHIRStoreMetrics)
142 *
143 * @param string $name Required. The resource name of the FHIR store to get
144 * metrics for.
145 * @param array $optParams Optional parameters.
146 * @return FhirStoreMetrics
147 * @throws \Google\Service\Exception
148 */
149 public function getFHIRStoreMetrics($name, $optParams = [])
150 {
151 $params = ['name' => $name];
152 $params = array_merge($params, $optParams);
153 return $this->call('getFHIRStoreMetrics', [$params], FhirStoreMetrics::class);
154 }
155 /**
156 * Gets the access control policy for a resource. Returns an empty policy if the
157 * resource exists and does not have a policy set. (fhirStores.getIamPolicy)
158 *
159 * @param string $resource REQUIRED: The resource for which the policy is being
160 * requested. See [Resource
161 * names](https://cloud.google.com/apis/design/resource_names) for the
162 * appropriate value for this field.
163 * @param array $optParams Optional parameters.
164 *
165 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
166 * version that will be used to format the policy. Valid values are 0, 1, and 3.
167 * Requests specifying an invalid value will be rejected. Requests for policies
168 * with any conditional role bindings must specify version 3. Policies with no
169 * conditional role bindings may specify any valid value or leave the field
170 * unset. The policy in the response might use the policy version that you
171 * specified, or it might use a lower policy version. For example, if you
172 * specify version 3, but the policy has no conditional role bindings, the
173 * response uses version 1. To learn which resources support conditions in their
174 * IAM policies, see the [IAM
175 * documentation](https://cloud.google.com/iam/help/conditions/resource-
176 * policies).
177 * @return Policy
178 * @throws \Google\Service\Exception
179 */
180 public function getIamPolicy($resource, $optParams = [])
181 {
182 $params = ['resource' => $resource];
183 $params = array_merge($params, $optParams);
184 return $this->call('getIamPolicy', [$params], Policy::class);
185 }
186 /**
187 * Imports resources to the FHIR store by loading data from the specified
188 * sources. This method is optimized to load large quantities of data using
189 * import semantics that ignore some FHIR store configuration options and are
190 * not suitable for all use cases. It is primarily intended to load data into an
191 * empty FHIR store that is not being used by other clients. In cases where this
192 * method is not appropriate, consider using ExecuteBundle to load data. Every
193 * resource in the input must contain a client-supplied ID. Each resource is
194 * stored using the supplied ID regardless of the enable_update_create setting
195 * on the FHIR store. It is strongly advised not to include or encode any
196 * sensitive data such as patient identifiers in client-specified resource IDs.
197 * Those IDs are part of the FHIR resource path recorded in Cloud Audit Logs and
198 * Cloud Pub/Sub notifications. Those IDs can also be contained in reference
199 * fields within other resources. The import process does not enforce
200 * referential integrity, regardless of the disable_referential_integrity
201 * setting on the FHIR store. This allows the import of resources with arbitrary
202 * interdependencies without considering grouping or ordering, but if the input
203 * data contains invalid references or if some resources fail to be imported,
204 * the FHIR store might be left in a state that violates referential integrity.
205 * The import process does not trigger Pub/Sub notification or BigQuery
206 * streaming update, regardless of how those are configured on the FHIR store.
207 * If a resource with the specified ID already exists, the most recent version
208 * of the resource is overwritten without creating a new historical version,
209 * regardless of the disable_resource_versioning setting on the FHIR store. If
210 * transient failures occur during the import, it's possible that successfully
211 * imported resources will be overwritten more than once. The import operation
212 * is idempotent unless the input data contains multiple valid resources with
213 * the same ID but different contents. In that case, after the import completes,
214 * the store contains exactly one resource with that ID but there is no ordering
215 * guarantee on which version of the contents it will have. The operation result
216 * counters do not count duplicate IDs as an error and count one success for
217 * each resource in the input, which might result in a success count larger than
218 * the number of resources in the FHIR store. This often occurs when importing
219 * data organized in bundles produced by Patient-everything where each bundle
220 * contains its own copy of a resource such as Practitioner that might be
221 * referred to by many patients. If some resources fail to import, for example
222 * due to parsing errors, successfully imported resources are not rolled back.
223 * The location and format of the input data is specified by the parameters in
224 * ImportResourcesRequest. Note that if no format is specified, this method
225 * assumes the `BUNDLE` format. When using the `BUNDLE` format this method
226 * ignores the `Bundle.type` field, except that `history` bundles are rejected,
227 * and does not apply any of the bundle processing semantics for batch or
228 * transaction bundles. Unlike in ExecuteBundle, transaction bundles are not
229 * executed as a single transaction and bundle-internal references are not
230 * rewritten. The bundle is treated as a collection of resources to be written
231 * as provided in `Bundle.entry.resource`, ignoring `Bundle.entry.request`. As
232 * an example, this allows the import of `searchset` bundles produced by a FHIR
233 * search or Patient-everything operation. This method returns an Operation that
234 * can be used to track the status of the import by calling GetOperation.
235 * Immediate fatal errors appear in the error field, errors are also logged to
236 * Cloud Logging (see [Viewing error logs in Cloud
237 * Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)).
238 * Otherwise, when the operation finishes, a detailed response of type
239 * ImportResourcesResponse is returned in the response field. The metadata field
240 * type for this operation is OperationMetadata. (fhirStores.import)
241 *
242 * @param string $name Required. The name of the FHIR store to import FHIR
243 * resources to, in the format of `projects/{project_id}/locations/{location_id}
244 * /datasets/{dataset_id}/fhirStores/{fhir_store_id}`.
245 * @param ImportResourcesRequest $postBody
246 * @param array $optParams Optional parameters.
247 * @return Operation
248 * @throws \Google\Service\Exception
249 */
250 public function import($name, ImportResourcesRequest $postBody, $optParams = [])
251 {
252 $params = ['name' => $name, 'postBody' => $postBody];
253 $params = array_merge($params, $optParams);
254 return $this->call('import', [$params], Operation::class);
255 }
256 /**
257 * Lists the FHIR stores in the given dataset.
258 * (fhirStores.listProjectsLocationsDatasetsFhirStores)
259 *
260 * @param string $parent Required. Name of the dataset.
261 * @param array $optParams Optional parameters.
262 *
263 * @opt_param string filter Restricts stores returned to those matching a
264 * filter. The following syntax is available: * A string field value can be
265 * written as text inside quotation marks, for example `"query text"`. The only
266 * valid relational operation for text fields is equality (`=`), where text is
267 * searched within the field, rather than having the field be equal to the text.
268 * For example, `"Comment = great"` returns messages with `great` in the comment
269 * field. * A number field value can be written as an integer, a decimal, or an
270 * exponential. The valid relational operators for number fields are the
271 * equality operator (`=`), along with the less than/greater than operators
272 * (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You
273 * can prepend the `NOT` operator to an expression to negate it. * A date field
274 * value must be written in `yyyy-mm-dd` form. Fields with date and time use the
275 * RFC3339 time format. Leading zeros are required for one-digit months and
276 * days. The valid relational operators for date fields are the equality
277 * operator (`=`) , along with the less than/greater than operators (`<`, `<=`,
278 * `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend
279 * the `NOT` operator to an expression to negate it. * Multiple field query
280 * expressions can be combined in one query by adding `AND` or `OR` operators
281 * between the expressions. If a boolean operator appears within a quoted
282 * string, it is not treated as special, it's just another part of the character
283 * string to be matched. You can prepend the `NOT` operator to an expression to
284 * negate it. Only filtering on labels is supported, for example
285 * `labels.key=value`.
286 * @opt_param int pageSize Limit on the number of FHIR stores to return in a
287 * single response. If not specified, 100 is used. May not be larger than 1000.
288 * @opt_param string pageToken The next_page_token value returned from the
289 * previous List request, if any.
290 * @return ListFhirStoresResponse
291 * @throws \Google\Service\Exception
292 */
293 public function listProjectsLocationsDatasetsFhirStores($parent, $optParams = [])
294 {
295 $params = ['parent' => $parent];
296 $params = array_merge($params, $optParams);
297 return $this->call('list', [$params], ListFhirStoresResponse::class);
298 }
299 /**
300 * Updates the configuration of the specified FHIR store. (fhirStores.patch)
301 *
302 * @param string $name Output only. Identifier. Resource name of the FHIR store,
303 * of the form `projects/{project_id}/locations/{location}/datasets/{dataset_id}
304 * /fhirStores/{fhir_store_id}`.
305 * @param FhirStore $postBody
306 * @param array $optParams Optional parameters.
307 *
308 * @opt_param string updateMask Required. The update mask applies to the
309 * resource. For the `FieldMask` definition, see
310 * https://developers.google.com/protocol-
311 * buffers/docs/reference/google.protobuf#fieldmask
312 * @return FhirStore
313 * @throws \Google\Service\Exception
314 */
315 public function patch($name, FhirStore $postBody, $optParams = [])
316 {
317 $params = ['name' => $name, 'postBody' => $postBody];
318 $params = array_merge($params, $optParams);
319 return $this->call('patch', [$params], FhirStore::class);
320 }
321 /**
322 * Rolls back resources from the FHIR store to the specified time. This method
323 * returns an Operation that can be used to track the status of the rollback by
324 * calling GetOperation. Immediate fatal errors appear in the error field,
325 * errors are also logged to Cloud Logging (see [Viewing error logs in Cloud
326 * Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)).
327 * Otherwise, when the operation finishes, a detailed response of type
328 * RollbackFhirResourcesResponse is returned in the response field. The metadata
329 * field type for this operation is OperationMetadata. (fhirStores.rollback)
330 *
331 * @param string $name Required. The name of the FHIR store to rollback, in the
332 * format of
333 * "projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
334 * /fhirStores/{fhir_store_id}".
335 * @param RollbackFhirResourcesRequest $postBody
336 * @param array $optParams Optional parameters.
337 * @return Operation
338 * @throws \Google\Service\Exception
339 */
340 public function rollback($name, RollbackFhirResourcesRequest $postBody, $optParams = [])
341 {
342 $params = ['name' => $name, 'postBody' => $postBody];
343 $params = array_merge($params, $optParams);
344 return $this->call('rollback', [$params], Operation::class);
345 }
346 /**
347 * Sets the access control policy on the specified resource. Replaces any
348 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
349 * `PERMISSION_DENIED` errors. (fhirStores.setIamPolicy)
350 *
351 * @param string $resource REQUIRED: The resource for which the policy is being
352 * specified. See [Resource
353 * names](https://cloud.google.com/apis/design/resource_names) for the
354 * appropriate value for this field.
355 * @param SetIamPolicyRequest $postBody
356 * @param array $optParams Optional parameters.
357 * @return Policy
358 * @throws \Google\Service\Exception
359 */
360 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
361 {
362 $params = ['resource' => $resource, 'postBody' => $postBody];
363 $params = array_merge($params, $optParams);
364 return $this->call('setIamPolicy', [$params], Policy::class);
365 }
366 /**
367 * Returns permissions that a caller has on the specified resource. If the
368 * resource does not exist, this will return an empty set of permissions, not a
369 * `NOT_FOUND` error. Note: This operation is designed to be used for building
370 * permission-aware UIs and command-line tools, not for authorization checking.
371 * This operation may "fail open" without warning.
372 * (fhirStores.testIamPermissions)
373 *
374 * @param string $resource REQUIRED: The resource for which the policy detail is
375 * being requested. See [Resource
376 * names](https://cloud.google.com/apis/design/resource_names) for the
377 * appropriate value for this field.
378 * @param TestIamPermissionsRequest $postBody
379 * @param array $optParams Optional parameters.
380 * @return TestIamPermissionsResponse
381 * @throws \Google\Service\Exception
382 */
383 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
384 {
385 $params = ['resource' => $resource, 'postBody' => $postBody];
386 $params = array_merge($params, $optParams);
387 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
388 }
389}
390
391// Adding a class alias for backwards compatibility with the previous class name.
392class_alias(ProjectsLocationsDatasetsFhirStores::class, 'Google_Service_CloudHealthcare_Resource_ProjectsLocationsDatasetsFhirStores');
Note: See TracBrowser for help on using the repository browser.