source: vendor/google/apiclient-services/src/CloudHealthcare/Resource/ProjectsLocationsDatasets.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload new project files

  • Property mode set to 100644
File size: 10.3 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\Dataset;
21use Google\Service\CloudHealthcare\DeidentifyDatasetRequest;
22use Google\Service\CloudHealthcare\HealthcareEmpty;
23use Google\Service\CloudHealthcare\ListDatasetsResponse;
24use Google\Service\CloudHealthcare\Operation;
25use Google\Service\CloudHealthcare\Policy;
26use Google\Service\CloudHealthcare\SetIamPolicyRequest;
27use Google\Service\CloudHealthcare\TestIamPermissionsRequest;
28use Google\Service\CloudHealthcare\TestIamPermissionsResponse;
29
30/**
31 * The "datasets" collection of methods.
32 * Typical usage is:
33 * <code>
34 * $healthcareService = new Google\Service\CloudHealthcare(...);
35 * $datasets = $healthcareService->projects_locations_datasets;
36 * </code>
37 */
38class ProjectsLocationsDatasets extends \Google\Service\Resource
39{
40 /**
41 * Creates a new health dataset. Results are returned through the Operation
42 * interface which returns either an `Operation.response` which contains a
43 * Dataset or `Operation.error`. The metadata field type is OperationMetadata.
44 * (datasets.create)
45 *
46 * @param string $parent Required. The name of the project where the server
47 * creates the dataset. For example,
48 * `projects/{project_id}/locations/{location_id}`.
49 * @param Dataset $postBody
50 * @param array $optParams Optional parameters.
51 *
52 * @opt_param string datasetId Required. The ID of the dataset that is being
53 * created. The string must match the following regex:
54 * `[\p{L}\p{N}_\-\.]{1,256}`.
55 * @return Operation
56 * @throws \Google\Service\Exception
57 */
58 public function create($parent, Dataset $postBody, $optParams = [])
59 {
60 $params = ['parent' => $parent, 'postBody' => $postBody];
61 $params = array_merge($params, $optParams);
62 return $this->call('create', [$params], Operation::class);
63 }
64 /**
65 * Creates a new dataset containing de-identified data from the source dataset.
66 * The metadata field type is OperationMetadata. If the request is successful,
67 * the response field type is DeidentifySummary. If errors occur, error is set.
68 * The LRO result may still be successful if de-identification fails for some
69 * DICOM instances. The new de-identified dataset will not contain these failed
70 * resources. Failed resource totals are tracked in Operation.metadata. Error
71 * details are also logged to Cloud Logging. For more information, see [Viewing
72 * error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-
73 * tos/logging). (datasets.deidentify)
74 *
75 * @param string $sourceDataset Required. Source dataset resource name. For
76 * example,
77 * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.
78 * @param DeidentifyDatasetRequest $postBody
79 * @param array $optParams Optional parameters.
80 * @return Operation
81 * @throws \Google\Service\Exception
82 */
83 public function deidentify($sourceDataset, DeidentifyDatasetRequest $postBody, $optParams = [])
84 {
85 $params = ['sourceDataset' => $sourceDataset, 'postBody' => $postBody];
86 $params = array_merge($params, $optParams);
87 return $this->call('deidentify', [$params], Operation::class);
88 }
89 /**
90 * Deletes the specified health dataset and all data contained in the dataset.
91 * Deleting a dataset does not affect the sources from which the dataset was
92 * imported (if any). (datasets.delete)
93 *
94 * @param string $name Required. The name of the dataset to delete. For example,
95 * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.
96 * @param array $optParams Optional parameters.
97 * @return HealthcareEmpty
98 * @throws \Google\Service\Exception
99 */
100 public function delete($name, $optParams = [])
101 {
102 $params = ['name' => $name];
103 $params = array_merge($params, $optParams);
104 return $this->call('delete', [$params], HealthcareEmpty::class);
105 }
106 /**
107 * Gets any metadata associated with a dataset. (datasets.get)
108 *
109 * @param string $name Required. The name of the dataset to read. For example,
110 * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.
111 * @param array $optParams Optional parameters.
112 * @return Dataset
113 * @throws \Google\Service\Exception
114 */
115 public function get($name, $optParams = [])
116 {
117 $params = ['name' => $name];
118 $params = array_merge($params, $optParams);
119 return $this->call('get', [$params], Dataset::class);
120 }
121 /**
122 * Gets the access control policy for a resource. Returns an empty policy if the
123 * resource exists and does not have a policy set. (datasets.getIamPolicy)
124 *
125 * @param string $resource REQUIRED: The resource for which the policy is being
126 * requested. See [Resource
127 * names](https://cloud.google.com/apis/design/resource_names) for the
128 * appropriate value for this field.
129 * @param array $optParams Optional parameters.
130 *
131 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
132 * version that will be used to format the policy. Valid values are 0, 1, and 3.
133 * Requests specifying an invalid value will be rejected. Requests for policies
134 * with any conditional role bindings must specify version 3. Policies with no
135 * conditional role bindings may specify any valid value or leave the field
136 * unset. The policy in the response might use the policy version that you
137 * specified, or it might use a lower policy version. For example, if you
138 * specify version 3, but the policy has no conditional role bindings, the
139 * response uses version 1. To learn which resources support conditions in their
140 * IAM policies, see the [IAM
141 * documentation](https://cloud.google.com/iam/help/conditions/resource-
142 * policies).
143 * @return Policy
144 * @throws \Google\Service\Exception
145 */
146 public function getIamPolicy($resource, $optParams = [])
147 {
148 $params = ['resource' => $resource];
149 $params = array_merge($params, $optParams);
150 return $this->call('getIamPolicy', [$params], Policy::class);
151 }
152 /**
153 * Lists the health datasets in the current project.
154 * (datasets.listProjectsLocationsDatasets)
155 *
156 * @param string $parent Required. The name of the project whose datasets should
157 * be listed. For example, `projects/{project_id}/locations/{location_id}`.
158 * @param array $optParams Optional parameters.
159 *
160 * @opt_param int pageSize The maximum number of items to return. If not
161 * specified, 100 is used. May not be larger than 1000.
162 * @opt_param string pageToken The next_page_token value returned from a
163 * previous List request, if any.
164 * @return ListDatasetsResponse
165 * @throws \Google\Service\Exception
166 */
167 public function listProjectsLocationsDatasets($parent, $optParams = [])
168 {
169 $params = ['parent' => $parent];
170 $params = array_merge($params, $optParams);
171 return $this->call('list', [$params], ListDatasetsResponse::class);
172 }
173 /**
174 * Updates dataset metadata. (datasets.patch)
175 *
176 * @param string $name Identifier. Resource name of the dataset, of the form
177 * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.
178 * @param Dataset $postBody
179 * @param array $optParams Optional parameters.
180 *
181 * @opt_param string updateMask Required. The update mask applies to the
182 * resource. For the `FieldMask` definition, see
183 * https://developers.google.com/protocol-
184 * buffers/docs/reference/google.protobuf#fieldmask
185 * @return Dataset
186 * @throws \Google\Service\Exception
187 */
188 public function patch($name, Dataset $postBody, $optParams = [])
189 {
190 $params = ['name' => $name, 'postBody' => $postBody];
191 $params = array_merge($params, $optParams);
192 return $this->call('patch', [$params], Dataset::class);
193 }
194 /**
195 * Sets the access control policy on the specified resource. Replaces any
196 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
197 * `PERMISSION_DENIED` errors. (datasets.setIamPolicy)
198 *
199 * @param string $resource REQUIRED: The resource for which the policy is being
200 * specified. See [Resource
201 * names](https://cloud.google.com/apis/design/resource_names) for the
202 * appropriate value for this field.
203 * @param SetIamPolicyRequest $postBody
204 * @param array $optParams Optional parameters.
205 * @return Policy
206 * @throws \Google\Service\Exception
207 */
208 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
209 {
210 $params = ['resource' => $resource, 'postBody' => $postBody];
211 $params = array_merge($params, $optParams);
212 return $this->call('setIamPolicy', [$params], Policy::class);
213 }
214 /**
215 * Returns permissions that a caller has on the specified resource. If the
216 * resource does not exist, this will return an empty set of permissions, not a
217 * `NOT_FOUND` error. Note: This operation is designed to be used for building
218 * permission-aware UIs and command-line tools, not for authorization checking.
219 * This operation may "fail open" without warning. (datasets.testIamPermissions)
220 *
221 * @param string $resource REQUIRED: The resource for which the policy detail is
222 * being requested. See [Resource
223 * names](https://cloud.google.com/apis/design/resource_names) for the
224 * appropriate value for this field.
225 * @param TestIamPermissionsRequest $postBody
226 * @param array $optParams Optional parameters.
227 * @return TestIamPermissionsResponse
228 * @throws \Google\Service\Exception
229 */
230 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
231 {
232 $params = ['resource' => $resource, 'postBody' => $postBody];
233 $params = array_merge($params, $optParams);
234 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
235 }
236}
237
238// Adding a class alias for backwards compatibility with the previous class name.
239class_alias(ProjectsLocationsDatasets::class, 'Google_Service_CloudHealthcare_Resource_ProjectsLocationsDatasets');
Note: See TracBrowser for help on using the repository browser.