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\DeidentifyDicomStoreRequest; 21use Google\Service\CloudHealthcare\DicomStore; 22use Google\Service\CloudHealthcare\ExportDicomDataRequest; 23use Google\Service\CloudHealthcare\HealthcareEmpty; 24use Google\Service\CloudHealthcare\HttpBody; 25use Google\Service\CloudHealthcare\ImportDicomDataRequest; 26use Google\Service\CloudHealthcare\ListDicomStoresResponse; 27use Google\Service\CloudHealthcare\Operation; 28use Google\Service\CloudHealthcare\Policy; 29use Google\Service\CloudHealthcare\SetIamPolicyRequest; 30use Google\Service\CloudHealthcare\TestIamPermissionsRequest; 31use Google\Service\CloudHealthcare\TestIamPermissionsResponse; 32 33/** 34 * The "dicomStores" collection of methods. 35 * Typical usage is: 36 * <code> 37 * $healthcareService = new Google\Service\CloudHealthcare(...); 38 * $dicomStores = $healthcareService->dicomStores; 39 * </code> 40 */ 41class ProjectsLocationsDatasetsDicomStores extends \Google\Service\Resource 42{ 43 /** 44 * Creates a new DICOM store within the parent dataset. (dicomStores.create) 45 * 46 * @param string $parent The name of the dataset this DICOM store belongs to. 47 * @param DicomStore $postBody 48 * @param array $optParams Optional parameters. 49 * 50 * @opt_param string dicomStoreId The ID of the DICOM store that is being 51 * created. Any string value up to 256 characters in length. 52 * @return DicomStore 53 */ 54 public function create($parent, DicomStore $postBody, $optParams = []) 55 { 56 $params = ['parent' => $parent, 'postBody' => $postBody]; 57 $params = array_merge($params, $optParams); 58 return $this->call('create', [$params], DicomStore::class); 59 } 60 /** 61 * De-identifies data from the source store and writes it to the destination 62 * store. The metadata field type is OperationMetadata. If the request is 63 * successful, the response field type is DeidentifyDicomStoreSummary. If errors 64 * occur, error is set. The LRO result may still be successful if de- 65 * identification fails for some DICOM instances. The output DICOM store will 66 * not contain these failed resources. Failed resource totals are tracked in 67 * Operation.metadata. Error details are also logged to Cloud Logging (see 68 * [Viewing error logs in Cloud Logging](/healthcare/docs/how-tos/logging)). 69 * (dicomStores.deidentify) 70 * 71 * @param string $sourceStore Source DICOM store resource name. For example, `pr 72 * ojects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores 73 * /{dicom_store_id}`. 74 * @param DeidentifyDicomStoreRequest $postBody 75 * @param array $optParams Optional parameters. 76 * @return Operation 77 */ 78 public function deidentify($sourceStore, DeidentifyDicomStoreRequest $postBody, $optParams = []) 79 { 80 $params = ['sourceStore' => $sourceStore, 'postBody' => $postBody]; 81 $params = array_merge($params, $optParams); 82 return $this->call('deidentify', [$params], Operation::class); 83 } 84 /** 85 * Deletes the specified DICOM store and removes all images that are contained 86 * within it. (dicomStores.delete) 87 * 88 * @param string $name The resource name of the DICOM store to delete. 89 * @param array $optParams Optional parameters. 90 * @return HealthcareEmpty 91 */ 92 public function delete($name, $optParams = []) 93 { 94 $params = ['name' => $name]; 95 $params = array_merge($params, $optParams); 96 return $this->call('delete', [$params], HealthcareEmpty::class); 97 } 98 /** 99 * Exports data to the specified destination by copying it from the DICOM store. 100 * Errors are also logged to Cloud Logging. For more information, see [Viewing 101 * error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how- 102 * tos/logging). The metadata field type is OperationMetadata. 103 * (dicomStores.export) 104 * 105 * @param string $name The DICOM store resource name from which to export the 106 * data. For example, `projects/{project_id}/locations/{location_id}/datasets/{d 107 * ataset_id}/dicomStores/{dicom_store_id}`. 108 * @param ExportDicomDataRequest $postBody 109 * @param array $optParams Optional parameters. 110 * @return Operation 111 */ 112 public function export($name, ExportDicomDataRequest $postBody, $optParams = []) 113 { 114 $params = ['name' => $name, 'postBody' => $postBody]; 115 $params = array_merge($params, $optParams); 116 return $this->call('export', [$params], Operation::class); 117 } 118 /** 119 * Gets the specified DICOM store. (dicomStores.get) 120 * 121 * @param string $name The resource name of the DICOM store to get. 122 * @param array $optParams Optional parameters. 123 * @return DicomStore 124 */ 125 public function get($name, $optParams = []) 126 { 127 $params = ['name' => $name]; 128 $params = array_merge($params, $optParams); 129 return $this->call('get', [$params], DicomStore::class); 130 } 131 /** 132 * Gets the access control policy for a resource. Returns an empty policy if the 133 * resource exists and does not have a policy set. (dicomStores.getIamPolicy) 134 * 135 * @param string $resource REQUIRED: The resource for which the policy is being 136 * requested. See the operation documentation for the appropriate value for this 137 * field. 138 * @param array $optParams Optional parameters. 139 * 140 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy 141 * version that will be used to format the policy. Valid values are 0, 1, and 3. 142 * Requests specifying an invalid value will be rejected. Requests for policies 143 * with any conditional role bindings must specify version 3. Policies with no 144 * conditional role bindings may specify any valid value or leave the field 145 * unset. The policy in the response might use the policy version that you 146 * specified, or it might use a lower policy version. For example, if you 147 * specify version 3, but the policy has no conditional role bindings, the 148 * response uses version 1. To learn which resources support conditions in their 149 * IAM policies, see the [IAM 150 * documentation](https://cloud.google.com/iam/help/conditions/resource- 151 * policies). 152 * @return Policy 153 */ 154 public function getIamPolicy($resource, $optParams = []) 155 { 156 $params = ['resource' => $resource]; 157 $params = array_merge($params, $optParams); 158 return $this->call('getIamPolicy', [$params], Policy::class); 159 } 160 /** 161 * Imports data into the DICOM store by copying it from the specified source. 162 * Errors are logged to Cloud Logging. For more information, see [Viewing error 163 * logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how- 164 * tos/logging). The metadata field type is OperationMetadata. 165 * (dicomStores.import) 166 * 167 * @param string $name The name of the DICOM store resource into which the data 168 * is imported. For example, `projects/{project_id}/locations/{location_id}/data 169 * sets/{dataset_id}/dicomStores/{dicom_store_id}`. 170 * @param ImportDicomDataRequest $postBody 171 * @param array $optParams Optional parameters. 172 * @return Operation 173 */ 174 public function import($name, ImportDicomDataRequest $postBody, $optParams = []) 175 { 176 $params = ['name' => $name, 'postBody' => $postBody]; 177 $params = array_merge($params, $optParams); 178 return $this->call('import', [$params], Operation::class); 179 } 180 /** 181 * Lists the DICOM stores in the given dataset. 182 * (dicomStores.listProjectsLocationsDatasetsDicomStores) 183 * 184 * @param string $parent Name of the dataset. 185 * @param array $optParams Optional parameters. 186 * 187 * @opt_param string filter Restricts stores returned to those matching a 188 * filter. The following syntax is available: * A string field value can be 189 * written as text inside quotation marks, for example `"query text"`. The only 190 * valid relational operation for text fields is equality (`=`), where text is 191 * searched within the field, rather than having the field be equal to the text. 192 * For example, `"Comment = great"` returns messages with `great` in the comment 193 * field. * A number field value can be written as an integer, a decimal, or an 194 * exponential. The valid relational operators for number fields are the 195 * equality operator (`=`), along with the less than/greater than operators 196 * (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You 197 * can prepend the `NOT` operator to an expression to negate it. * A date field 198 * value must be written in `yyyy-mm-dd` form. Fields with date and time use the 199 * RFC3339 time format. Leading zeros are required for one-digit months and 200 * days. The valid relational operators for date fields are the equality 201 * operator (`=`) , along with the less than/greater than operators (`<`, `<=`, 202 * `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend 203 * the `NOT` operator to an expression to negate it. * Multiple field query 204 * expressions can be combined in one query by adding `AND` or `OR` operators 205 * between the expressions. If a boolean operator appears within a quoted 206 * string, it is not treated as special, it's just another part of the character 207 * string to be matched. You can prepend the `NOT` operator to an expression to 208 * negate it. Only filtering on labels is supported. For example, 209 * `labels.key=value`. 210 * @opt_param int pageSize Limit on the number of DICOM stores to return in a 211 * single response. If not specified, 100 is used. May not be larger than 1000. 212 * @opt_param string pageToken The next_page_token value returned from the 213 * previous List request, if any. 214 * @return ListDicomStoresResponse 215 */ 216 public function listProjectsLocationsDatasetsDicomStores($parent, $optParams = []) 217 { 218 $params = ['parent' => $parent]; 219 $params = array_merge($params, $optParams); 220 return $this->call('list', [$params], ListDicomStoresResponse::class); 221 } 222 /** 223 * Updates the specified DICOM store. (dicomStores.patch) 224 * 225 * @param string $name Resource name of the DICOM store, of the form `projects/{ 226 * project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_ 227 * store_id}`. 228 * @param DicomStore $postBody 229 * @param array $optParams Optional parameters. 230 * 231 * @opt_param string updateMask The update mask applies to the resource. For the 232 * `FieldMask` definition, see https://developers.google.com/protocol- 233 * buffers/docs/reference/google.protobuf#fieldmask 234 * @return DicomStore 235 */ 236 public function patch($name, DicomStore $postBody, $optParams = []) 237 { 238 $params = ['name' => $name, 'postBody' => $postBody]; 239 $params = array_merge($params, $optParams); 240 return $this->call('patch', [$params], DicomStore::class); 241 } 242 /** 243 * SearchForInstances returns a list of matching instances. See [Search 244 * Transaction] (http://dicom.nema.org/medical/dicom/current/output/html/part18. 245 * html#sect_10.6). For details on the implementation of SearchForInstances, see 246 * [Search transaction](https://cloud.google.com/healthcare/docs/dicom#search_tr 247 * ansaction) in the Cloud Healthcare API conformance statement. For samples 248 * that show how to call SearchForInstances, see [Searching for studies, series, 249 * instances, and frames](https://cloud.google.com/healthcare/docs/how- 250 * tos/dicomweb#searching_for_studies_series_instances_and_frames). 251 * (dicomStores.searchForInstances) 252 * 253 * @param string $parent The name of the DICOM store that is being accessed. For 254 * example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 255 * /dicomStores/{dicom_store_id}`. 256 * @param string $dicomWebPath The path of the SearchForInstancesRequest 257 * DICOMweb request. For example, `instances`, `series/{series_uid}/instances`, 258 * or `studies/{study_uid}/instances`. 259 * @param array $optParams Optional parameters. 260 * @return HttpBody 261 */ 262 public function searchForInstances($parent, $dicomWebPath, $optParams = []) 263 { 264 $params = ['parent' => $parent, 'dicomWebPath' => $dicomWebPath]; 265 $params = array_merge($params, $optParams); 266 return $this->call('searchForInstances', [$params], HttpBody::class); 267 } 268 /** 269 * SearchForSeries returns a list of matching series. See [Search Transaction] ( 270 * http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6 271 * ). For details on the implementation of SearchForSeries, see [Search transact 272 * ion](https://cloud.google.com/healthcare/docs/dicom#search_transaction) in 273 * the Cloud Healthcare API conformance statement. For samples that show how to 274 * call SearchForSeries, see [Searching for studies, series, instances, and 275 * frames](https://cloud.google.com/healthcare/docs/how- 276 * tos/dicomweb#searching_for_studies_series_instances_and_frames). 277 * (dicomStores.searchForSeries) 278 * 279 * @param string $parent The name of the DICOM store that is being accessed. For 280 * example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 281 * /dicomStores/{dicom_store_id}`. 282 * @param string $dicomWebPath The path of the SearchForSeries DICOMweb request. 283 * For example, `series` or `studies/{study_uid}/series`. 284 * @param array $optParams Optional parameters. 285 * @return HttpBody 286 */ 287 public function searchForSeries($parent, $dicomWebPath, $optParams = []) 288 { 289 $params = ['parent' => $parent, 'dicomWebPath' => $dicomWebPath]; 290 $params = array_merge($params, $optParams); 291 return $this->call('searchForSeries', [$params], HttpBody::class); 292 } 293 /** 294 * SearchForStudies returns a list of matching studies. See [Search Transaction] 295 * (http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10. 296 * 6). For details on the implementation of SearchForStudies, see [Search transa 297 * ction](https://cloud.google.com/healthcare/docs/dicom#search_transaction) in 298 * the Cloud Healthcare API conformance statement. For samples that show how to 299 * call SearchForStudies, see [Searching for studies, series, instances, and 300 * frames](https://cloud.google.com/healthcare/docs/how- 301 * tos/dicomweb#searching_for_studies_series_instances_and_frames). 302 * (dicomStores.searchForStudies) 303 * 304 * @param string $parent The name of the DICOM store that is being accessed. For 305 * example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 306 * /dicomStores/{dicom_store_id}`. 307 * @param string $dicomWebPath The path of the SearchForStudies DICOMweb 308 * request. For example, `studies`. 309 * @param array $optParams Optional parameters. 310 * @return HttpBody 311 */ 312 public function searchForStudies($parent, $dicomWebPath, $optParams = []) 313 { 314 $params = ['parent' => $parent, 'dicomWebPath' => $dicomWebPath]; 315 $params = array_merge($params, $optParams); 316 return $this->call('searchForStudies', [$params], HttpBody::class); 317 } 318 /** 319 * Sets the access control policy on the specified resource. Replaces any 320 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and 321 * `PERMISSION_DENIED` errors. (dicomStores.setIamPolicy) 322 * 323 * @param string $resource REQUIRED: The resource for which the policy is being 324 * specified. See the operation documentation for the appropriate value for this 325 * field. 326 * @param SetIamPolicyRequest $postBody 327 * @param array $optParams Optional parameters. 328 * @return Policy 329 */ 330 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = []) 331 { 332 $params = ['resource' => $resource, 'postBody' => $postBody]; 333 $params = array_merge($params, $optParams); 334 return $this->call('setIamPolicy', [$params], Policy::class); 335 } 336 /** 337 * StoreInstances stores DICOM instances associated with study instance unique 338 * identifiers (SUID). See [Store Transaction] (http://dicom.nema.org/medical/di 339 * com/current/output/html/part18.html#sect_10.5). For details on the 340 * implementation of StoreInstances, see [Store transaction](https://cloud.googl 341 * e.com/healthcare/docs/dicom#store_transaction) in the Cloud Healthcare API 342 * conformance statement. For samples that show how to call StoreInstances, see 343 * [Storing DICOM data](https://cloud.google.com/healthcare/docs/how- 344 * tos/dicomweb#storing_dicom_data). (dicomStores.storeInstances) 345 * 346 * @param string $parent The name of the DICOM store that is being accessed. For 347 * example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} 348 * /dicomStores/{dicom_store_id}`. 349 * @param string $dicomWebPath The path of the StoreInstances DICOMweb request. 350 * For example, `studies/[{study_uid}]`. Note that the `study_uid` is optional. 351 * @param HttpBody $postBody 352 * @param array $optParams Optional parameters. 353 * @return HttpBody 354 */ 355 public function storeInstances($parent, $dicomWebPath, HttpBody $postBody, $optParams = []) 356 { 357 $params = ['parent' => $parent, 'dicomWebPath' => $dicomWebPath, 'postBody' => $postBody]; 358 $params = array_merge($params, $optParams); 359 return $this->call('storeInstances', [$params], HttpBody::class); 360 } 361 /** 362 * Returns permissions that a caller has on the specified resource. If the 363 * resource does not exist, this will return an empty set of permissions, not a 364 * `NOT_FOUND` error. Note: This operation is designed to be used for building 365 * permission-aware UIs and command-line tools, not for authorization checking. 366 * This operation may "fail open" without warning. 367 * (dicomStores.testIamPermissions) 368 * 369 * @param string $resource REQUIRED: The resource for which the policy detail is 370 * being requested. See the operation documentation for the appropriate value 371 * for this field. 372 * @param TestIamPermissionsRequest $postBody 373 * @param array $optParams Optional parameters. 374 * @return TestIamPermissionsResponse 375 */ 376 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = []) 377 { 378 $params = ['resource' => $resource, 'postBody' => $postBody]; 379 $params = array_merge($params, $optParams); 380 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class); 381 } 382} 383 384// Adding a class alias for backwards compatibility with the previous class name. 385class_alias(ProjectsLocationsDatasetsDicomStores::class, 'Google_Service_CloudHealthcare_Resource_ProjectsLocationsDatasetsDicomStores'); 386