source: vendor/google/apiclient-services/src/DLP/Resource/ProjectsLocationsDlpJobs.php

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

Upload project files

  • Property mode set to 100644
File size: 10.5 KB
RevLine 
[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
18namespace Google\Service\DLP\Resource;
19
20use Google\Service\DLP\GooglePrivacyDlpV2CancelDlpJobRequest;
21use Google\Service\DLP\GooglePrivacyDlpV2CreateDlpJobRequest;
22use Google\Service\DLP\GooglePrivacyDlpV2DlpJob;
23use Google\Service\DLP\GooglePrivacyDlpV2FinishDlpJobRequest;
24use Google\Service\DLP\GooglePrivacyDlpV2HybridInspectDlpJobRequest;
25use Google\Service\DLP\GooglePrivacyDlpV2HybridInspectResponse;
26use Google\Service\DLP\GooglePrivacyDlpV2ListDlpJobsResponse;
27use Google\Service\DLP\GoogleProtobufEmpty;
28
29/**
30 * The "dlpJobs" collection of methods.
31 * Typical usage is:
32 * <code>
33 * $dlpService = new Google\Service\DLP(...);
34 * $dlpJobs = $dlpService->projects_locations_dlpJobs;
35 * </code>
36 */
37class ProjectsLocationsDlpJobs extends \Google\Service\Resource
38{
39 /**
40 * Starts asynchronous cancellation on a long-running DlpJob. The server makes a
41 * best effort to cancel the DlpJob, but success is not guaranteed. See
42 * https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage
43 * and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-
44 * analysis to learn more. (dlpJobs.cancel)
45 *
46 * @param string $name Required. The name of the DlpJob resource to be
47 * cancelled.
48 * @param GooglePrivacyDlpV2CancelDlpJobRequest $postBody
49 * @param array $optParams Optional parameters.
50 * @return GoogleProtobufEmpty
51 * @throws \Google\Service\Exception
52 */
53 public function cancel($name, GooglePrivacyDlpV2CancelDlpJobRequest $postBody, $optParams = [])
54 {
55 $params = ['name' => $name, 'postBody' => $postBody];
56 $params = array_merge($params, $optParams);
57 return $this->call('cancel', [$params], GoogleProtobufEmpty::class);
58 }
59 /**
60 * Creates a new job to inspect storage or calculate risk metrics. See
61 * https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage
62 * and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-
63 * analysis to learn more. When no InfoTypes or CustomInfoTypes are specified in
64 * inspect jobs, the system will automatically choose what detectors to run. By
65 * default this may be all types, but may change over time as detectors are
66 * updated. (dlpJobs.create)
67 *
68 * @param string $parent Required. Parent resource name. The format of this
69 * value varies depending on whether you have [specified a processing
70 * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-
71 * location): + Projects scope, location specified:
72 * `projects/{project_id}/locations/{location_id}` + Projects scope, no location
73 * specified (defaults to global): `projects/{project_id}` The following example
74 * `parent` string specifies a parent project with the identifier `example-
75 * project`, and specifies the `europe-west3` location for processing data:
76 * parent=projects/example-project/locations/europe-west3
77 * @param GooglePrivacyDlpV2CreateDlpJobRequest $postBody
78 * @param array $optParams Optional parameters.
79 * @return GooglePrivacyDlpV2DlpJob
80 * @throws \Google\Service\Exception
81 */
82 public function create($parent, GooglePrivacyDlpV2CreateDlpJobRequest $postBody, $optParams = [])
83 {
84 $params = ['parent' => $parent, 'postBody' => $postBody];
85 $params = array_merge($params, $optParams);
86 return $this->call('create', [$params], GooglePrivacyDlpV2DlpJob::class);
87 }
88 /**
89 * Deletes a long-running DlpJob. This method indicates that the client is no
90 * longer interested in the DlpJob result. The job will be canceled if possible.
91 * See https://cloud.google.com/sensitive-data-protection/docs/inspecting-
92 * storage and https://cloud.google.com/sensitive-data-protection/docs/compute-
93 * risk-analysis to learn more. (dlpJobs.delete)
94 *
95 * @param string $name Required. The name of the DlpJob resource to be deleted.
96 * @param array $optParams Optional parameters.
97 * @return GoogleProtobufEmpty
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], GoogleProtobufEmpty::class);
105 }
106 /**
107 * Finish a running hybrid DlpJob. Triggers the finalization steps and running
108 * of any enabled actions that have not yet run. (dlpJobs.finish)
109 *
110 * @param string $name Required. The name of the DlpJob resource to be finished.
111 * @param GooglePrivacyDlpV2FinishDlpJobRequest $postBody
112 * @param array $optParams Optional parameters.
113 * @return GoogleProtobufEmpty
114 * @throws \Google\Service\Exception
115 */
116 public function finish($name, GooglePrivacyDlpV2FinishDlpJobRequest $postBody, $optParams = [])
117 {
118 $params = ['name' => $name, 'postBody' => $postBody];
119 $params = array_merge($params, $optParams);
120 return $this->call('finish', [$params], GoogleProtobufEmpty::class);
121 }
122 /**
123 * Gets the latest state of a long-running DlpJob. See
124 * https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage
125 * and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-
126 * analysis to learn more. (dlpJobs.get)
127 *
128 * @param string $name Required. The name of the DlpJob resource.
129 * @param array $optParams Optional parameters.
130 * @return GooglePrivacyDlpV2DlpJob
131 * @throws \Google\Service\Exception
132 */
133 public function get($name, $optParams = [])
134 {
135 $params = ['name' => $name];
136 $params = array_merge($params, $optParams);
137 return $this->call('get', [$params], GooglePrivacyDlpV2DlpJob::class);
138 }
139 /**
140 * Inspect hybrid content and store findings to a job. To review the findings,
141 * inspect the job. Inspection will occur asynchronously.
142 * (dlpJobs.hybridInspect)
143 *
144 * @param string $name Required. Resource name of the job to execute a hybrid
145 * inspect on, for example `projects/dlp-test-project/dlpJob/53234423`.
146 * @param GooglePrivacyDlpV2HybridInspectDlpJobRequest $postBody
147 * @param array $optParams Optional parameters.
148 * @return GooglePrivacyDlpV2HybridInspectResponse
149 * @throws \Google\Service\Exception
150 */
151 public function hybridInspect($name, GooglePrivacyDlpV2HybridInspectDlpJobRequest $postBody, $optParams = [])
152 {
153 $params = ['name' => $name, 'postBody' => $postBody];
154 $params = array_merge($params, $optParams);
155 return $this->call('hybridInspect', [$params], GooglePrivacyDlpV2HybridInspectResponse::class);
156 }
157 /**
158 * Lists DlpJobs that match the specified filter in the request. See
159 * https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage
160 * and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-
161 * analysis to learn more. (dlpJobs.listProjectsLocationsDlpJobs)
162 *
163 * @param string $parent Required. Parent resource name. The format of this
164 * value varies depending on whether you have [specified a processing
165 * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-
166 * location): + Projects scope, location specified:
167 * `projects/{project_id}/locations/{location_id}` + Projects scope, no location
168 * specified (defaults to global): `projects/{project_id}` The following example
169 * `parent` string specifies a parent project with the identifier `example-
170 * project`, and specifies the `europe-west3` location for processing data:
171 * parent=projects/example-project/locations/europe-west3
172 * @param array $optParams Optional parameters.
173 *
174 * @opt_param string filter Allows filtering. Supported syntax: * Filter
175 * expressions are made up of one or more restrictions. * Restrictions can be
176 * combined by `AND` or `OR` logical operators. A sequence of restrictions
177 * implicitly uses `AND`. * A restriction has the form of `{field} {operator}
178 * {value}`. * Supported fields/values for inspect jobs: - `state` -
179 * PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` -
180 * DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the trigger
181 * that created the job. - 'end_time` - Corresponds to the time the job
182 * finished. - 'start_time` - Corresponds to the time the job finished. *
183 * Supported fields for risk analysis jobs: - `state` -
184 * RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the time the
185 * job finished. - 'start_time` - Corresponds to the time the job finished. *
186 * The operator must be `=` or `!=`. Examples: * inspected_storage =
187 * cloud_storage AND state = done * inspected_storage = cloud_storage OR
188 * inspected_storage = bigquery * inspected_storage = cloud_storage AND (state =
189 * done OR state = canceled) * end_time > \"2017-12-12T00:00:00+00:00\" The
190 * length of this field should be no more than 500 characters.
191 * @opt_param string locationId Deprecated. This field has no effect.
192 * @opt_param string orderBy Comma-separated list of fields to order by,
193 * followed by `asc` or `desc` postfix. This list is case insensitive. The
194 * default sorting order is ascending. Redundant space characters are
195 * insignificant. Example: `name asc, end_time asc, create_time desc` Supported
196 * fields are: - `create_time`: corresponds to the time the job was created. -
197 * `end_time`: corresponds to the time the job ended. - `name`: corresponds to
198 * the job's name. - `state`: corresponds to `state`
199 * @opt_param int pageSize The standard list page size.
200 * @opt_param string pageToken The standard list page token.
201 * @opt_param string type The type of job. Defaults to `DlpJobType.INSPECT`
202 * @return GooglePrivacyDlpV2ListDlpJobsResponse
203 * @throws \Google\Service\Exception
204 */
205 public function listProjectsLocationsDlpJobs($parent, $optParams = [])
206 {
207 $params = ['parent' => $parent];
208 $params = array_merge($params, $optParams);
209 return $this->call('list', [$params], GooglePrivacyDlpV2ListDlpJobsResponse::class);
210 }
211}
212
213// Adding a class alias for backwards compatibility with the previous class name.
214class_alias(ProjectsLocationsDlpJobs::class, 'Google_Service_DLP_Resource_ProjectsLocationsDlpJobs');
Note: See TracBrowser for help on using the repository browser.