Skip to content

Commit 6530732

Browse files
1 parent f13c713 commit 6530732

4 files changed

Lines changed: 138 additions & 1 deletion

src/DLP/GooglePrivacyDlpV2ContentItem.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class GooglePrivacyDlpV2ContentItem extends \Google\Model
2121
{
2222
protected $byteItemType = GooglePrivacyDlpV2ByteContentItem::class;
2323
protected $byteItemDataType = '';
24+
protected $contentMetadataType = GooglePrivacyDlpV2ContentMetadata::class;
25+
protected $contentMetadataDataType = '';
2426
protected $tableType = GooglePrivacyDlpV2Table::class;
2527
protected $tableDataType = '';
2628
/**
@@ -46,6 +48,22 @@ public function getByteItem()
4648
{
4749
return $this->byteItem;
4850
}
51+
/**
52+
* User provided metadata for the content.
53+
*
54+
* @param GooglePrivacyDlpV2ContentMetadata $contentMetadata
55+
*/
56+
public function setContentMetadata(GooglePrivacyDlpV2ContentMetadata $contentMetadata)
57+
{
58+
$this->contentMetadata = $contentMetadata;
59+
}
60+
/**
61+
* @return GooglePrivacyDlpV2ContentMetadata
62+
*/
63+
public function getContentMetadata()
64+
{
65+
return $this->contentMetadata;
66+
}
4967
/**
5068
* Structured content for inspection. See https://cloud.google.com/sensitive-
5169
* data-protection/docs/inspecting-text#inspecting_a_table to learn more.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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;
19+
20+
class GooglePrivacyDlpV2ContentMetadata extends \Google\Collection
21+
{
22+
protected $collection_key = 'properties';
23+
protected $propertiesType = GooglePrivacyDlpV2KeyValueMetadataProperty::class;
24+
protected $propertiesDataType = 'array';
25+
26+
/**
27+
* User provided key-value pairs of content metadata.
28+
*
29+
* @param GooglePrivacyDlpV2KeyValueMetadataProperty[] $properties
30+
*/
31+
public function setProperties($properties)
32+
{
33+
$this->properties = $properties;
34+
}
35+
/**
36+
* @return GooglePrivacyDlpV2KeyValueMetadataProperty[]
37+
*/
38+
public function getProperties()
39+
{
40+
return $this->properties;
41+
}
42+
}
43+
44+
// Adding a class alias for backwards compatibility with the previous class name.
45+
class_alias(GooglePrivacyDlpV2ContentMetadata::class, 'Google_Service_DLP_GooglePrivacyDlpV2ContentMetadata');
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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;
19+
20+
class GooglePrivacyDlpV2KeyValueMetadataProperty extends \Google\Model
21+
{
22+
/**
23+
* The key of the property.
24+
*
25+
* @var string
26+
*/
27+
public $key;
28+
/**
29+
* The value of the property.
30+
*
31+
* @var string
32+
*/
33+
public $value;
34+
35+
/**
36+
* The key of the property.
37+
*
38+
* @param string $key
39+
*/
40+
public function setKey($key)
41+
{
42+
$this->key = $key;
43+
}
44+
/**
45+
* @return string
46+
*/
47+
public function getKey()
48+
{
49+
return $this->key;
50+
}
51+
/**
52+
* The value of the property.
53+
*
54+
* @param string $value
55+
*/
56+
public function setValue($value)
57+
{
58+
$this->value = $value;
59+
}
60+
/**
61+
* @return string
62+
*/
63+
public function getValue()
64+
{
65+
return $this->value;
66+
}
67+
}
68+
69+
// Adding a class alias for backwards compatibility with the previous class name.
70+
class_alias(GooglePrivacyDlpV2KeyValueMetadataProperty::class, 'Google_Service_DLP_GooglePrivacyDlpV2KeyValueMetadataProperty');

src/DLP/GooglePrivacyDlpV2MetadataLocation.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ class GooglePrivacyDlpV2MetadataLocation extends \Google\Model
3131
* Metadata extracted from the files.
3232
*/
3333
public const TYPE_CONTENT_METADATA = 'CONTENT_METADATA';
34+
/**
35+
* Metadata provided by the client.
36+
*/
37+
public const TYPE_CLIENT_PROVIDED_METADATA = 'CLIENT_PROVIDED_METADATA';
3438
protected $keyValueMetadataLabelType = GooglePrivacyDlpV2KeyValueMetadataLabel::class;
3539
protected $keyValueMetadataLabelDataType = '';
3640
protected $storageLabelType = GooglePrivacyDlpV2StorageMetadataLabel::class;
@@ -78,7 +82,7 @@ public function getStorageLabel()
7882
* Type of metadata containing the finding.
7983
*
8084
* Accepted values: METADATATYPE_UNSPECIFIED, STORAGE_METADATA,
81-
* CONTENT_METADATA
85+
* CONTENT_METADATA, CLIENT_PROVIDED_METADATA
8286
*
8387
* @param self::TYPE_* $type
8488
*/

0 commit comments

Comments
 (0)