source: vendor/google/apiclient-services/src/DLP/Resource/ProjectsLocationsJobTriggers.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.2 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\DLP\Resource;
19
20use Google\Service\DLP\GooglePrivacyDlpV2ActivateJobTriggerRequest;
21use Google\Service\DLP\GooglePrivacyDlpV2CreateJobTriggerRequest;
22use Google\Service\DLP\GooglePrivacyDlpV2DlpJob;
23use Google\Service\DLP\GooglePrivacyDlpV2HybridInspectJobTriggerRequest;
24use Google\Service\DLP\GooglePrivacyDlpV2HybridInspectResponse;
25use Google\Service\DLP\GooglePrivacyDlpV2JobTrigger;
26use Google\Service\DLP\GooglePrivacyDlpV2ListJobTriggersResponse;
27use Google\Service\DLP\GooglePrivacyDlpV2UpdateJobTriggerRequest;
28use Google\Service\DLP\GoogleProtobufEmpty;
29
30/**
31 * The "jobTriggers" collection of methods.
32 * Typical usage is:
33 * <code>
34 * $dlpService = new Google\Service\DLP(...);
35 * $jobTriggers = $dlpService->projects_locations_jobTriggers;
36 * </code>
37 */
38class ProjectsLocationsJobTriggers extends \Google\Service\Resource
39{
40 /**
41 * Activate a job trigger. Causes the immediate execute of a trigger instead of
42 * waiting on the trigger event to occur. (jobTriggers.activate)
43 *
44 * @param string $name Required. Resource name of the trigger to activate, for
45 * example `projects/dlp-test-project/jobTriggers/53234423`.
46 * @param GooglePrivacyDlpV2ActivateJobTriggerRequest $postBody
47 * @param array $optParams Optional parameters.
48 * @return GooglePrivacyDlpV2DlpJob
49 * @throws \Google\Service\Exception
50 */
51 public function activate($name, GooglePrivacyDlpV2ActivateJobTriggerRequest $postBody, $optParams = [])
52 {
53 $params = ['name' => $name, 'postBody' => $postBody];
54 $params = array_merge($params, $optParams);
55 return $this->call('activate', [$params], GooglePrivacyDlpV2DlpJob::class);
56 }
57 /**
58 * Creates a job trigger to run DLP actions such as scanning storage for
59 * sensitive information on a set schedule. See
60 * https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
61 * to learn more. (jobTriggers.create)
62 *
63 * @param string $parent Required. Parent resource name. The format of this
64 * value varies depending on whether you have [specified a processing
65 * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-
66 * location): + Projects scope, location specified:
67 * `projects/{project_id}/locations/{location_id}` + Projects scope, no location
68 * specified (defaults to global): `projects/{project_id}` The following example
69 * `parent` string specifies a parent project with the identifier `example-
70 * project`, and specifies the `europe-west3` location for processing data:
71 * parent=projects/example-project/locations/europe-west3
72 * @param GooglePrivacyDlpV2CreateJobTriggerRequest $postBody
73 * @param array $optParams Optional parameters.
74 * @return GooglePrivacyDlpV2JobTrigger
75 * @throws \Google\Service\Exception
76 */
77 public function create($parent, GooglePrivacyDlpV2CreateJobTriggerRequest $postBody, $optParams = [])
78 {
79 $params = ['parent' => $parent, 'postBody' => $postBody];
80 $params = array_merge($params, $optParams);
81 return $this->call('create', [$params], GooglePrivacyDlpV2JobTrigger::class);
82 }
83 /**
84 * Deletes a job trigger. See https://cloud.google.com/sensitive-data-
85 * protection/docs/creating-job-triggers to learn more. (jobTriggers.delete)
86 *
87 * @param string $name Required. Resource name of the project and the
88 * triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.
89 * @param array $optParams Optional parameters.
90 * @return GoogleProtobufEmpty
91 * @throws \Google\Service\Exception
92 */
93 public function delete($name, $optParams = [])
94 {
95 $params = ['name' => $name];
96 $params = array_merge($params, $optParams);
97 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
98 }
99 /**
100 * Gets a job trigger. See https://cloud.google.com/sensitive-data-
101 * protection/docs/creating-job-triggers to learn more. (jobTriggers.get)
102 *
103 * @param string $name Required. Resource name of the project and the
104 * triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.
105 * @param array $optParams Optional parameters.
106 * @return GooglePrivacyDlpV2JobTrigger
107 * @throws \Google\Service\Exception
108 */
109 public function get($name, $optParams = [])
110 {
111 $params = ['name' => $name];
112 $params = array_merge($params, $optParams);
113 return $this->call('get', [$params], GooglePrivacyDlpV2JobTrigger::class);
114 }
115 /**
116 * Inspect hybrid content and store findings to a trigger. The inspection will
117 * be processed asynchronously. To review the findings monitor the jobs within
118 * the trigger. (jobTriggers.hybridInspect)
119 *
120 * @param string $name Required. Resource name of the trigger to execute a
121 * hybrid inspect on, for example `projects/dlp-test-
122 * project/jobTriggers/53234423`.
123 * @param GooglePrivacyDlpV2HybridInspectJobTriggerRequest $postBody
124 * @param array $optParams Optional parameters.
125 * @return GooglePrivacyDlpV2HybridInspectResponse
126 * @throws \Google\Service\Exception
127 */
128 public function hybridInspect($name, GooglePrivacyDlpV2HybridInspectJobTriggerRequest $postBody, $optParams = [])
129 {
130 $params = ['name' => $name, 'postBody' => $postBody];
131 $params = array_merge($params, $optParams);
132 return $this->call('hybridInspect', [$params], GooglePrivacyDlpV2HybridInspectResponse::class);
133 }
134 /**
135 * Lists job triggers. See https://cloud.google.com/sensitive-data-
136 * protection/docs/creating-job-triggers to learn more.
137 * (jobTriggers.listProjectsLocationsJobTriggers)
138 *
139 * @param string $parent Required. Parent resource name. The format of this
140 * value varies depending on whether you have [specified a processing
141 * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-
142 * location): + Projects scope, location specified:
143 * `projects/{project_id}/locations/{location_id}` + Projects scope, no location
144 * specified (defaults to global): `projects/{project_id}` The following example
145 * `parent` string specifies a parent project with the identifier `example-
146 * project`, and specifies the `europe-west3` location for processing data:
147 * parent=projects/example-project/locations/europe-west3
148 * @param array $optParams Optional parameters.
149 *
150 * @opt_param string filter Allows filtering. Supported syntax: * Filter
151 * expressions are made up of one or more restrictions. * Restrictions can be
152 * combined by `AND` or `OR` logical operators. A sequence of restrictions
153 * implicitly uses `AND`. * A restriction has the form of `{field} {operator}
154 * {value}`. * Supported fields/values for inspect triggers: - `status` -
155 * HEALTHY|PAUSED|CANCELLED - `inspected_storage` -
156 * DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 formatted
157 * timestamp, surrounded by quotation marks. Nanoseconds are ignored. -
158 * 'error_count' - Number of errors that have occurred while running. * The
159 * operator must be `=` or `!=` for status and inspected_storage. Examples: *
160 * inspected_storage = cloud_storage AND status = HEALTHY * inspected_storage =
161 * cloud_storage OR inspected_storage = bigquery * inspected_storage =
162 * cloud_storage AND (state = PAUSED OR state = HEALTHY) * last_run_time >
163 * \"2017-12-12T00:00:00+00:00\" The length of this field should be no more than
164 * 500 characters.
165 * @opt_param string locationId Deprecated. This field has no effect.
166 * @opt_param string orderBy Comma-separated list of triggeredJob fields to
167 * order by, followed by `asc` or `desc` postfix. This list is case insensitive.
168 * The default sorting order is ascending. Redundant space characters are
169 * insignificant. Example: `name asc,update_time, create_time desc` Supported
170 * fields are: - `create_time`: corresponds to the time the JobTrigger was
171 * created. - `update_time`: corresponds to the time the JobTrigger was last
172 * updated. - `last_run_time`: corresponds to the last time the JobTrigger ran.
173 * - `name`: corresponds to the JobTrigger's name. - `display_name`: corresponds
174 * to the JobTrigger's display name. - `status`: corresponds to JobTrigger's
175 * status.
176 * @opt_param int pageSize Size of the page. This value can be limited by a
177 * server.
178 * @opt_param string pageToken Page token to continue retrieval. Comes from the
179 * previous call to ListJobTriggers. `order_by` field must not change for
180 * subsequent calls.
181 * @opt_param string type The type of jobs. Will use `DlpJobType.INSPECT` if not
182 * set.
183 * @return GooglePrivacyDlpV2ListJobTriggersResponse
184 * @throws \Google\Service\Exception
185 */
186 public function listProjectsLocationsJobTriggers($parent, $optParams = [])
187 {
188 $params = ['parent' => $parent];
189 $params = array_merge($params, $optParams);
190 return $this->call('list', [$params], GooglePrivacyDlpV2ListJobTriggersResponse::class);
191 }
192 /**
193 * Updates a job trigger. See https://cloud.google.com/sensitive-data-
194 * protection/docs/creating-job-triggers to learn more. (jobTriggers.patch)
195 *
196 * @param string $name Required. Resource name of the project and the
197 * triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.
198 * @param GooglePrivacyDlpV2UpdateJobTriggerRequest $postBody
199 * @param array $optParams Optional parameters.
200 * @return GooglePrivacyDlpV2JobTrigger
201 * @throws \Google\Service\Exception
202 */
203 public function patch($name, GooglePrivacyDlpV2UpdateJobTriggerRequest $postBody, $optParams = [])
204 {
205 $params = ['name' => $name, 'postBody' => $postBody];
206 $params = array_merge($params, $optParams);
207 return $this->call('patch', [$params], GooglePrivacyDlpV2JobTrigger::class);
208 }
209}
210
211// Adding a class alias for backwards compatibility with the previous class name.
212class_alias(ProjectsLocationsJobTriggers::class, 'Google_Service_DLP_Resource_ProjectsLocationsJobTriggers');
Note: See TracBrowser for help on using the repository browser.