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\GooglePrivacyDlpV2ListDlpJobsResponse;
21
22/**
23 * The "dlpJobs" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $dlpService = new Google\Service\DLP(...);
27 *   $dlpJobs = $dlpService->dlpJobs;
28 *  </code>
29 */
30class OrganizationsLocationsDlpJobs extends \Google\Service\Resource
31{
32  /**
33   * Lists DlpJobs that match the specified filter in the request. See
34   * https://cloud.google.com/dlp/docs/inspecting-storage and
35   * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
36   * (dlpJobs.listOrganizationsLocationsDlpJobs)
37   *
38   * @param string $parent Required. Parent resource name. The format of this
39   * value varies depending on whether you have [specified a processing
40   * location](https://cloud.google.com/dlp/docs/specifying-location): + Projects
41   * scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID +
42   * Projects scope, no location specified (defaults to global):
43   * `projects/`PROJECT_ID The following example `parent` string specifies a
44   * parent project with the identifier `example-project`, and specifies the
45   * `europe-west3` location for processing data: parent=projects/example-
46   * project/locations/europe-west3
47   * @param array $optParams Optional parameters.
48   *
49   * @opt_param string filter Allows filtering. Supported syntax: * Filter
50   * expressions are made up of one or more restrictions. * Restrictions can be
51   * combined by `AND` or `OR` logical operators. A sequence of restrictions
52   * implicitly uses `AND`. * A restriction has the form of `{field} {operator}
53   * {value}`. * Supported fields/values for inspect jobs: - `state` -
54   * PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` -
55   * DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name of the
56   * trigger that created job. - 'end_time` - Corresponds to time the job
57   * finished. - 'start_time` - Corresponds to time the job finished. * Supported
58   * fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED -
59   * 'end_time` - Corresponds to time the job finished. - 'start_time` -
60   * Corresponds to time the job finished. * The operator must be `=` or `!=`.
61   * Examples: * inspected_storage = cloud_storage AND state = done *
62   * inspected_storage = cloud_storage OR inspected_storage = bigquery *
63   * inspected_storage = cloud_storage AND (state = done OR state = canceled) *
64   * end_time > \"2017-12-12T00:00:00+00:00\" The length of this field should be
65   * no more than 500 characters.
66   * @opt_param string locationId Deprecated. This field has no effect.
67   * @opt_param string orderBy Comma separated list of fields to order by,
68   * followed by `asc` or `desc` postfix. This list is case-insensitive, default
69   * sorting order is ascending, redundant space characters are insignificant.
70   * Example: `name asc, end_time asc, create_time desc` Supported fields are: -
71   * `create_time`: corresponds to time the job was created. - `end_time`:
72   * corresponds to time the job ended. - `name`: corresponds to job's name. -
73   * `state`: corresponds to `state`
74   * @opt_param int pageSize The standard list page size.
75   * @opt_param string pageToken The standard list page token.
76   * @opt_param string type The type of job. Defaults to `DlpJobType.INSPECT`
77   * @return GooglePrivacyDlpV2ListDlpJobsResponse
78   */
79  public function listOrganizationsLocationsDlpJobs($parent, $optParams = [])
80  {
81    $params = ['parent' => $parent];
82    $params = array_merge($params, $optParams);
83    return $this->call('list', [$params], GooglePrivacyDlpV2ListDlpJobsResponse::class);
84  }
85}
86
87// Adding a class alias for backwards compatibility with the previous class name.
88class_alias(OrganizationsLocationsDlpJobs::class, 'Google_Service_DLP_Resource_OrganizationsLocationsDlpJobs');
89