Skip to content
Permalink
Browse files
feat: add CSV and TSV to file types (#232)
* Fixes: Cleaned up resource_reference annotations for correct semantics and improved client library generation
* Fixes: BucketingConfig.replacement_value marked as required

This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/111bd893-9b98-4365-a5b5-e42fe9101d49/targets

- [ ] To automatically regenerate this PR, check this box.

PiperOrigin-RevId: 320252582
Source-Link: googleapis/googleapis@cc85255
  • Loading branch information
yoshi-automation committed Jul 10, 2020
1 parent e558868 commit 2f44354fb6ebc7feaf1723b3fc287703dd6bea89
Showing with 2,822 additions and 2,184 deletions.
  1. +294 −81 google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java
  2. +6 −6 google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java
  3. +60 −45 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfig.java
  4. +44 −0 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItem.java
  5. +35 −14 ...-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequest.java
  6. +10 −4 ...loud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequestOrBuilder.java
  7. +21 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequest.java
  8. +6 −4 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequestOrBuilder.java
  9. +35 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequest.java
  10. +10 −4 ...e-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequestOrBuilder.java
  11. +21 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequest.java
  12. +6 −4 ...google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequestOrBuilder.java
  13. +35 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequest.java
  14. +10 −4 ...le-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequestOrBuilder.java
  15. +16 −20 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfig.java
  16. +4 −5 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfigOrBuilder.java
  17. +21 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequest.java
  18. +6 −4 ...oogle-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequestOrBuilder.java
  19. +14 −21 ...-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequest.java
  20. +4 −6 ...loud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequestOrBuilder.java
  21. +21 −21 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequest.java
  22. +6 −6 ...e-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequestOrBuilder.java
  23. +14 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequest.java
  24. +4 −4 ...le-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequestOrBuilder.java
  25. +1,030 −1,029 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java
  26. +128 −124 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpStorage.java
  27. +64 −3 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FileType.java
  28. +14 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Finding.java
  29. +4 −4 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FindingOrBuilder.java
  30. +80 −80 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfig.java
  31. +20 −20 ...oogle-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfigOrBuilder.java
  32. +21 −21 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequest.java
  33. +6 −6 ...e-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequestOrBuilder.java
  34. +14 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequest.java
  35. +4 −4 ...ogle-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequestOrBuilder.java
  36. +14 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequest.java
  37. +4 −4 ...oogle-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequestOrBuilder.java
  38. +14 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequest.java
  39. +4 −4 ...gle-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequestOrBuilder.java
  40. +14 −14 ...o-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequest.java
  41. +4 −4 ...cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequestOrBuilder.java
  42. +2 −2 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatistics.java
  43. +21 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequest.java
  44. +6 −4 ...o-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequestOrBuilder.java
  45. +35 −14 ...o-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequest.java
  46. +10 −4 ...cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequestOrBuilder.java
  47. +21 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequest.java
  48. +6 −4 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequestOrBuilder.java
  49. +14 −7 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequest.java
  50. +4 −2 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequestOrBuilder.java
  51. +35 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequest.java
  52. +10 −4 ...le-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequestOrBuilder.java
  53. +21 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java
  54. +6 −4 ...-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java
  55. +35 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequest.java
  56. +10 −4 ...gle-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequestOrBuilder.java
  57. +2 −2 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataType.java
  58. +142 −142 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetric.java
  59. +21 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequest.java
  60. +6 −4 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequestOrBuilder.java
  61. +14 −0 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequest.java
  62. +4 −0 ...oogle-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequestOrBuilder.java
  63. +24 −24 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTable.java
  64. +6 −6 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTableOrBuilder.java
  65. +14 −21 ...-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequest.java
  66. +4 −6 ...loud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequestOrBuilder.java
  67. +14 −14 proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequest.java
  68. +4 −4 ...e-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequestOrBuilder.java
  69. +168 −113 proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto
  70. +18 −2 proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto
  71. +3 −3 synth.metadata

Large diffs are not rendered by default.

@@ -1141,8 +1141,8 @@ private static Builder initDefaults(Builder builder) {

builder
.hybridInspectJobTriggerSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));

builder
.getJobTriggerSettings()
@@ -1211,13 +1211,13 @@ private static Builder initDefaults(Builder builder) {

builder
.hybridInspectDlpJobSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));

builder
.finishDlpJobSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));

