Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Commit 12aeb68

Browse files
feat: add WORD and PDF file type enums and new MetadataLocation proto (#176)
* Release new file type enums and new MetadataLocation proto. PiperOrigin-RevId: 310622219 Source-Author: Google APIs <noreply@google.com> Source-Date: Fri May 8 13:49:57 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 1019b0d9dbd999e1107f90247fcc478678d1105c Source-Link: googleapis/googleapis@1019b0d * ci(java): switch to GitHub Actions (#533) * ci: switch to GitHub Actions * update based on comment Source-Author: Stephanie Wang <stephaniewang526@users.noreply.github.com> Source-Date: Mon May 11 12:54:00 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 55cdc844877d97139f25004229842624a6a86a02 Source-Link: googleapis/synthtool@55cdc84 * chore: move ci.yaml to workflows dir (#535) Source-Author: Stephanie Wang <stephaniewang526@users.noreply.github.com> Source-Date: Mon May 11 16:24:04 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 98c50772ec23295c64cf0d2ddf199ea52961fd4c Source-Link: googleapis/synthtool@98c5077
1 parent a1b65d4 commit 12aeb68

File tree

62 files changed

+4713
-2033
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+4713
-2033
lines changed

.github/workflows/ci.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
name: ci
7+
jobs:
8+
units:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
java: [7, 8, 11]
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-java@v1
16+
with:
17+
java-version: ${{matrix.java}}
18+
- run: java -version
19+
- run: .kokoro/build.sh
20+
env:
21+
JOB_TYPE: test
22+
- name: coverage
23+
uses: codecov/codecov-action@v1
24+
with:
25+
name: actions ${{matrix.java}}
26+
windows:
27+
runs-on: windows-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: actions/setup-java@v1
31+
with:
32+
java-version: 8
33+
- run: java -version
34+
- run: .kokoro/build.bat
35+
env:
36+
JOB_TYPE: test
37+
dependencies:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v2
41+
- uses: actions/setup-java@v1
42+
with:
43+
java-version: 8
44+
- run: java -version
45+
- run: .kokoro/dependencies.sh
46+
linkage-monitor:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v2
50+
- uses: actions/setup-java@v1
51+
with:
52+
java-version: 8
53+
- run: java -version
54+
- run: .kokoro/linkage-monitor.sh
55+
lint:
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v2
59+
- uses: actions/setup-java@v1
60+
with:
61+
java-version: 8
62+
- run: java -version
63+
- run: .kokoro/build.sh
64+
env:
65+
JOB_TYPE: lint
66+
clirr:
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: actions/checkout@v2
70+
- uses: actions/setup-java@v1
71+
with:
72+
java-version: 8
73+
- run: java -version
74+
- run: .kokoro/build.sh
75+
env:
76+
JOB_TYPE: clirr

.kokoro/build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
:: See documentation in type-shell-output.bat
22

3-
"C:\Program Files\Git\bin\bash.exe" github/java-dlp/.kokoro/build.sh
3+
"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh

proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItem.java

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
121121
*
122122
*
123123
* <pre>
124-
* The type of data being sent to in data.
124+
* The type of data being sent for inspection.
125125
* </pre>
126126
*
127127
* Protobuf enum {@code google.privacy.dlp.v2.ByteContentItem.BytesType}
@@ -197,6 +197,26 @@ public enum BytesType implements com.google.protobuf.ProtocolMessageEnum {
197197
* <code>TEXT_UTF8 = 5;</code>
198198
*/
199199
TEXT_UTF8(5),
200+
/**
201+
*
202+
*
203+
* <pre>
204+
* docx, docm, dotx, dotm
205+
* </pre>
206+
*
207+
* <code>WORD_DOCUMENT = 7;</code>
208+
*/
209+
WORD_DOCUMENT(7),
210+
/**
211+
*
212+
*
213+
* <pre>
214+
* pdf
215+
* </pre>
216+
*
217+
* <code>PDF = 8;</code>
218+
*/
219+
PDF(8),
200220
/**
201221
*
202222
*
@@ -280,6 +300,26 @@ public enum BytesType implements com.google.protobuf.ProtocolMessageEnum {
280300
* <code>TEXT_UTF8 = 5;</code>
281301
*/
282302
public static final int TEXT_UTF8_VALUE = 5;
303+
/**
304+
*
305+
*
306+
* <pre>
307+
* docx, docm, dotx, dotm
308+
* </pre>
309+
*
310+
* <code>WORD_DOCUMENT = 7;</code>
311+
*/
312+
public static final int WORD_DOCUMENT_VALUE = 7;
313+
/**
314+
*
315+
*
316+
* <pre>
317+
* pdf
318+
* </pre>
319+
*
320+
* <code>PDF = 8;</code>
321+
*/
322+
public static final int PDF_VALUE = 8;
283323
/**
284324
*
285325
*
@@ -329,6 +369,10 @@ public static BytesType forNumber(int value) {
329369
return IMAGE_SVG;
330370
case 5:
331371
return TEXT_UTF8;
372+
case 7:
373+
return WORD_DOCUMENT;
374+
case 8:
375+
return PDF;
332376
case 11:
333377
return AVRO;
334378
default:

proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptions.java

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,6 +1462,9 @@ public com.google.privacy.dlp.v2.FileType convert(java.lang.Integer from) {
14621462
* If empty, all files are scanned and available data format processors
14631463
* are applied. In addition, the binary content of the selected files
14641464
* is always scanned as well.
1465+
* Images are scanned only as binary if the specified region
1466+
* does not support image inspection and no file_types were specified.
1467+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
14651468
* </pre>
14661469
*
14671470
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -1480,6 +1483,9 @@ public java.util.List<com.google.privacy.dlp.v2.FileType> getFileTypesList() {
14801483
* If empty, all files are scanned and available data format processors
14811484
* are applied. In addition, the binary content of the selected files
14821485
* is always scanned as well.
1486+
* Images are scanned only as binary if the specified region
1487+
* does not support image inspection and no file_types were specified.
1488+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
14831489
* </pre>
14841490
*
14851491
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -1497,6 +1503,9 @@ public int getFileTypesCount() {
14971503
* If empty, all files are scanned and available data format processors
14981504
* are applied. In addition, the binary content of the selected files
14991505
* is always scanned as well.
1506+
* Images are scanned only as binary if the specified region
1507+
* does not support image inspection and no file_types were specified.
1508+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
15001509
* </pre>
15011510
*
15021511
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -1515,6 +1524,9 @@ public com.google.privacy.dlp.v2.FileType getFileTypes(int index) {
15151524
* If empty, all files are scanned and available data format processors
15161525
* are applied. In addition, the binary content of the selected files
15171526
* is always scanned as well.
1527+
* Images are scanned only as binary if the specified region
1528+
* does not support image inspection and no file_types were specified.
1529+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
15181530
* </pre>
15191531
*
15201532
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -1532,6 +1544,9 @@ public java.util.List<java.lang.Integer> getFileTypesValueList() {
15321544
* If empty, all files are scanned and available data format processors
15331545
* are applied. In addition, the binary content of the selected files
15341546
* is always scanned as well.
1547+
* Images are scanned only as binary if the specified region
1548+
* does not support image inspection and no file_types were specified.
1549+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
15351550
* </pre>
15361551
*
15371552
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -2345,6 +2360,9 @@ private void ensureFileTypesIsMutable() {
23452360
* If empty, all files are scanned and available data format processors
23462361
* are applied. In addition, the binary content of the selected files
23472362
* is always scanned as well.
2363+
* Images are scanned only as binary if the specified region
2364+
* does not support image inspection and no file_types were specified.
2365+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
23482366
* </pre>
23492367
*
23502368
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -2363,6 +2381,9 @@ public java.util.List<com.google.privacy.dlp.v2.FileType> getFileTypesList() {
23632381
* If empty, all files are scanned and available data format processors
23642382
* are applied. In addition, the binary content of the selected files
23652383
* is always scanned as well.
2384+
* Images are scanned only as binary if the specified region
2385+
* does not support image inspection and no file_types were specified.
2386+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
23662387
* </pre>
23672388
*
23682389
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -2380,6 +2401,9 @@ public int getFileTypesCount() {
23802401
* If empty, all files are scanned and available data format processors
23812402
* are applied. In addition, the binary content of the selected files
23822403
* is always scanned as well.
2404+
* Images are scanned only as binary if the specified region
2405+
* does not support image inspection and no file_types were specified.
2406+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
23832407
* </pre>
23842408
*
23852409
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -2398,6 +2422,9 @@ public com.google.privacy.dlp.v2.FileType getFileTypes(int index) {
23982422
* If empty, all files are scanned and available data format processors
23992423
* are applied. In addition, the binary content of the selected files
24002424
* is always scanned as well.
2425+
* Images are scanned only as binary if the specified region
2426+
* does not support image inspection and no file_types were specified.
2427+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
24012428
* </pre>
24022429
*
24032430
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -2423,6 +2450,9 @@ public Builder setFileTypes(int index, com.google.privacy.dlp.v2.FileType value)
24232450
* If empty, all files are scanned and available data format processors
24242451
* are applied. In addition, the binary content of the selected files
24252452
* is always scanned as well.
2453+
* Images are scanned only as binary if the specified region
2454+
* does not support image inspection and no file_types were specified.
2455+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
24262456
* </pre>
24272457
*
24282458
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -2447,6 +2477,9 @@ public Builder addFileTypes(com.google.privacy.dlp.v2.FileType value) {
24472477
* If empty, all files are scanned and available data format processors
24482478
* are applied. In addition, the binary content of the selected files
24492479
* is always scanned as well.
2480+
* Images are scanned only as binary if the specified region
2481+
* does not support image inspection and no file_types were specified.
2482+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
24502483
* </pre>
24512484
*
24522485
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -2471,6 +2504,9 @@ public Builder addAllFileTypes(
24712504
* If empty, all files are scanned and available data format processors
24722505
* are applied. In addition, the binary content of the selected files
24732506
* is always scanned as well.
2507+
* Images are scanned only as binary if the specified region
2508+
* does not support image inspection and no file_types were specified.
2509+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
24742510
* </pre>
24752511
*
24762512
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -2491,6 +2527,9 @@ public Builder clearFileTypes() {
24912527
* If empty, all files are scanned and available data format processors
24922528
* are applied. In addition, the binary content of the selected files
24932529
* is always scanned as well.
2530+
* Images are scanned only as binary if the specified region
2531+
* does not support image inspection and no file_types were specified.
2532+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
24942533
* </pre>
24952534
*
24962535
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -2508,6 +2547,9 @@ public java.util.List<java.lang.Integer> getFileTypesValueList() {
25082547
* If empty, all files are scanned and available data format processors
25092548
* are applied. In addition, the binary content of the selected files
25102549
* is always scanned as well.
2550+
* Images are scanned only as binary if the specified region
2551+
* does not support image inspection and no file_types were specified.
2552+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
25112553
* </pre>
25122554
*
25132555
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -2526,6 +2568,9 @@ public int getFileTypesValue(int index) {
25262568
* If empty, all files are scanned and available data format processors
25272569
* are applied. In addition, the binary content of the selected files
25282570
* is always scanned as well.
2571+
* Images are scanned only as binary if the specified region
2572+
* does not support image inspection and no file_types were specified.
2573+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
25292574
* </pre>
25302575
*
25312576
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -2548,6 +2593,9 @@ public Builder setFileTypesValue(int index, int value) {
25482593
* If empty, all files are scanned and available data format processors
25492594
* are applied. In addition, the binary content of the selected files
25502595
* is always scanned as well.
2596+
* Images are scanned only as binary if the specified region
2597+
* does not support image inspection and no file_types were specified.
2598+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
25512599
* </pre>
25522600
*
25532601
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -2569,6 +2617,9 @@ public Builder addFileTypesValue(int value) {
25692617
* If empty, all files are scanned and available data format processors
25702618
* are applied. In addition, the binary content of the selected files
25712619
* is always scanned as well.
2620+
* Images are scanned only as binary if the specified region
2621+
* does not support image inspection and no file_types were specified.
2622+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
25722623
* </pre>
25732624
*
25742625
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>

proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptionsOrBuilder.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ public interface CloudStorageOptionsOrBuilder
9797
* If empty, all files are scanned and available data format processors
9898
* are applied. In addition, the binary content of the selected files
9999
* is always scanned as well.
100+
* Images are scanned only as binary if the specified region
101+
* does not support image inspection and no file_types were specified.
102+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
100103
* </pre>
101104
*
102105
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -112,6 +115,9 @@ public interface CloudStorageOptionsOrBuilder
112115
* If empty, all files are scanned and available data format processors
113116
* are applied. In addition, the binary content of the selected files
114117
* is always scanned as well.
118+
* Images are scanned only as binary if the specified region
119+
* does not support image inspection and no file_types were specified.
120+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
115121
* </pre>
116122
*
117123
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -127,6 +133,9 @@ public interface CloudStorageOptionsOrBuilder
127133
* If empty, all files are scanned and available data format processors
128134
* are applied. In addition, the binary content of the selected files
129135
* is always scanned as well.
136+
* Images are scanned only as binary if the specified region
137+
* does not support image inspection and no file_types were specified.
138+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
130139
* </pre>
131140
*
132141
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -143,6 +152,9 @@ public interface CloudStorageOptionsOrBuilder
143152
* If empty, all files are scanned and available data format processors
144153
* are applied. In addition, the binary content of the selected files
145154
* is always scanned as well.
155+
* Images are scanned only as binary if the specified region
156+
* does not support image inspection and no file_types were specified.
157+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
146158
* </pre>
147159
*
148160
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
@@ -158,6 +170,9 @@ public interface CloudStorageOptionsOrBuilder
158170
* If empty, all files are scanned and available data format processors
159171
* are applied. In addition, the binary content of the selected files
160172
* is always scanned as well.
173+
* Images are scanned only as binary if the specified region
174+
* does not support image inspection and no file_types were specified.
175+
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
161176
* </pre>
162177
*
163178
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>

0 commit comments

Comments
 (0)