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

feat: add WORD and PDF file type enums and new MetadataLocation proto #176

Merged
merged 3 commits into from May 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/ci.yaml
@@ -0,0 +1,76 @@
on:
push:
branches:
- master
pull_request:
name: ci
jobs:
units:
runs-on: ubuntu-latest
strategy:
matrix:
java: [7, 8, 11]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: test
- name: coverage
uses: codecov/codecov-action@v1
with:
name: actions ${{matrix.java}}
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- run: java -version
- run: .kokoro/build.bat
env:
JOB_TYPE: test
dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- run: java -version
- run: .kokoro/dependencies.sh
linkage-monitor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- run: java -version
- run: .kokoro/linkage-monitor.sh
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: lint
clirr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: clirr
2 changes: 1 addition & 1 deletion .kokoro/build.bat
@@ -1,3 +1,3 @@
:: See documentation in type-shell-output.bat

"C:\Program Files\Git\bin\bash.exe" github/java-dlp/.kokoro/build.sh
"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh
Expand Up @@ -121,7 +121,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
* <pre>
* The type of data being sent to in data.
* The type of data being sent for inspection.
* </pre>
*
* Protobuf enum {@code google.privacy.dlp.v2.ByteContentItem.BytesType}
Expand Down Expand Up @@ -197,6 +197,26 @@ public enum BytesType implements com.google.protobuf.ProtocolMessageEnum {
* <code>TEXT_UTF8 = 5;</code>
*/
TEXT_UTF8(5),
/**
*
*
* <pre>
* docx, docm, dotx, dotm
* </pre>
*
* <code>WORD_DOCUMENT = 7;</code>
*/
WORD_DOCUMENT(7),
/**
*
*
* <pre>
* pdf
* </pre>
*
* <code>PDF = 8;</code>
*/
PDF(8),
/**
*
*
Expand Down Expand Up @@ -280,6 +300,26 @@ public enum BytesType implements com.google.protobuf.ProtocolMessageEnum {
* <code>TEXT_UTF8 = 5;</code>
*/
public static final int TEXT_UTF8_VALUE = 5;
/**
*
*
* <pre>
* docx, docm, dotx, dotm
* </pre>
*
* <code>WORD_DOCUMENT = 7;</code>
*/
public static final int WORD_DOCUMENT_VALUE = 7;
/**
*
*
* <pre>
* pdf
* </pre>
*
* <code>PDF = 8;</code>
*/
public static final int PDF_VALUE = 8;
/**
*
*
Expand Down Expand Up @@ -329,6 +369,10 @@ public static BytesType forNumber(int value) {
return IMAGE_SVG;
case 5:
return TEXT_UTF8;
case 7:
return WORD_DOCUMENT;
case 8:
return PDF;
case 11:
return AVRO;
default:
Expand Down
Expand Up @@ -1462,6 +1462,9 @@ public com.google.privacy.dlp.v2.FileType convert(java.lang.Integer from) {
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -1480,6 +1483,9 @@ public java.util.List<com.google.privacy.dlp.v2.FileType> getFileTypesList() {
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -1497,6 +1503,9 @@ public int getFileTypesCount() {
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -1515,6 +1524,9 @@ public com.google.privacy.dlp.v2.FileType getFileTypes(int index) {
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -1532,6 +1544,9 @@ public java.util.List<java.lang.Integer> getFileTypesValueList() {
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand Down Expand Up @@ -2345,6 +2360,9 @@ private void ensureFileTypesIsMutable() {
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -2363,6 +2381,9 @@ public java.util.List<com.google.privacy.dlp.v2.FileType> getFileTypesList() {
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -2380,6 +2401,9 @@ public int getFileTypesCount() {
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -2398,6 +2422,9 @@ public com.google.privacy.dlp.v2.FileType getFileTypes(int index) {
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -2423,6 +2450,9 @@ public Builder setFileTypes(int index, com.google.privacy.dlp.v2.FileType value)
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -2447,6 +2477,9 @@ public Builder addFileTypes(com.google.privacy.dlp.v2.FileType value) {
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -2471,6 +2504,9 @@ public Builder addAllFileTypes(
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -2491,6 +2527,9 @@ public Builder clearFileTypes() {
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -2508,6 +2547,9 @@ public java.util.List<java.lang.Integer> getFileTypesValueList() {
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -2526,6 +2568,9 @@ public int getFileTypesValue(int index) {
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -2548,6 +2593,9 @@ public Builder setFileTypesValue(int index, int value) {
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -2569,6 +2617,9 @@ public Builder addFileTypesValue(int value) {
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand Down
Expand Up @@ -97,6 +97,9 @@ public interface CloudStorageOptionsOrBuilder
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -112,6 +115,9 @@ public interface CloudStorageOptionsOrBuilder
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -127,6 +133,9 @@ public interface CloudStorageOptionsOrBuilder
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -143,6 +152,9 @@ public interface CloudStorageOptionsOrBuilder
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand All @@ -158,6 +170,9 @@ public interface CloudStorageOptionsOrBuilder
* If empty, all files are scanned and available data format processors
* are applied. In addition, the binary content of the selected files
* is always scanned as well.
* Images are scanned only as binary if the specified region
* does not support image inspection and no file_types were specified.
* Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
* </pre>
*
* <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
Expand Down