[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\DLP\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\DLP\GooglePrivacyDlpV2CreateDiscoveryConfigRequest;
|
---|
| 21 | use Google\Service\DLP\GooglePrivacyDlpV2DiscoveryConfig;
|
---|
| 22 | use Google\Service\DLP\GooglePrivacyDlpV2ListDiscoveryConfigsResponse;
|
---|
| 23 | use Google\Service\DLP\GooglePrivacyDlpV2UpdateDiscoveryConfigRequest;
|
---|
| 24 | use Google\Service\DLP\GoogleProtobufEmpty;
|
---|
| 25 |
|
---|
| 26 | /**
|
---|
| 27 | * The "discoveryConfigs" collection of methods.
|
---|
| 28 | * Typical usage is:
|
---|
| 29 | * <code>
|
---|
| 30 | * $dlpService = new Google\Service\DLP(...);
|
---|
| 31 | * $discoveryConfigs = $dlpService->organizations_locations_discoveryConfigs;
|
---|
| 32 | * </code>
|
---|
| 33 | */
|
---|
| 34 | class OrganizationsLocationsDiscoveryConfigs extends \Google\Service\Resource
|
---|
| 35 | {
|
---|
| 36 | /**
|
---|
| 37 | * Creates a config for discovery to scan and profile storage.
|
---|
| 38 | * (discoveryConfigs.create)
|
---|
| 39 | *
|
---|
| 40 | * @param string $parent Required. Parent resource name. The format of this
|
---|
| 41 | * value varies depending on the scope of the request (project or organization):
|
---|
| 42 | * + Projects scope: `projects/{project_id}/locations/{location_id}` +
|
---|
| 43 | * Organizations scope: `organizations/{org_id}/locations/{location_id}` The
|
---|
| 44 | * following example `parent` string specifies a parent project with the
|
---|
| 45 | * identifier `example-project`, and specifies the `europe-west3` location for
|
---|
| 46 | * processing data: parent=projects/example-project/locations/europe-west3
|
---|
| 47 | * @param GooglePrivacyDlpV2CreateDiscoveryConfigRequest $postBody
|
---|
| 48 | * @param array $optParams Optional parameters.
|
---|
| 49 | * @return GooglePrivacyDlpV2DiscoveryConfig
|
---|
| 50 | * @throws \Google\Service\Exception
|
---|
| 51 | */
|
---|
| 52 | public function create($parent, GooglePrivacyDlpV2CreateDiscoveryConfigRequest $postBody, $optParams = [])
|
---|
| 53 | {
|
---|
| 54 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 55 | $params = array_merge($params, $optParams);
|
---|
| 56 | return $this->call('create', [$params], GooglePrivacyDlpV2DiscoveryConfig::class);
|
---|
| 57 | }
|
---|
| 58 | /**
|
---|
| 59 | * Deletes a discovery configuration. (discoveryConfigs.delete)
|
---|
| 60 | *
|
---|
| 61 | * @param string $name Required. Resource name of the project and the config,
|
---|
| 62 | * for example `projects/dlp-test-project/discoveryConfigs/53234423`.
|
---|
| 63 | * @param array $optParams Optional parameters.
|
---|
| 64 | * @return GoogleProtobufEmpty
|
---|
| 65 | * @throws \Google\Service\Exception
|
---|
| 66 | */
|
---|
| 67 | public function delete($name, $optParams = [])
|
---|
| 68 | {
|
---|
| 69 | $params = ['name' => $name];
|
---|
| 70 | $params = array_merge($params, $optParams);
|
---|
| 71 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
| 72 | }
|
---|
| 73 | /**
|
---|
| 74 | * Gets a discovery configuration. (discoveryConfigs.get)
|
---|
| 75 | *
|
---|
| 76 | * @param string $name Required. Resource name of the project and the
|
---|
| 77 | * configuration, for example `projects/dlp-test-
|
---|
| 78 | * project/discoveryConfigs/53234423`.
|
---|
| 79 | * @param array $optParams Optional parameters.
|
---|
| 80 | * @return GooglePrivacyDlpV2DiscoveryConfig
|
---|
| 81 | * @throws \Google\Service\Exception
|
---|
| 82 | */
|
---|
| 83 | public function get($name, $optParams = [])
|
---|
| 84 | {
|
---|
| 85 | $params = ['name' => $name];
|
---|
| 86 | $params = array_merge($params, $optParams);
|
---|
| 87 | return $this->call('get', [$params], GooglePrivacyDlpV2DiscoveryConfig::class);
|
---|
| 88 | }
|
---|
| 89 | /**
|
---|
| 90 | * Lists discovery configurations.
|
---|
| 91 | * (discoveryConfigs.listOrganizationsLocationsDiscoveryConfigs)
|
---|
| 92 | *
|
---|
| 93 | * @param string $parent Required. Parent resource name. The format of this
|
---|
| 94 | * value is as follows: `projects/{project_id}/locations/{location_id}` The
|
---|
| 95 | * following example `parent` string specifies a parent project with the
|
---|
| 96 | * identifier `example-project`, and specifies the `europe-west3` location for
|
---|
| 97 | * processing data: parent=projects/example-project/locations/europe-west3
|
---|
| 98 | * @param array $optParams Optional parameters.
|
---|
| 99 | *
|
---|
| 100 | * @opt_param string orderBy Comma-separated list of config fields to order by,
|
---|
| 101 | * followed by `asc` or `desc` postfix. This list is case insensitive. The
|
---|
| 102 | * default sorting order is ascending. Redundant space characters are
|
---|
| 103 | * insignificant. Example: `name asc,update_time, create_time desc` Supported
|
---|
| 104 | * fields are: - `last_run_time`: corresponds to the last time the
|
---|
| 105 | * DiscoveryConfig ran. - `name`: corresponds to the DiscoveryConfig's name. -
|
---|
| 106 | * `status`: corresponds to DiscoveryConfig's status.
|
---|
| 107 | * @opt_param int pageSize Size of the page. This value can be limited by a
|
---|
| 108 | * server.
|
---|
| 109 | * @opt_param string pageToken Page token to continue retrieval. Comes from the
|
---|
| 110 | * previous call to ListDiscoveryConfigs. `order_by` field must not change for
|
---|
| 111 | * subsequent calls.
|
---|
| 112 | * @return GooglePrivacyDlpV2ListDiscoveryConfigsResponse
|
---|
| 113 | * @throws \Google\Service\Exception
|
---|
| 114 | */
|
---|
| 115 | public function listOrganizationsLocationsDiscoveryConfigs($parent, $optParams = [])
|
---|
| 116 | {
|
---|
| 117 | $params = ['parent' => $parent];
|
---|
| 118 | $params = array_merge($params, $optParams);
|
---|
| 119 | return $this->call('list', [$params], GooglePrivacyDlpV2ListDiscoveryConfigsResponse::class);
|
---|
| 120 | }
|
---|
| 121 | /**
|
---|
| 122 | * Updates a discovery configuration. (discoveryConfigs.patch)
|
---|
| 123 | *
|
---|
| 124 | * @param string $name Required. Resource name of the project and the
|
---|
| 125 | * configuration, for example `projects/dlp-test-
|
---|
| 126 | * project/discoveryConfigs/53234423`.
|
---|
| 127 | * @param GooglePrivacyDlpV2UpdateDiscoveryConfigRequest $postBody
|
---|
| 128 | * @param array $optParams Optional parameters.
|
---|
| 129 | * @return GooglePrivacyDlpV2DiscoveryConfig
|
---|
| 130 | * @throws \Google\Service\Exception
|
---|
| 131 | */
|
---|
| 132 | public function patch($name, GooglePrivacyDlpV2UpdateDiscoveryConfigRequest $postBody, $optParams = [])
|
---|
| 133 | {
|
---|
| 134 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 135 | $params = array_merge($params, $optParams);
|
---|
| 136 | return $this->call('patch', [$params], GooglePrivacyDlpV2DiscoveryConfig::class);
|
---|
| 137 | }
|
---|
| 138 | }
|
---|
| 139 |
|
---|
| 140 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 141 | class_alias(OrganizationsLocationsDiscoveryConfigs::class, 'Google_Service_DLP_Resource_OrganizationsLocationsDiscoveryConfigs');
|
---|