[e3d4e0a] | 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\CloudHealthcare\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\CloudHealthcare\ExportMessagesRequest;
|
---|
| 21 | use Google\Service\CloudHealthcare\HealthcareEmpty;
|
---|
| 22 | use Google\Service\CloudHealthcare\Hl7V2Store;
|
---|
| 23 | use Google\Service\CloudHealthcare\Hl7V2StoreMetrics;
|
---|
| 24 | use Google\Service\CloudHealthcare\ImportMessagesRequest;
|
---|
| 25 | use Google\Service\CloudHealthcare\ListHl7V2StoresResponse;
|
---|
| 26 | use Google\Service\CloudHealthcare\Operation;
|
---|
| 27 | use Google\Service\CloudHealthcare\Policy;
|
---|
| 28 | use Google\Service\CloudHealthcare\RollbackHl7V2MessagesRequest;
|
---|
| 29 | use Google\Service\CloudHealthcare\SetIamPolicyRequest;
|
---|
| 30 | use Google\Service\CloudHealthcare\TestIamPermissionsRequest;
|
---|
| 31 | use Google\Service\CloudHealthcare\TestIamPermissionsResponse;
|
---|
| 32 |
|
---|
| 33 | /**
|
---|
| 34 | * The "hl7V2Stores" collection of methods.
|
---|
| 35 | * Typical usage is:
|
---|
| 36 | * <code>
|
---|
| 37 | * $healthcareService = new Google\Service\CloudHealthcare(...);
|
---|
| 38 | * $hl7V2Stores = $healthcareService->projects_locations_datasets_hl7V2Stores;
|
---|
| 39 | * </code>
|
---|
| 40 | */
|
---|
| 41 | class ProjectsLocationsDatasetsHl7V2Stores extends \Google\Service\Resource
|
---|
| 42 | {
|
---|
| 43 | /**
|
---|
| 44 | * Creates a new HL7v2 store within the parent dataset. (hl7V2Stores.create)
|
---|
| 45 | *
|
---|
| 46 | * @param string $parent Required. The name of the dataset this HL7v2 store
|
---|
| 47 | * belongs to.
|
---|
| 48 | * @param Hl7V2Store $postBody
|
---|
| 49 | * @param array $optParams Optional parameters.
|
---|
| 50 | *
|
---|
| 51 | * @opt_param string hl7V2StoreId Required. The ID of the HL7v2 store that is
|
---|
| 52 | * being created. The string must match the following regex:
|
---|
| 53 | * `[\p{L}\p{N}_\-\.]{1,256}`.
|
---|
| 54 | * @return Hl7V2Store
|
---|
| 55 | * @throws \Google\Service\Exception
|
---|
| 56 | */
|
---|
| 57 | public function create($parent, Hl7V2Store $postBody, $optParams = [])
|
---|
| 58 | {
|
---|
| 59 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 60 | $params = array_merge($params, $optParams);
|
---|
| 61 | return $this->call('create', [$params], Hl7V2Store::class);
|
---|
| 62 | }
|
---|
| 63 | /**
|
---|
| 64 | * Deletes the specified HL7v2 store and removes all messages that it contains.
|
---|
| 65 | * (hl7V2Stores.delete)
|
---|
| 66 | *
|
---|
| 67 | * @param string $name Required. The resource name of the HL7v2 store to delete.
|
---|
| 68 | * @param array $optParams Optional parameters.
|
---|
| 69 | * @return HealthcareEmpty
|
---|
| 70 | * @throws \Google\Service\Exception
|
---|
| 71 | */
|
---|
| 72 | public function delete($name, $optParams = [])
|
---|
| 73 | {
|
---|
| 74 | $params = ['name' => $name];
|
---|
| 75 | $params = array_merge($params, $optParams);
|
---|
| 76 | return $this->call('delete', [$params], HealthcareEmpty::class);
|
---|
| 77 | }
|
---|
| 78 | /**
|
---|
| 79 | * Exports the messages to a destination. To filter messages to be exported,
|
---|
| 80 | * define a filter using the start and end time, relative to the message
|
---|
| 81 | * generation time (MSH.7). This API returns an Operation that can be used to
|
---|
| 82 | * track the status of the job by calling GetOperation. Immediate fatal errors
|
---|
| 83 | * appear in the error field. Otherwise, when the operation finishes, a detailed
|
---|
| 84 | * response of type ExportMessagesResponse is returned in the response field.
|
---|
| 85 | * The metadata field type for this operation is OperationMetadata.
|
---|
| 86 | * (hl7V2Stores.export)
|
---|
| 87 | *
|
---|
| 88 | * @param string $name Required. The name of the source HL7v2 store, in the
|
---|
| 89 | * format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/h
|
---|
| 90 | * l7v2Stores/{hl7v2_store_id}`
|
---|
| 91 | * @param ExportMessagesRequest $postBody
|
---|
| 92 | * @param array $optParams Optional parameters.
|
---|
| 93 | * @return Operation
|
---|
| 94 | * @throws \Google\Service\Exception
|
---|
| 95 | */
|
---|
| 96 | public function export($name, ExportMessagesRequest $postBody, $optParams = [])
|
---|
| 97 | {
|
---|
| 98 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 99 | $params = array_merge($params, $optParams);
|
---|
| 100 | return $this->call('export', [$params], Operation::class);
|
---|
| 101 | }
|
---|
| 102 | /**
|
---|
| 103 | * Gets the specified HL7v2 store. (hl7V2Stores.get)
|
---|
| 104 | *
|
---|
| 105 | * @param string $name Required. The resource name of the HL7v2 store to get.
|
---|
| 106 | * @param array $optParams Optional parameters.
|
---|
| 107 | * @return Hl7V2Store
|
---|
| 108 | * @throws \Google\Service\Exception
|
---|
| 109 | */
|
---|
| 110 | public function get($name, $optParams = [])
|
---|
| 111 | {
|
---|
| 112 | $params = ['name' => $name];
|
---|
| 113 | $params = array_merge($params, $optParams);
|
---|
| 114 | return $this->call('get', [$params], Hl7V2Store::class);
|
---|
| 115 | }
|
---|
| 116 | /**
|
---|
| 117 | * Gets metrics associated with the HL7v2 store.
|
---|
| 118 | * (hl7V2Stores.getHL7v2StoreMetrics)
|
---|
| 119 | *
|
---|
| 120 | * @param string $name Required. The resource name of the HL7v2 store to get
|
---|
| 121 | * metrics for, in the format `projects/{project_id}/locations/{location_id}/dat
|
---|
| 122 | * asets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.
|
---|
| 123 | * @param array $optParams Optional parameters.
|
---|
| 124 | * @return Hl7V2StoreMetrics
|
---|
| 125 | * @throws \Google\Service\Exception
|
---|
| 126 | */
|
---|
| 127 | public function getHL7v2StoreMetrics($name, $optParams = [])
|
---|
| 128 | {
|
---|
| 129 | $params = ['name' => $name];
|
---|
| 130 | $params = array_merge($params, $optParams);
|
---|
| 131 | return $this->call('getHL7v2StoreMetrics', [$params], Hl7V2StoreMetrics::class);
|
---|
| 132 | }
|
---|
| 133 | /**
|
---|
| 134 | * Gets the access control policy for a resource. Returns an empty policy if the
|
---|
| 135 | * resource exists and does not have a policy set. (hl7V2Stores.getIamPolicy)
|
---|
| 136 | *
|
---|
| 137 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
| 138 | * requested. See [Resource
|
---|
| 139 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
| 140 | * appropriate value for this field.
|
---|
| 141 | * @param array $optParams Optional parameters.
|
---|
| 142 | *
|
---|
| 143 | * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
|
---|
| 144 | * version that will be used to format the policy. Valid values are 0, 1, and 3.
|
---|
| 145 | * Requests specifying an invalid value will be rejected. Requests for policies
|
---|
| 146 | * with any conditional role bindings must specify version 3. Policies with no
|
---|
| 147 | * conditional role bindings may specify any valid value or leave the field
|
---|
| 148 | * unset. The policy in the response might use the policy version that you
|
---|
| 149 | * specified, or it might use a lower policy version. For example, if you
|
---|
| 150 | * specify version 3, but the policy has no conditional role bindings, the
|
---|
| 151 | * response uses version 1. To learn which resources support conditions in their
|
---|
| 152 | * IAM policies, see the [IAM
|
---|
| 153 | * documentation](https://cloud.google.com/iam/help/conditions/resource-
|
---|
| 154 | * policies).
|
---|
| 155 | * @return Policy
|
---|
| 156 | * @throws \Google\Service\Exception
|
---|
| 157 | */
|
---|
| 158 | public function getIamPolicy($resource, $optParams = [])
|
---|
| 159 | {
|
---|
| 160 | $params = ['resource' => $resource];
|
---|
| 161 | $params = array_merge($params, $optParams);
|
---|
| 162 | return $this->call('getIamPolicy', [$params], Policy::class);
|
---|
| 163 | }
|
---|
| 164 | /**
|
---|
| 165 | * Import messages to the HL7v2 store by loading data from the specified
|
---|
| 166 | * sources. This method is optimized to load large quantities of data using
|
---|
| 167 | * import semantics that ignore some HL7v2 store configuration options and are
|
---|
| 168 | * not suitable for all use cases. It is primarily intended to load data into an
|
---|
| 169 | * empty HL7v2 store that is not being used by other clients. An existing
|
---|
| 170 | * message will be overwritten if a duplicate message is imported. A duplicate
|
---|
| 171 | * message is a message with the same raw bytes as a message that already exists
|
---|
| 172 | * in this HL7v2 store. When a message is overwritten, its labels will also be
|
---|
| 173 | * overwritten. The import operation is idempotent unless the input data
|
---|
| 174 | * contains multiple valid messages with the same raw bytes but different
|
---|
| 175 | * labels. In that case, after the import completes, the store contains exactly
|
---|
| 176 | * one message with those raw bytes but there is no ordering guarantee on which
|
---|
| 177 | * version of the labels it has. The operation result counters do not count
|
---|
| 178 | * duplicated raw bytes as an error and count one success for each message in
|
---|
| 179 | * the input, which might result in a success count larger than the number of
|
---|
| 180 | * messages in the HL7v2 store. If some messages fail to import, for example due
|
---|
| 181 | * to parsing errors, successfully imported messages are not rolled back. This
|
---|
| 182 | * method returns an Operation that can be used to track the status of the
|
---|
| 183 | * import by calling GetOperation. Immediate fatal errors appear in the error
|
---|
| 184 | * field, errors are also logged to Cloud Logging (see [Viewing error logs in
|
---|
| 185 | * Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)).
|
---|
| 186 | * Otherwise, when the operation finishes, a response of type
|
---|
| 187 | * ImportMessagesResponse is returned in the response field. The metadata field
|
---|
| 188 | * type for this operation is OperationMetadata. (hl7V2Stores.import)
|
---|
| 189 | *
|
---|
| 190 | * @param string $name Required. The name of the target HL7v2 store, in the
|
---|
| 191 | * format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/h
|
---|
| 192 | * l7v2Stores/{hl7v2_store_id}`
|
---|
| 193 | * @param ImportMessagesRequest $postBody
|
---|
| 194 | * @param array $optParams Optional parameters.
|
---|
| 195 | * @return Operation
|
---|
| 196 | * @throws \Google\Service\Exception
|
---|
| 197 | */
|
---|
| 198 | public function import($name, ImportMessagesRequest $postBody, $optParams = [])
|
---|
| 199 | {
|
---|
| 200 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 201 | $params = array_merge($params, $optParams);
|
---|
| 202 | return $this->call('import', [$params], Operation::class);
|
---|
| 203 | }
|
---|
| 204 | /**
|
---|
| 205 | * Lists the HL7v2 stores in the given dataset.
|
---|
| 206 | * (hl7V2Stores.listProjectsLocationsDatasetsHl7V2Stores)
|
---|
| 207 | *
|
---|
| 208 | * @param string $parent Required. Name of the dataset.
|
---|
| 209 | * @param array $optParams Optional parameters.
|
---|
| 210 | *
|
---|
| 211 | * @opt_param string filter Restricts stores returned to those matching a
|
---|
| 212 | * filter. The following syntax is available: * A string field value can be
|
---|
| 213 | * written as text inside quotation marks, for example `"query text"`. The only
|
---|
| 214 | * valid relational operation for text fields is equality (`=`), where text is
|
---|
| 215 | * searched within the field, rather than having the field be equal to the text.
|
---|
| 216 | * For example, `"Comment = great"` returns messages with `great` in the comment
|
---|
| 217 | * field. * A number field value can be written as an integer, a decimal, or an
|
---|
| 218 | * exponential. The valid relational operators for number fields are the
|
---|
| 219 | * equality operator (`=`), along with the less than/greater than operators
|
---|
| 220 | * (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You
|
---|
| 221 | * can prepend the `NOT` operator to an expression to negate it. * A date field
|
---|
| 222 | * value must be written in `yyyy-mm-dd` form. Fields with date and time use the
|
---|
| 223 | * RFC3339 time format. Leading zeros are required for one-digit months and
|
---|
| 224 | * days. The valid relational operators for date fields are the equality
|
---|
| 225 | * operator (`=`) , along with the less than/greater than operators (`<`, `<=`,
|
---|
| 226 | * `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend
|
---|
| 227 | * the `NOT` operator to an expression to negate it. * Multiple field query
|
---|
| 228 | * expressions can be combined in one query by adding `AND` or `OR` operators
|
---|
| 229 | * between the expressions. If a boolean operator appears within a quoted
|
---|
| 230 | * string, it is not treated as special, it's just another part of the character
|
---|
| 231 | * string to be matched. You can prepend the `NOT` operator to an expression to
|
---|
| 232 | * negate it. Only filtering on labels is supported. For example,
|
---|
| 233 | * `labels.key=value`.
|
---|
| 234 | * @opt_param int pageSize Limit on the number of HL7v2 stores to return in a
|
---|
| 235 | * single response. If not specified, 100 is used. May not be larger than 1000.
|
---|
| 236 | * @opt_param string pageToken The next_page_token value returned from the
|
---|
| 237 | * previous List request, if any.
|
---|
| 238 | * @return ListHl7V2StoresResponse
|
---|
| 239 | * @throws \Google\Service\Exception
|
---|
| 240 | */
|
---|
| 241 | public function listProjectsLocationsDatasetsHl7V2Stores($parent, $optParams = [])
|
---|
| 242 | {
|
---|
| 243 | $params = ['parent' => $parent];
|
---|
| 244 | $params = array_merge($params, $optParams);
|
---|
| 245 | return $this->call('list', [$params], ListHl7V2StoresResponse::class);
|
---|
| 246 | }
|
---|
| 247 | /**
|
---|
| 248 | * Updates the HL7v2 store. (hl7V2Stores.patch)
|
---|
| 249 | *
|
---|
| 250 | * @param string $name Identifier. Resource name of the HL7v2 store, of the form
|
---|
| 251 | * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Sto
|
---|
| 252 | * res/{hl7v2_store_id}`.
|
---|
| 253 | * @param Hl7V2Store $postBody
|
---|
| 254 | * @param array $optParams Optional parameters.
|
---|
| 255 | *
|
---|
| 256 | * @opt_param string updateMask Required. The update mask applies to the
|
---|
| 257 | * resource. For the `FieldMask` definition, see
|
---|
| 258 | * https://developers.google.com/protocol-
|
---|
| 259 | * buffers/docs/reference/google.protobuf#fieldmask
|
---|
| 260 | * @return Hl7V2Store
|
---|
| 261 | * @throws \Google\Service\Exception
|
---|
| 262 | */
|
---|
| 263 | public function patch($name, Hl7V2Store $postBody, $optParams = [])
|
---|
| 264 | {
|
---|
| 265 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 266 | $params = array_merge($params, $optParams);
|
---|
| 267 | return $this->call('patch', [$params], Hl7V2Store::class);
|
---|
| 268 | }
|
---|
| 269 | /**
|
---|
| 270 | * Rolls back messages from the HL7v2 store to the specified time. This method
|
---|
| 271 | * returns an Operation that can be used to track the status of the rollback by
|
---|
| 272 | * calling GetOperation. Immediate fatal errors appear in the error field,
|
---|
| 273 | * errors are also logged to Cloud Logging (see [Viewing error logs in Cloud
|
---|
| 274 | * Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)).
|
---|
| 275 | * Otherwise, when the operation finishes, a detailed response of type
|
---|
| 276 | * RollbackHl7V2MessagesResponse is returned in the response field. The metadata
|
---|
| 277 | * field type for this operation is OperationMetadata. (hl7V2Stores.rollback)
|
---|
| 278 | *
|
---|
| 279 | * @param string $name Required. The name of the HL7v2 store to rollback, in the
|
---|
| 280 | * format of
|
---|
| 281 | * "projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
|
---|
| 282 | * /hl7V2Stores/{hl7v2_store_id}".
|
---|
| 283 | * @param RollbackHl7V2MessagesRequest $postBody
|
---|
| 284 | * @param array $optParams Optional parameters.
|
---|
| 285 | * @return Operation
|
---|
| 286 | * @throws \Google\Service\Exception
|
---|
| 287 | */
|
---|
| 288 | public function rollback($name, RollbackHl7V2MessagesRequest $postBody, $optParams = [])
|
---|
| 289 | {
|
---|
| 290 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 291 | $params = array_merge($params, $optParams);
|
---|
| 292 | return $this->call('rollback', [$params], Operation::class);
|
---|
| 293 | }
|
---|
| 294 | /**
|
---|
| 295 | * Sets the access control policy on the specified resource. Replaces any
|
---|
| 296 | * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
|
---|
| 297 | * `PERMISSION_DENIED` errors. (hl7V2Stores.setIamPolicy)
|
---|
| 298 | *
|
---|
| 299 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
| 300 | * specified. See [Resource
|
---|
| 301 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
| 302 | * appropriate value for this field.
|
---|
| 303 | * @param SetIamPolicyRequest $postBody
|
---|
| 304 | * @param array $optParams Optional parameters.
|
---|
| 305 | * @return Policy
|
---|
| 306 | * @throws \Google\Service\Exception
|
---|
| 307 | */
|
---|
| 308 | public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
|
---|
| 309 | {
|
---|
| 310 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
| 311 | $params = array_merge($params, $optParams);
|
---|
| 312 | return $this->call('setIamPolicy', [$params], Policy::class);
|
---|
| 313 | }
|
---|
| 314 | /**
|
---|
| 315 | * Returns permissions that a caller has on the specified resource. If the
|
---|
| 316 | * resource does not exist, this will return an empty set of permissions, not a
|
---|
| 317 | * `NOT_FOUND` error. Note: This operation is designed to be used for building
|
---|
| 318 | * permission-aware UIs and command-line tools, not for authorization checking.
|
---|
| 319 | * This operation may "fail open" without warning.
|
---|
| 320 | * (hl7V2Stores.testIamPermissions)
|
---|
| 321 | *
|
---|
| 322 | * @param string $resource REQUIRED: The resource for which the policy detail is
|
---|
| 323 | * being requested. See [Resource
|
---|
| 324 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
| 325 | * appropriate value for this field.
|
---|
| 326 | * @param TestIamPermissionsRequest $postBody
|
---|
| 327 | * @param array $optParams Optional parameters.
|
---|
| 328 | * @return TestIamPermissionsResponse
|
---|
| 329 | * @throws \Google\Service\Exception
|
---|
| 330 | */
|
---|
| 331 | public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
|
---|
| 332 | {
|
---|
| 333 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
| 334 | $params = array_merge($params, $optParams);
|
---|
| 335 | return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
|
---|
| 336 | }
|
---|
| 337 | }
|
---|
| 338 |
|
---|
| 339 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 340 | class_alias(ProjectsLocationsDatasetsHl7V2Stores::class, 'Google_Service_CloudHealthcare_Resource_ProjectsLocationsDatasetsHl7V2Stores');
|
---|