return builder;
}
@@ -211,11 +211,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
* <pre>
* Replacement value for this bucket. If not provided
* the default behavior will be to hyphenate the min-max range.
* Required. Replacement value for this bucket.
* </pre>
*
* <code>.google.privacy.dlp.v2.Value replacement_value = 3;</code>
* <code>
* .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED];
* </code>
*
* @return Whether the replacementValue field is set.
*/
@@ -224,11 +225,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
* <pre>
* Replacement value for this bucket. If not provided
* the default behavior will be to hyphenate the min-max range.
* Required. Replacement value for this bucket.
* </pre>
*
* <code>.google.privacy.dlp.v2.Value replacement_value = 3;</code>
* <code>
* .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED];
* </code>
*
* @return The replacementValue.
*/
@@ -237,11 +239,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
* <pre>
* Replacement value for this bucket. If not provided
* the default behavior will be to hyphenate the min-max range.
* Required. Replacement value for this bucket.
* </pre>
*
* <code>.google.privacy.dlp.v2.Value replacement_value = 3;</code>
* <code>
* .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED];
* </code>
*/
com.google.privacy.dlp.v2.ValueOrBuilder getReplacementValueOrBuilder();
}
@@ -475,11 +478,12 @@ public com.google.privacy.dlp.v2.ValueOrBuilder getMaxOrBuilder() {
*
*
* <pre>
* Replacement value for this bucket. If not provided
* the default behavior will be to hyphenate the min-max range.
* Required. Replacement value for this bucket.
* </pre>
*
* <code>.google.privacy.dlp.v2.Value replacement_value = 3;</code>
* <code>
* .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED];
* </code>
*
* @return Whether the replacementValue field is set.
*/
@@ -491,11 +495,12 @@ public boolean hasReplacementValue() {
*
*
* <pre>
* Replacement value for this bucket. If not provided
* the default behavior will be to hyphenate the min-max range.
* Required. Replacement value for this bucket.
* </pre>
*
* <code>.google.privacy.dlp.v2.Value replacement_value = 3;</code>
* <code>
* .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED];
* </code>
*
* @return The replacementValue.
*/
@@ -509,11 +514,12 @@ public com.google.privacy.dlp.v2.Value getReplacementValue() {
*
*
* <pre>
* Replacement value for this bucket. If not provided
* the default behavior will be to hyphenate the min-max range.
* Required. Replacement value for this bucket.
* </pre>
*
* <code>.google.privacy.dlp.v2.Value replacement_value = 3;</code>
* <code>
* .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED];
* </code>
*/
@java.lang.Override
public com.google.privacy.dlp.v2.ValueOrBuilder getReplacementValueOrBuilder() {
@@ -1285,11 +1291,12 @@ public com.google.privacy.dlp.v2.ValueOrBuilder getMaxOrBuilder() {
*
*
* <pre>
* Replacement value for this bucket. If not provided
* the default behavior will be to hyphenate the min-max range.
* Required. Replacement value for this bucket.
* </pre>
*
* <code>.google.privacy.dlp.v2.Value replacement_value = 3;</code>
* <code>
* .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED];
* </code>
*
* @return Whether the replacementValue field is set.
*/
@@ -1300,11 +1307,12 @@ public boolean hasReplacementValue() {
*
*
* <pre>
* Replacement value for this bucket. If not provided
* the default behavior will be to hyphenate the min-max range.
* Required. Replacement value for this bucket.
* </pre>
*
* <code>.google.privacy.dlp.v2.Value replacement_value = 3;</code>
* <code>
* .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED];
* </code>
*
* @return The replacementValue.
*/
@@ -1321,11 +1329,12 @@ public com.google.privacy.dlp.v2.Value getReplacementValue() {
*
*
* <pre>
* Replacement value for this bucket. If not provided
* the default behavior will be to hyphenate the min-max range.
* Required. Replacement value for this bucket.
* </pre>
*
* <code>.google.privacy.dlp.v2.Value replacement_value = 3;</code>
* <code>
* .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED];
* </code>
*/
public Builder setReplacementValue(com.google.privacy.dlp.v2.Value value) {
if (replacementValueBuilder_ == null) {
@@ -1344,11 +1353,12 @@ public Builder setReplacementValue(com.google.privacy.dlp.v2.Value value) {
*
*
* <pre>
* Replacement value for this bucket. If not provided
* the default behavior will be to hyphenate the min-max range.
* Required. Replacement value for this bucket.
* </pre>
*
* <code>.google.privacy.dlp.v2.Value replacement_value = 3;</code>
* <code>
* .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED];
* </code>
*/
public Builder setReplacementValue(com.google.privacy.dlp.v2.Value.Builder builderForValue) {
if (replacementValueBuilder_ == null) {
@@ -1364,11 +1374,12 @@ public Builder setReplacementValue(com.google.privacy.dlp.v2.Value.Builder build
*
*
* <pre>
* Replacement value for this bucket. If not provided
* the default behavior will be to hyphenate the min-max range.
* Required. Replacement value for this bucket.
* </pre>
*
* <code>.google.privacy.dlp.v2.Value replacement_value = 3;</code>
* <code>
* .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED];
* </code>
*/
public Builder mergeReplacementValue(com.google.privacy.dlp.v2.Value value) {
if (replacementValueBuilder_ == null) {
@@ -1391,11 +1402,12 @@ public Builder mergeReplacementValue(com.google.privacy.dlp.v2.Value value) {
*
*
* <pre>
* Replacement value for this bucket. If not provided
* the default behavior will be to hyphenate the min-max range.
* Required. Replacement value for this bucket.
* </pre>
*
* <code>.google.privacy.dlp.v2.Value replacement_value = 3;</code>
* <code>
* .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED];
* </code>
*/
public Builder clearReplacementValue() {
if (replacementValueBuilder_ == null) {
@@ -1412,11 +1424,12 @@ public Builder clearReplacementValue() {
*
*
* <pre>
* Replacement value for this bucket. If not provided
* the default behavior will be to hyphenate the min-max range.
* Required. Replacement value for this bucket.
* </pre>
*
* <code>.google.privacy.dlp.v2.Value replacement_value = 3;</code>
* <code>
* .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED];
* </code>
*/
public com.google.privacy.dlp.v2.Value.Builder getReplacementValueBuilder() {

@@ -1427,11 +1440,12 @@ public com.google.privacy.dlp.v2.Value.Builder getReplacementValueBuilder() {
*
*
* <pre>
* Replacement value for this bucket. If not provided
* the default behavior will be to hyphenate the min-max range.
* Required. Replacement value for this bucket.
* </pre>
*
* <code>.google.privacy.dlp.v2.Value replacement_value = 3;</code>
* <code>
* .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED];
* </code>
*/
public com.google.privacy.dlp.v2.ValueOrBuilder getReplacementValueOrBuilder() {
if (replacementValueBuilder_ != null) {
@@ -1446,11 +1460,12 @@ public com.google.privacy.dlp.v2.ValueOrBuilder getReplacementValueOrBuilder() {
*
*
* <pre>
* Replacement value for this bucket. If not provided
* the default behavior will be to hyphenate the min-max range.
* Required. Replacement value for this bucket.
* </pre>
*
* <code>.google.privacy.dlp.v2.Value replacement_value = 3;</code>
* <code>
* .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED];
* </code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.privacy.dlp.v2.Value,
@@ -227,6 +227,26 @@ public enum BytesType implements com.google.protobuf.ProtocolMessageEnum {
* <code>AVRO = 11;</code>
*/
AVRO(11),
/**
*
*
* <pre>
* csv
* </pre>
*
* <code>CSV = 12;</code>
*/
CSV(12),
/**
*
*
* <pre>
* tsv
* </pre>
*
* <code>TSV = 13;</code>
*/
TSV(13),
UNRECOGNIZED(-1),
;

@@ -330,6 +350,26 @@ public enum BytesType implements com.google.protobuf.ProtocolMessageEnum {
* <code>AVRO = 11;</code>
*/
public static final int AVRO_VALUE = 11;
/**
*
*
* <pre>
* csv
* </pre>
*
* <code>CSV = 12;</code>
*/
public static final int CSV_VALUE = 12;
/**
*
*
* <pre>
* tsv
* </pre>
*
* <code>TSV = 13;</code>
*/
public static final int TSV_VALUE = 13;

public final int getNumber() {
if (this == UNRECOGNIZED) {
@@ -375,6 +415,10 @@ public static BytesType forNumber(int value) {
return PDF;
case 11:
return AVRO;
case 12:
return CSV;
case 13:
return TSV;
default:
return null;
}

0 comments on commit 2f44354

Please sign in to comment.