[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\GooglePrivacyDlpV2FileStoreDataProfile;
|
---|
| 21 | use Google\Service\DLP\GooglePrivacyDlpV2ListFileStoreDataProfilesResponse;
|
---|
| 22 | use Google\Service\DLP\GoogleProtobufEmpty;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "fileStoreDataProfiles" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $dlpService = new Google\Service\DLP(...);
|
---|
| 29 | * $fileStoreDataProfiles = $dlpService->projects_locations_fileStoreDataProfiles;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsFileStoreDataProfiles extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Delete a FileStoreDataProfile. Will not prevent the profile from being
|
---|
| 36 | * regenerated if the resource is still included in a discovery configuration.
|
---|
| 37 | * (fileStoreDataProfiles.delete)
|
---|
| 38 | *
|
---|
| 39 | * @param string $name Required. Resource name of the file store data profile.
|
---|
| 40 | * @param array $optParams Optional parameters.
|
---|
| 41 | * @return GoogleProtobufEmpty
|
---|
| 42 | * @throws \Google\Service\Exception
|
---|
| 43 | */
|
---|
| 44 | public function delete($name, $optParams = [])
|
---|
| 45 | {
|
---|
| 46 | $params = ['name' => $name];
|
---|
| 47 | $params = array_merge($params, $optParams);
|
---|
| 48 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
| 49 | }
|
---|
| 50 | /**
|
---|
| 51 | * Gets a file store data profile. (fileStoreDataProfiles.get)
|
---|
| 52 | *
|
---|
| 53 | * @param string $name Required. Resource name, for example
|
---|
| 54 | * `organizations/12345/locations/us/fileStoreDataProfiles/53234423`.
|
---|
| 55 | * @param array $optParams Optional parameters.
|
---|
| 56 | * @return GooglePrivacyDlpV2FileStoreDataProfile
|
---|
| 57 | * @throws \Google\Service\Exception
|
---|
| 58 | */
|
---|
| 59 | public function get($name, $optParams = [])
|
---|
| 60 | {
|
---|
| 61 | $params = ['name' => $name];
|
---|
| 62 | $params = array_merge($params, $optParams);
|
---|
| 63 | return $this->call('get', [$params], GooglePrivacyDlpV2FileStoreDataProfile::class);
|
---|
| 64 | }
|
---|
| 65 | /**
|
---|
| 66 | * Lists file store data profiles for an organization.
|
---|
| 67 | * (fileStoreDataProfiles.listProjectsLocationsFileStoreDataProfiles)
|
---|
| 68 | *
|
---|
| 69 | * @param string $parent Required. Resource name of the organization or project,
|
---|
| 70 | * for example `organizations/433245324/locations/europe` or `projects/project-
|
---|
| 71 | * id/locations/asia`.
|
---|
| 72 | * @param array $optParams Optional parameters.
|
---|
| 73 | *
|
---|
| 74 | * @opt_param string filter Optional. Allows filtering. Supported syntax: *
|
---|
| 75 | * Filter expressions are made up of one or more restrictions. * Restrictions
|
---|
| 76 | * can be combined by `AND` or `OR` logical operators. A sequence of
|
---|
| 77 | * restrictions implicitly uses `AND`. * A restriction has the form of `{field}
|
---|
| 78 | * {operator} {value}`. * Supported fields/values: - `project_id` - The Google
|
---|
| 79 | * Cloud project ID. - `account_id` - The AWS account ID. - `file_store_path` -
|
---|
| 80 | * The path like "gs://bucket". - `data_source_type` - The profile's data source
|
---|
| 81 | * type, like "google/storage/bucket". - `data_storage_location` - The location
|
---|
| 82 | * where the file store's data is stored, like "us-central1". -
|
---|
| 83 | * `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` -
|
---|
| 84 | * HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - `status_code`
|
---|
| 85 | * - an RPC status code as defined in
|
---|
| 86 | * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto *
|
---|
| 87 | * The operator must be `=` or `!=`. Examples: * `project_id = 12345 AND
|
---|
| 88 | * status_code = 1` * `project_id = 12345 AND sensitivity_level = HIGH` *
|
---|
| 89 | * `project_id = 12345 AND resource_visibility = PUBLIC` * `file_store_path =
|
---|
| 90 | * "gs://mybucket"` The length of this field should be no more than 500
|
---|
| 91 | * characters.
|
---|
| 92 | * @opt_param string orderBy Optional. Comma-separated list of fields to order
|
---|
| 93 | * by, followed by `asc` or `desc` postfix. This list is case insensitive. The
|
---|
| 94 | * default sorting order is ascending. Redundant space characters are
|
---|
| 95 | * insignificant. Only one order field at a time is allowed. Examples: *
|
---|
| 96 | * `project_id asc` * `name` * `sensitivity_level desc` Supported fields are: -
|
---|
| 97 | * `project_id`: The Google Cloud project ID. - `sensitivity_level`: How
|
---|
| 98 | * sensitive the data in a table is, at most. - `data_risk_level`: How much risk
|
---|
| 99 | * is associated with this data. - `profile_last_generated`: When the profile
|
---|
| 100 | * was last updated in epoch seconds. - `last_modified`: The last time the
|
---|
| 101 | * resource was modified. - `resource_visibility`: Visibility restriction for
|
---|
| 102 | * this resource. - `name`: The name of the profile. - `create_time`: The time
|
---|
| 103 | * the file store was first created.
|
---|
| 104 | * @opt_param int pageSize Optional. Size of the page. This value can be limited
|
---|
| 105 | * by the server. If zero, server returns a page of max size 100.
|
---|
| 106 | * @opt_param string pageToken Optional. Page token to continue retrieval.
|
---|
| 107 | * @return GooglePrivacyDlpV2ListFileStoreDataProfilesResponse
|
---|
| 108 | * @throws \Google\Service\Exception
|
---|
| 109 | */
|
---|
| 110 | public function listProjectsLocationsFileStoreDataProfiles($parent, $optParams = [])
|
---|
| 111 | {
|
---|
| 112 | $params = ['parent' => $parent];
|
---|
| 113 | $params = array_merge($params, $optParams);
|
---|
| 114 | return $this->call('list', [$params], GooglePrivacyDlpV2ListFileStoreDataProfilesResponse::class);
|
---|
| 115 | }
|
---|
| 116 | }
|
---|
| 117 |
|
---|
| 118 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 119 | class_alias(ProjectsLocationsFileStoreDataProfiles::class, 'Google_Service_DLP_Resource_ProjectsLocationsFileStoreDataProfiles');
|
---|